Skip to content

Instantly share code, notes, and snippets.

// NeuLAND Online Monitoring
// run: root -l -q -b neuland_online.C
struct EXT_STR_h101_t
{
EXT_STR_h101_unpack_t unpack;
EXT_STR_h101_TPAT tpat;
EXT_STR_h101_SOFSCI_onion_t sci;
EXT_STR_h101_raw_nnp_tamex_t raw_nnp;
};
@janmayer
janmayer / formatted.cxx
Created November 4, 2019 15:17
clang-format example
// hit fiber number vs. TofD position:
for (Int_t j = ifibcount + 1; j < NOF_FIB_DET; j++) {
detName2 = fDetectorNames[DET_FI_FIRST + j];
fh_Fib_vs_Fib[ifibcount][j] =
new TH2F(Form("fib%s_vs_fib%s", detName, detName2),
Form("Fiber %s vs. Fiber %", detName, detName2),
110, 0, 1100, 110, 0., 1100.);
fh_Fib_vs_Fib[ifibcount][j]->GetYaxis()->SetTitle(Form("Fiber%s", detName2));
fh_Fib_vs_Fib[ifibcount][j]->GetXaxis()->SetTitle(Form("Fiber%s", detName));
;
@janmayer
janmayer / Authentication.diff
Created February 1, 2018 15:21
For typo3 ig_ldap_sso_auth, add the primary usergroup from gidnumber to memberOf ldapgroups
--- a/Classes/Library/Authentication.php
+++ b/Classes/Library/Authentication.php
@@ -456,6 +456,9 @@
!(bool)static::$config['GroupsNotSynchronize'],
$ldapInstance
);
+ $primaryGroup = $ldapInstance->search(static::$config['groups']['basedn'], '(&(gidnumber='.$ldapUser['gidnumber'][0].')(objectClass=posixGroup))', $ldapGroupAttributes);
+ $ldapGroups[] = $primaryGroup[0];
+ $ldapGroups['count']++;
}
@janmayer
janmayer / config.cache
Created March 10, 2017 12:55
FairSoft build config file with automatic path expansion
compiler=gcc
debug=yes
optimize=yes
geant4_download_install_data_automatic=yes
geant4_install_data_from_dir=no
build_root6=yes
build_python=no
install_sim=yes
SIMPATH_INSTALL=$(cd ..; pwd)/FairSoft
platform=linux
@janmayer
janmayer / build.sh
Last active March 10, 2017 10:22
Build R3BRoot
#!/bin/bash
export BASEPATH=/data/jmayer/Simulations/2017-03-08
# requires FairSoft installation in ${BASEPATH}/FairSoft
export SIMPATH=${BASEPATH}/FairSoft
. ${SIMPATH}/share/Geant4/geant4make/geant4make.sh
. ${SIMPATH}/bin/thisroot.sh
# requires FairRoot installation in ${BASEPATH}/FairRoot
@janmayer
janmayer / mytable.tex
Created April 30, 2015 12:43
Example for beautiful LateX tables
\documentclass{scrreprt}
\usepackage{booktabs}
\usepackage{isotope}
\usepackage{siunitx}
\sisetup{
per-mode = fraction,
load-configurations = abbreviations,
}
@janmayer
janmayer / build-FairRoot.sh
Last active March 10, 2017 12:34
Script to (re-) build FairRoot
#!/bin/bash
# requires FairSoft installation in ${BASEPATH}/FairSoft
# requires FairRoot source code in ${BASEPATH}/FairRoot-src
export BASEPATH=$(pwd)
# Set FairSoft environment variables
export SIMPATH=${BASEPATH}/FairSoft
. ${SIMPATH}/share/Geant4/geant4make/geant4make.sh
. ${SIMPATH}/bin/thisroot.sh