diff --git a/run2auau/TriggerProduction/Fun4All_Prdf_Combiner.C b/run2auau/TriggerProduction/Fun4All_Prdf_Combiner.C index 451c7df..5876dfb 100644 --- a/run2auau/TriggerProduction/Fun4All_Prdf_Combiner.C +++ b/run2auau/TriggerProduction/Fun4All_Prdf_Combiner.C @@ -88,6 +88,7 @@ void Fun4All_Prdf_Combiner(int nEvents = 0, in->SetPoolDepth(50); in->Resync(true); + int NumInputs = 0; //in->Verbosity(2); // this one is the reference ifstream infile(gl1input); @@ -102,6 +103,7 @@ void Fun4All_Prdf_Combiner(int nEvents = 0, gl1->LastEvent(lastevent); gl1->AddListFile(gl1input); in->registerTriggerInput(gl1, InputManagerType::GL1); + NumInputs++; } infile.open(mbdinput); if (infile.is_open()) @@ -113,6 +115,7 @@ void Fun4All_Prdf_Combiner(int nEvents = 0, mbd->SkipToEvent(firstevent); mbd->AddListFile(mbdinput); in->registerTriggerInput(mbd, InputManagerType::MBD); + NumInputs++; } infile.open(zdcinput); @@ -125,6 +128,7 @@ void Fun4All_Prdf_Combiner(int nEvents = 0, zdc->SkipToEvent(firstevent); zdc->AddListFile(zdcinput); in->registerTriggerInput(zdc, InputManagerType::ZDC); + NumInputs++; } infile.open(ll1input); @@ -137,6 +141,7 @@ void Fun4All_Prdf_Combiner(int nEvents = 0, ll1->SkipToEvent(firstevent); ll1->AddListFile(ll1input); in->registerTriggerInput(ll1, InputManagerType::LL1); + NumInputs++; } int inpt = 0; for (auto iter : hcalinfile) @@ -152,9 +157,10 @@ void Fun4All_Prdf_Combiner(int nEvents = 0, hcal->enable_ddump(DDUMP); hcal->SkipToEvent(firstevent); in->registerTriggerInput(hcal, InputManagerType::HCAL); + inpt++; } - inpt++; } + NumInputs += inpt; inpt = 0; for (auto iter : cemcinfile) @@ -171,8 +177,16 @@ void Fun4All_Prdf_Combiner(int nEvents = 0, cemc->enable_ddump(DDUMP); cemc->SkipToEvent(firstevent); in->registerTriggerInput(cemc, InputManagerType::CEMC); + inpt++; } - inpt++; + } + NumInputs += inpt; + +// if there is no input manager this macro will still run - so just quit here + if (NumInputs == 0) + { + std::cout << "no file lists no input manager registered, quitting" << std::endl; + gSystem->Exit(1); } se->registerInputManager(in); diff --git a/run2auau/cosmics/Fun4All_Stream_Combiner.C b/run2auau/cosmics/Fun4All_Stream_Combiner.C index 16da222..ba2ff6a 100644 --- a/run2auau/cosmics/Fun4All_Stream_Combiner.C +++ b/run2auau/cosmics/Fun4All_Stream_Combiner.C @@ -137,6 +137,7 @@ void Fun4All_Stream_Combiner(int nEvents = 100, Fun4AllStreamingInputManager *in = new Fun4AllStreamingInputManager("Comb"); // in->Verbosity(2); // create and register input managers + int NumInputs = 0; int i = 0; for (auto iter : gl1_infile) @@ -150,9 +151,9 @@ void Fun4All_Stream_Combiner(int nEvents = 100, i++; } } - i = 0; - + NumInputs += i; + i = 0; for (auto iter : intt_infile) { if (isGood(iter)) @@ -166,6 +167,8 @@ void Fun4All_Stream_Combiner(int nEvents = 100, i++; } } + NumInputs += i; + i = 0; for (auto iter : mvtx_infile) { @@ -180,6 +183,8 @@ void Fun4All_Stream_Combiner(int nEvents = 100, i++; } } + NumInputs += i; + i = 0; for (auto iter : tpc_infile) { @@ -195,8 +200,9 @@ void Fun4All_Stream_Combiner(int nEvents = 100, i++; } } - i = 0; + NumInputs += i; + i = 0; for (auto iter : tpot_infile) { if (isGood(iter)) @@ -211,6 +217,14 @@ void Fun4All_Stream_Combiner(int nEvents = 100, i++; } } + NumInputs += i; + +// if there is no input manager this macro will still run - so just quit here + if (NumInputs == 0) + { + std::cout << "no file lists no input manager registered, quitting" << std::endl; + gSystem->Exit(1); + } se->registerInputManager(in); // StreamingCheck *scheck = new StreamingCheck(); diff --git a/run2pp/TriggerProduction/Fun4All_Prdf_Combiner.C b/run2pp/TriggerProduction/Fun4All_Prdf_Combiner.C index 451c7df..5876dfb 100644 --- a/run2pp/TriggerProduction/Fun4All_Prdf_Combiner.C +++ b/run2pp/TriggerProduction/Fun4All_Prdf_Combiner.C @@ -88,6 +88,7 @@ void Fun4All_Prdf_Combiner(int nEvents = 0, in->SetPoolDepth(50); in->Resync(true); + int NumInputs = 0; //in->Verbosity(2); // this one is the reference ifstream infile(gl1input); @@ -102,6 +103,7 @@ void Fun4All_Prdf_Combiner(int nEvents = 0, gl1->LastEvent(lastevent); gl1->AddListFile(gl1input); in->registerTriggerInput(gl1, InputManagerType::GL1); + NumInputs++; } infile.open(mbdinput); if (infile.is_open()) @@ -113,6 +115,7 @@ void Fun4All_Prdf_Combiner(int nEvents = 0, mbd->SkipToEvent(firstevent); mbd->AddListFile(mbdinput); in->registerTriggerInput(mbd, InputManagerType::MBD); + NumInputs++; } infile.open(zdcinput); @@ -125,6 +128,7 @@ void Fun4All_Prdf_Combiner(int nEvents = 0, zdc->SkipToEvent(firstevent); zdc->AddListFile(zdcinput); in->registerTriggerInput(zdc, InputManagerType::ZDC); + NumInputs++; } infile.open(ll1input); @@ -137,6 +141,7 @@ void Fun4All_Prdf_Combiner(int nEvents = 0, ll1->SkipToEvent(firstevent); ll1->AddListFile(ll1input); in->registerTriggerInput(ll1, InputManagerType::LL1); + NumInputs++; } int inpt = 0; for (auto iter : hcalinfile) @@ -152,9 +157,10 @@ void Fun4All_Prdf_Combiner(int nEvents = 0, hcal->enable_ddump(DDUMP); hcal->SkipToEvent(firstevent); in->registerTriggerInput(hcal, InputManagerType::HCAL); + inpt++; } - inpt++; } + NumInputs += inpt; inpt = 0; for (auto iter : cemcinfile) @@ -171,8 +177,16 @@ void Fun4All_Prdf_Combiner(int nEvents = 0, cemc->enable_ddump(DDUMP); cemc->SkipToEvent(firstevent); in->registerTriggerInput(cemc, InputManagerType::CEMC); + inpt++; } - inpt++; + } + NumInputs += inpt; + +// if there is no input manager this macro will still run - so just quit here + if (NumInputs == 0) + { + std::cout << "no file lists no input manager registered, quitting" << std::endl; + gSystem->Exit(1); } se->registerInputManager(in); diff --git a/run2pp/cosmics/Fun4All_Stream_Combiner.C b/run2pp/cosmics/Fun4All_Stream_Combiner.C index fc7a158..56afa3e 100644 --- a/run2pp/cosmics/Fun4All_Stream_Combiner.C +++ b/run2pp/cosmics/Fun4All_Stream_Combiner.C @@ -137,6 +137,7 @@ void Fun4All_Stream_Combiner(int nEvents = 100, Fun4AllStreamingInputManager *in = new Fun4AllStreamingInputManager("Comb"); // in->Verbosity(2); // create and register input managers + int NumInputs = 0; int i = 0; for (auto iter : gl1_infile) @@ -150,9 +151,9 @@ void Fun4All_Stream_Combiner(int nEvents = 100, i++; } } - i = 0; - + NumInputs += i; + i = 0; for (auto iter : intt_infile) { if (isGood(iter)) @@ -166,6 +167,8 @@ void Fun4All_Stream_Combiner(int nEvents = 100, i++; } } + NumInputs += i; + i = 0; for (auto iter : mvtx_infile) { @@ -180,6 +183,8 @@ void Fun4All_Stream_Combiner(int nEvents = 100, i++; } } + NumInputs += i; + i = 0; for (auto iter : tpc_infile) { @@ -195,8 +200,9 @@ void Fun4All_Stream_Combiner(int nEvents = 100, i++; } } - i = 0; + NumInputs += i; + i = 0; for (auto iter : tpot_infile) { if (isGood(iter)) @@ -211,7 +217,14 @@ void Fun4All_Stream_Combiner(int nEvents = 100, i++; } } + NumInputs += i; +// if there is no input manager this macro will still run - so just quit here + if (NumInputs == 0) + { + std::cout << "no file lists no input manager registered, quitting" << std::endl; + gSystem->Exit(1); + } se->registerInputManager(in); // StreamingCheck *scheck = new StreamingCheck(); // scheck->SetTpcBcoRange(130);