73 std::vector<edm::RunNumber_t>
endrun;
94 if (
isRunLsBased_ && luminositySectionsBlockRanges_.empty() ) {
95 assert(
"ERROR: selection based on run/Lumisection from json file, but LuminositySectionsBlockRange is emptpy." ==
nullptr );
97 if ( (!
isRunLsBased_) && !luminositySectionsBlockRanges_.empty() ) {
98 assert(
"ERROR: selection based on run/event from txt file, but LuminositySectionsBlockRange is not emptpy." ==
nullptr );
101 if (
isRunLsBased_ ){
std::cout <<
"Selection based on run/luminositySection; file with run/event list: " << std::endl; }
120 bool selectThisEvent =
false;
133 if ( kRun < (*oneLumiRange).startRun() ) {
139 if ( (*oneLumiRange).endRun() < kRun )
continue;
142 if ( (*oneLumiRange).startLumi() <= kLumi && kLumi <= (*oneLumiRange).endLumi() )
144 selectThisEvent =
true;
172 return selectThisEvent;
183 std::stringstream ss;
184 std::vector<std::string> tokens;
199 std::ifstream listfile;
201 if (listfile.is_open())
203 while (! listfile.eof() )
205 getline (listfile,line);
211 tokens.push_back(buf);
221 if(tokens[0]==
"-" || tokens[0]==
"+")
224 if(tokens[0]==
"-")
whattodo.push_back(
false);
228 int loc=tokens[1].find(
":",0);
240 loc=tokens[2].find(
":",0);
242 first=tokens[2].substr(0,loc);
245 last=tokens[2].substr(loc+1,tokens[2].
size());
256 std::cout <<
"Summary from list of run/event number selection" << std::endl;
277 std::cout <<
"================================================\n" 278 <<
" n Events Analyzed ............... " <<
nEventsAnalyzed << std::endl
279 <<
" n Events Selected ............... " <<
nEventsSelected<< std::endl
280 <<
"================================================\n\n" ;
T getParameter(std::string const &) const
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
std::string listrunevents_
#define DEFINE_FWK_MODULE(type)
unsigned long long EventNumber_t
LuminosityBlockNumber_t luminosityBlock() const
unsigned int LuminosityBlockNumber_t
bool filter(edm::Event &, const edm::EventSetup &) override
std::vector< edm::LuminosityBlockRange > luminositySectionsBlockRanges_
std::vector< edm::RunNumber_t > startrun
std::vector< edm::EventNumber_t > endevent
bool orderLuminosityBlockRange(edm::LuminosityBlockRange u, edm::LuminosityBlockRange v)
RunNumber_t startRun() const
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_