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);
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";
T getParameter(std::string const &) const
std::string listrunevents_
unsigned long long EventNumber_t
unsigned int LuminosityBlockNumber_t
bool filter(edm::Event &, const edm::EventSetup &) override
T getUntrackedParameter(std::string const &, T const &) const
std::vector< edm::LuminosityBlockRange > luminositySectionsBlockRanges_
RunNumber_t startRun() const
std::vector< edm::RunNumber_t > startrun
#define DEFINE_FWK_MODULE(type)
std::vector< edm::EventNumber_t > endevent
bool orderLuminosityBlockRange(edm::LuminosityBlockRange u, edm::LuminosityBlockRange v)
std::vector< bool > whattodo
std::vector< edm::EventNumber_t > startevent
static EventNumber_t maxEventNumber()
std::vector< edm::RunNumber_t > endrun
PickEvents(const edm::ParameterSet &)
std::string listruneventsinpath_