Skip to content
Snippets Groups Projects
Commit 7f596fa5 authored by Pierre-Alain Loizeau's avatar Pierre-Alain Loizeau
Browse files

Add optional support for Run ID outside of list in kronos evt macro to later keep only one version

parent 9f28a47b
No related branches found
No related tags found
No related merge requests found
/*
* To use a specific Run ID not in the list, set uRunIdx to 99999 and provide
* your desired ID as last parameter.
* In all other cases this optional parameter is ignored.
*/
void build_event_win_kronos(UInt_t uRunIdx = 0,
Int_t nEvents = 0,
TString outDir = "data/") {
TString outDir = "data/",
UInt_t uRunIdIn = 0 ) {
UInt_t uRunId = 0;
TString fileName = "data/unp_mcbm_0.root";
if (99999 != uRunIdx) {
if( 0 != uRunIdIn ) {
cout << "Ignored optional Run ID: " << uRunIdIn << endl;
} // if( 0 != uRunIdIn )
std::vector<UInt_t> vuListRunId = {
692, 698, 702, 704, 705, 706, 707, // 7 => 0 - 6
744, 750, 759, 760, 761, 762, 799, // 7 => 7 - 13
......@@ -27,8 +38,17 @@ void build_event_win_kronos(UInt_t uRunIdx = 0,
uRunId = vuListRunId[uRunIdx];
fileName = Form("data/unp_mcbm_%03u.root", uRunId);
} // if( 99999 != uRunIdx )
else {
uRunId = uRunIdIn;
} // else of if (99999 != uRunIdx)
if (uRunId < 692 && 0 != uRunId) {
cout << "Run ID smaller than 692 are not supported in this analysis!"
<< " Here we have "
<< uRunId << endl;
return kFALSE;
} // if (uRunId < 692 && 0 != uRunId)
if (uRunId < 692 && 0 != uRunId) return kFALSE;
// ========================================================================
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment