71 std::vector<edm::RunNumber_t>
endrun;
82 iConfig.
getUntrackedParameter<std::vector<edm::LuminosityBlockRange> >(
"LuminositySectionsBlockRange");
89 if (
isRunLsBased_ && luminositySectionsBlockRanges_.empty()) {
90 assert(
"ERROR: selection based on run/Lumisection from json file, but LuminositySectionsBlockRange is emptpy." ==
93 if ((!
isRunLsBased_) && !luminositySectionsBlockRanges_.empty()) {
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;
146 for (
unsigned int cond = 0; cond <
whattodo.size(); cond++) {
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;
238 for (
unsigned int cond = 0; cond <
whattodo.size(); cond++) {
257 std::cout <<
"================================================\n"
258 <<
" n Events Analyzed ............... " <<
nEventsAnalyzed << std::endl
259 <<
" n Events Selected ............... " <<
nEventsSelected << std::endl
260 <<
"================================================\n\n";
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
T getParameter(std::string const &) const
static EventNumber_t maxEventNumber()
std::vector< edm::RunNumber_t > endrun
PickEvents(const edm::ParameterSet &)
std::string listruneventsinpath_
tuple size
Write out results.