|
|
Go to the documentation of this file.
19 #include <boost/algorithm/string.hpp>
20 #include <boost/format.hpp>
21 #include <boost/range.hpp>
22 #include <boost/regex.hpp>
23 #include <boost/algorithm/string.hpp>
31 runNumber_ =
pset.getUntrackedParameter<
unsigned int>(
"runNumber");
33 hltSel_ =
pset.getUntrackedParameter<std::vector<std::string> >(
"SelectEvents");
116 header->hltTriggerNames(tnames);
131 unlink(
path.c_str());
164 if (std::filesystem::exists(
p)) {
189 <<
"received wrong message type: expected INIT, got " <<
header->code() <<
"\n";
298 if (eview ==
nullptr) {
320 if (eview ==
nullptr) {
350 boost::erase_all(
hltPath,
" \t");
364 boost::erase_all(
hltPath,
" \t");
372 edm::LogWarning(
"Trigger selection does not match any trigger path!!!") << std::endl;
387 std::vector<unsigned char> hltTriggerBits_;
388 int hltTriggerCount_ = evtmsg->
hltCount();
389 if (hltTriggerCount_ > 0) {
390 hltTriggerBits_.resize(1 + (hltTriggerCount_ - 1) / 4);
403 for (
int i = 0;
i != toSkip; ++
i) {
406 if (evMsg ==
nullptr) {
419 desc.setComment(
"Reads events from streamer files.");
421 desc.addUntracked<std::vector<std::string> >(
"SelectEvents")->setComment(
"HLT path to select events ");
423 desc.addUntracked<
int>(
"minEventsPerLumi", 1)
425 "Minimum number of events to process per lumisection, "
426 "before switching to a new input file. If the next file "
427 "does not yet exist, "
428 "the number of processed events will be bigger.");
430 desc.addUntracked<
bool>(
"skipFirstLumis",
false)
432 "Skip (and ignore the minEventsPerLumi parameter) for the files "
433 "which have been available at the begining of the processing. "
434 "If set to true, the reader will open last available file for "
437 desc.addUntracked<
bool>(
"deleteDatFiles",
false)
439 "Delete data files after they have been closed, in order to "
442 desc.addUntracked<
bool>(
"endOfRunKills",
false)
444 "Kill the processing as soon as the end-of-run file appears, even if "
445 "there are/will be unprocessed lumisections.");
453 desc.addUntracked<
bool>(
"inputFileTransitionsEachEvent",
false);
459 descriptions.
add(
"source",
desc);
void logFileAction(const std::string &msg, const std::string &fileName="") const
bool acceptEvent(const EventMsgView *)
std::vector< std::vector< std::string >::const_iterator > regexMatch(std::vector< std::string > const &strings, std::regex const ®exp)
void openFileImp_(const DQMFileIterator::LumiEntry &entry)
std::unique_ptr< edm::StreamerInputFile > streamFile_
void closeFileImp_(const std::string &reason)
void genuineReadFile() override
DQMStreamerReader(edm::ParameterSet const &pset, edm::InputSourceDescription const &desc)
Log< level::Warning, false > LogWarning
unsigned int minEventsPerLs_
static void fillDescription(edm::ParameterSetDescription &d)
~DQMStreamerReader() override
Next checkNext() override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
struct dqmservices::DQMStreamerReader::OpenFile file_
void hltTriggerBits(uint8 *put_here) const
EventMsgView const * prepareNextEvent()
std::string get_data_path() const
volatile std::atomic< bool > shutdown_flag
DQMFileIterator::LumiEntry lumi_
unsigned int processedEventPerLs_
void advanceToLumi(unsigned int lumi, std::string reason)
void skip(int toSkip) override
void genuineCloseFile() override
InitMsgView const * getHeaderMsg()
DQMFileIterator fiterator_
bool matchTriggerSel(Strings const &tnames)
static void fillDescription(ParameterSetDescription &desc)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< std::string > Strings
EventMsgView const * getEventMsg()
dqmservices::DQMStreamerReader DQMStreamerReader
void logLumiState(const LumiEntry &lumi, const std::string &msg)
unsigned int lastLumiFound()
std::shared_ptr< TriggerSelector > eventSelector_