|
26 | 26 | #include "eventDispenserConventions.h" |
27 | 27 | #include "eventDispenser_options.h" |
28 | 28 | #include "eventDispenser.h" |
| 29 | +#include "gdynamicdigitizationConventions.h" |
| 30 | + |
29 | 31 |
|
30 | 32 | // c++ |
31 | 33 | #include <fstream> |
@@ -63,7 +65,7 @@ EventDispenser::EventDispenser(GOptions *gopt, map<string, GDynamicDigitization |
63 | 65 | // A filename was specified; attempt to open the run weights input file. |
64 | 66 | ifstream in(filename.c_str()); |
65 | 67 | if (!in) { |
66 | | - log->error(EC__EVENTDISTRIBUTIONFILENOTFOUND, "Error: can't open run weights input file ", filename, ". Check your spelling. Exiting."); |
| 68 | + log->error(ERR_EVENTDISTRIBUTIONFILENOTFOUND, "Error: can't open run weights input file ", filename, ". Check your spelling. Exiting."); |
67 | 69 | } else { |
68 | 70 | log->info(1, "Loading run weights from ", filename); |
69 | 71 | // Fill the run weight map by reading each line from the file. |
@@ -154,10 +156,14 @@ int EventDispenser::processEvents() { |
154 | 156 | if (runNumber != currentRunno) { |
155 | 157 | for (auto [digitizationName, digiRoutine] : (*gDigitizationGlobal)) { |
156 | 158 | log->debug(NORMAL, "Calling ", digitizationName, " loadConstants for run ", runNumber); |
157 | | - digiRoutine->loadConstants(runNumber, variation); |
| 159 | + if (digiRoutine->loadConstants(runNumber, variation) == false) { |
| 160 | + log->error(ERR_LOADCONSTANTFAIL, "Failed to load constants for ", digitizationName, " for run ", runNumber, " with variation ", variation); |
| 161 | + } |
158 | 162 |
|
159 | 163 | log->debug(NORMAL, "Calling ", digitizationName, " loadTT for run ", runNumber); |
160 | | - digiRoutine->loadTT(runNumber, variation); |
| 164 | + if (digiRoutine->loadTT(runNumber, variation) == false) { |
| 165 | + log->error(ERR_LOADTTFAIL, "Failed to load translation table for ", digitizationName, " for run ", runNumber, " with variation ", variation); |
| 166 | + } |
161 | 167 | } |
162 | 168 | currentRunno = runNumber; |
163 | 169 | } |
|
0 commit comments