25 std::string readDir =
"file:/tmp/steinber";
31 std::string enableStr =
"" ;
34 std::string vers =
"0";
37 int localTrackLimit = 1e6;
40 std::string grlOption =
"";
41 if (
argc > 7 ) grlOption =
argv[ 7 ];
59 if (readDir.starts_with(
"file:"))
61 fileDir = readDir.substr(5);
63 std::cout <<
"Setting up file mode:" << fileDir << std::endl;
68 if (readDir.starts_with(
"eos:"))
70 fileDir = readDir.substr(4);
72 std::cout <<
"Setting up EOS mode:" << fileDir << std::endl;
73 std::string
eospath =
"root://eosatlas.cern.ch/"+fileDir;
78 if (readDir.starts_with(
"eoslsf:"))
80 fileDir = readDir.substr(7);
82 std::cout <<
"Setting up EOS LSF mode:" << fileDir << std::endl;
83 std::string
eospath =
"root://eosatlas.cern.ch/"+fileDir;
88 if (readDir.starts_with(
"grid:"))
90 fileDir = readDir.substr(5);
92 std::cout <<
"Setting up Grid mode:" << fileDir << std::endl;
94 sh.setMetaString(
"nc_grid_filter",
"*");
99 sh.setMetaString(
"nc_tree",
"CollectionTree" );
105 job.sampleHandler(
sh );
110 std::cout <<
"runtime options:" << enableStr << std::endl;
113 if (enableStr.find(
"debug")!=std::string::npos) { zdcAna->debug =
true; }
114 if (enableStr.find(
"slimmed")!=std::string::npos) { zdcAna->
slimmed =
true; }
115 if (enableStr.find(
"tree")!=std::string::npos) { zdcAna->
enableOutputTree =
true; }
117 if (enableStr.find(
"trigger")!=std::string::npos) { zdcAna->
enableTrigger =
true; }
118 if (enableStr.find(
"zdcCalib")!=std::string::npos) { zdcAna->
zdcCalib =
true; }
119 if (enableStr.find(
"zdcLaser")!=std::string::npos) { zdcAna->
zdcLaser =
true; }
120 if (enableStr.find(
"tracks")!=std::string::npos) { zdcAna->
enableTracks =
true; }
121 if (enableStr.find(
"clusters")!=std::string::npos) { zdcAna->
enableClusters =
true; }
122 if (enableStr.find(
"TT")!=std::string::npos) { zdcAna->
enableTT =
true; }
123 if (enableStr.find(
"jets")!=std::string::npos) { zdcAna->
enableJets =
true; }
124 if (enableStr.find(
"electrons")!=std::string::npos) { zdcAna->
enableElectrons =
true; }
125 if (enableStr.find(
"photons")!=std::string::npos) { zdcAna->
enablePhotons =
true; }
126 if (enableStr.find(
"trigjet")!=std::string::npos) { zdcAna->
enableTriggerJets =
true; }
127 if (enableStr.find(
"muons")!=std::string::npos) { zdcAna->
enableMuons =
true; }
128 if (enableStr.find(
"truth")!=std::string::npos) { zdcAna->
enableTruth =
true; }
129 if (enableStr.find(
"noflipdelay")!=std::string::npos) { zdcAna->
flipDelay =
false; }
130 if (enableStr.find(
"doflipdelay")!=std::string::npos) { zdcAna->
flipDelay =
true; }
131 if (enableStr.find(
"trackLimitReject")!=std::string::npos) { zdcAna->
trackLimitReject =
true; }
132 if (enableStr.find(
"reprocZdc")!=std::string::npos) { zdcAna->
reprocZdc =
true; }
133 if (enableStr.find(
"7samp")!=std::string::npos) { zdcAna->
nsamplesZdc = 7; }
134 if (enableStr.find(
"15samp")!=std::string::npos) { zdcAna->
nsamplesZdc = 15; }
135 if (enableStr.find(
"noGRL")!=std::string::npos) { zdcAna->
useGRL =
false;}
136 if (enableStr.find(
"express2016A")!=std::string::npos) { zdcAna->express2016A =
true;}
137 if (enableStr.find(
"upc2015")!=std::string::npos) { zdcAna->upc2015 =
true;}
138 if (enableStr.find(
"mb2015")!=std::string::npos) { zdcAna->mb2015 =
true;}
139 if (enableStr.find(
"upcL2015")!=std::string::npos) { zdcAna->upcL2015 =
true;}
140 if (enableStr.find(
"main2016A")!=std::string::npos) { zdcAna->main2016A =
true;}
141 if (enableStr.find(
"upc2016A")!=std::string::npos) { zdcAna->upc2016A =
true;}
142 if (enableStr.find(
"express2016B")!=std::string::npos) { zdcAna->express2016B =
true;}
143 if (enableStr.find(
"main2016B")!=std::string::npos) { zdcAna->main2016B =
true;}
144 if (enableStr.find(
"upc2016B")!=std::string::npos) { zdcAna->upc2016B =
true;}
145 if (enableStr.find(
"upc2016C")!=std::string::npos) { zdcAna->upc2016C =
true;}
146 if (enableStr.find(
"mboverlay2016")!=std::string::npos) { zdcAna->mboverlay2016 =
true;}
148 if (enableStr.find(
"writeOnlyTriggers")!=std::string::npos) { zdcAna->
writeOnlyTriggers =
true;}
149 if (grlOption !=
"") zdcAna->
grlFilename = grlOption;
159 job.algsAdd (ntuple);
162 job.algsAdd( zdcAna );
165 std::cout <<
"Running " << nevt <<
" events" << std::endl;
167 if (file_mode||eos_mode)
179 driver.options()->setString(
"nc_outputSampleName",
"user.steinber.%in:name[0]%.%in:name[1]%.%in:name[2]%.%in:name[3]%.%in:name[4]%.%in:name[5]%.%in:name[6]%."+vers);
189 TString shellCommand =
"export export LSB_JOB_REPORT_MAIL=N; export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase &&";
190 shellCommand +=
"source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh" ;
193 driver.shellInit = shellCommand.Data();