71 std::vector<edm::RunNumber_t>
endrun;
82 iConfig.
getUntrackedParameter<std::vector<edm::LuminosityBlockRange> >(
"LuminositySectionsBlockRange");
90 assert(
"ERROR: selection based on run/Lumisection from json file, but LuminositySectionsBlockRange is emptpy." ==
94 assert(
"ERROR: selection based on run/event from txt file, but LuminositySectionsBlockRange is not emptpy." ==
99 std::cout <<
"Selection based on run/luminositySection; file with run/event list: " << std::endl;
114 bool selectThisEvent =
false;
126 if (kRun < (*oneLumiRange).startRun()) {
132 if ((*oneLumiRange).endRun() < kRun)
136 if ((*oneLumiRange).startLumi() <= kLumi && kLumi <= (*oneLumiRange).endLumi()) {
137 selectThisEvent =
true;
161 return selectThisEvent;
170 std::stringstream
ss;
171 std::vector<std::string> tokens;
184 std::ifstream listfile;
186 if (listfile.is_open()) {
187 while (!listfile.eof()) {
188 getline(listfile,
line);
193 tokens.push_back(
buf);
197 if (tokens.size() < 3) {
202 if (tokens[0] ==
"-" || tokens[0] ==
"+") {
204 if (tokens[0] ==
"-")
210 int loc = tokens[1].find(
":", 0);
222 loc = tokens[2].find(
":", 0);
224 first = tokens[2].substr(0, loc);
227 last = tokens[2].substr(loc + 1, tokens[2].
size());
237 std::cout <<
"Summary from list of run/event number selection" << std::endl;
257 std::cout <<
"================================================\n"
258 <<
" n Events Analyzed ............... " <<
nEventsAnalyzed << std::endl
259 <<
" n Events Selected ............... " <<
nEventsSelected << std::endl
260 <<
"================================================\n\n";