27 runNumber_ =
pset.getUntrackedParameter<
unsigned int>(
"runNumber");
29 hltSel_ =
pset.getUntrackedParameter<std::vector<std::string> >(
"SelectEvents");
112 header->hltTriggerNames(tnames);
127 unlink(
path.c_str());
160 if (std::filesystem::exists(
p)) {
185 <<
"received wrong message type: expected INIT, got " <<
header->code() <<
"\n";
294 if (eview ==
nullptr) {
316 if (eview ==
nullptr) {
344 for (Strings::const_iterator
i(
hltSel_.begin()), end(
hltSel_.end());
i != end; ++
i) {
348 hltPath.begin(),
hltPath.end(), [](
char c) {
return std::isspace(static_cast<unsigned char>(
c)); }),
361 for (Strings::const_iterator
i(
hltSel_.begin()), end(
hltSel_.end());
i != end; ++
i) {
365 hltPath.begin(),
hltPath.end(), [](
char c) {
return std::isspace(static_cast<unsigned char>(
c)); }),
374 edm::LogWarning(
"Trigger selection does not match any trigger path!!!") << std::endl;
389 std::vector<unsigned char> hltTriggerBits_;
390 int hltTriggerCount_ = evtmsg->
hltCount();
391 if (hltTriggerCount_ > 0) {
392 hltTriggerBits_.resize(1 + (hltTriggerCount_ - 1) / 4);
405 for (
int i = 0;
i != toSkip; ++
i) {
408 if (evMsg ==
nullptr) {
421 desc.setComment(
"Reads events from streamer files.");
423 desc.addUntracked<std::vector<std::string> >(
"SelectEvents")->setComment(
"HLT path to select events ");
425 desc.addUntracked<
int>(
"minEventsPerLumi", 1)
427 "Minimum number of events to process per lumisection, " 428 "before switching to a new input file. If the next file " 429 "does not yet exist, " 430 "the number of processed events will be bigger.");
432 desc.addUntracked<
bool>(
"skipFirstLumis",
false)
434 "Skip (and ignore the minEventsPerLumi parameter) for the files " 435 "which have been available at the begining of the processing. " 436 "If set to true, the reader will open last available file for " 439 desc.addUntracked<
bool>(
"deleteDatFiles",
false)
441 "Delete data files after they have been closed, in order to " 444 desc.addUntracked<
bool>(
"endOfRunKills",
false)
446 "Kill the processing as soon as the end-of-run file appears, even if " 447 "there are/will be unprocessed lumisections.");
455 desc.addUntracked<
bool>(
"inputFileTransitionsEachEvent",
false);
461 descriptions.
add(
"source",
desc);
DQMFileIterator::LumiEntry lumi_
void hltTriggerBits(uint8 *put_here) const
unsigned int lastLumiFound()
void logLumiState(const LumiEntry &lumi, const std::string &msg)
volatile std::atomic< bool > shutdown_flag
void genuineCloseFile() override
std::shared_ptr< TriggerSelector > eventSelector_
InitMsgView const * getHeaderMsg()
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
dqmservices::DQMStreamerReader DQMStreamerReader
EventMsgView const * getEventMsg()
std::unique_ptr< edm::StreamerInputFile > streamFile_
void genuineReadFile() override
unsigned int processedEventPerLs_
std::string get_data_path() const
void openFileImp_(const DQMFileIterator::LumiEntry &entry)
DQMStreamerReader(edm::ParameterSet const &pset, edm::InputSourceDescription const &desc)
std::vector< std::string > Strings
void logFileAction(const std::string &msg, const std::string &fileName="") const
DQMFileIterator fiterator_
EventMsgView const * prepareNextEvent()
bool acceptEvent(const EventMsgView *)
~DQMStreamerReader() override
unsigned int minEventsPerLs_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< std::vector< std::string >::const_iterator > regexMatch(std::vector< std::string > const &strings, std::regex const ®exp)
static void fillDescription(ParameterSetDescription &desc)
void closeFileImp_(const std::string &reason)
Next checkNext() override
Log< level::Warning, false > LogWarning
bool matchTriggerSel(Strings const &tnames)
void advanceToLumi(unsigned int lumi, std::string reason)
static void fillDescription(edm::ParameterSetDescription &d)
struct dqmservices::DQMStreamerReader::OpenFile file_
void skip(int toSkip) override