|
|
Go to the documentation of this file.
16 #include <boost/regex.hpp>
17 #include <boost/format.hpp>
18 #include <boost/range.hpp>
19 #include <boost/filesystem.hpp>
20 #include <boost/algorithm/string.hpp>
27 : StreamerInputSource(
pset, desc), fiterator_(
pset) {
28 runNumber_ =
pset.getUntrackedParameter<
unsigned int>(
"runNumber");
30 hltSel_ =
pset.getUntrackedParameter<std::vector<std::string> >(
"SelectEvents");
113 header->hltTriggerNames(tnames);
128 unlink(
path.c_str());
161 if (boost::filesystem::exists(
p)) {
186 <<
"received wrong message type: expected INIT, got " <<
header->code() <<
"\n";
295 if (eview ==
nullptr) {
317 if (eview ==
nullptr) {
347 boost::erase_all(
hltPath,
" \t");
361 boost::erase_all(
hltPath,
" \t");
369 edm::LogWarning(
"Trigger selection does not match any trigger path!!!") << std::endl;
384 std::vector<unsigned char> hltTriggerBits_;
385 int hltTriggerCount_ = evtmsg->
hltCount();
386 if (hltTriggerCount_ > 0) {
387 hltTriggerBits_.resize(1 + (hltTriggerCount_ - 1) / 4);
400 for (
int i = 0;
i != toSkip; ++
i) {
403 if (evMsg ==
nullptr) {
416 desc.
setComment(
"Reads events from streamer files.");
418 desc.
addUntracked<std::vector<std::string> >(
"SelectEvents")->setComment(
"HLT path to select events ");
422 "Minimum number of events to process per lumisection, "
423 "before switching to a new input file. If the next file "
424 "does not yet exist, "
425 "the number of processed events will be bigger.");
429 "Skip (and ignore the minEventsPerLumi parameter) for the files "
430 "which have been available at the begining of the processing. "
431 "If set to true, the reader will open last available file for "
436 "Delete data files after they have been closed, in order to "
441 "Kill the processing as soon as the end-of-run file appears, even if "
442 "there are/will be unprocessed lumisections.");
450 desc.
addUntracked<
bool>(
"inputFileTransitionsEachEvent",
false);
456 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)
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()
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
std::string get_data_path() const
void setComment(std::string const &value)
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_