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> 28 : StreamerInputSource(pset, desc), fiterator_(pset) {
61 "Waiting for the first lumi in order to initialize.");
79 "End of run reached before DQMStreamerReader was initialised.");
130 unlink(path.c_str());
149 if (boost::filesystem::exists(p)) {
174 "DQMStreamerReader::readHeader")
175 <<
"received wrong message type: expected INIT, got " << header->
code()
270 if (!next)
return nullptr;
280 if (eview ==
nullptr) {
302 if (eview ==
nullptr) {
340 boost::erase_all(hltPath,
" \t");
354 boost::erase_all(hltPath,
" \t");
355 std::vector<Strings::const_iterator>
matches =
357 if (!matches.empty()) {
363 edm::LogWarning(
"Trigger selection does not match any trigger path!!!")
377 std::vector<unsigned char> hltTriggerBits_;
378 int hltTriggerCount_ = evtmsg->
hltCount();
379 if (hltTriggerCount_ > 0) {
380 hltTriggerBits_.resize(1 + (hltTriggerCount_ - 1) / 4);
394 for (
int i = 0;
i != toSkip; ++
i) {
397 if (evMsg ==
nullptr) {
411 desc.
setComment(
"Reads events from streamer files.");
413 desc.
addUntracked<std::vector<std::string> >(
"SelectEvents")
414 ->setComment(
"HLT path to select events ");
418 "Minimum number of events to process per lumisection, " 419 "before switching to a new input file. If the next file " 420 "does not yet exist, " 421 "the number of processed events will be bigger.");
425 "Skip (and ignore the minEventsPerLumi parameter) for the files " 426 "which have been available at the begining of the processing. " 427 "If set to true, the reader will open last available file for " 432 "Delete data files after they have been closed, in order to " 437 "Kill the processing as soon as the end-of-run file appears, even if " 438 "there are/will be unprocessed lumisections.");
446 desc.
addUntracked<
bool>(
"inputFileTransitionsEachEvent",
false);
452 descriptions.
add(
"source", desc);
DQMFileIterator::LumiEntry lumi_
T getUntrackedParameter(std::string const &, T const &) const
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
bool checkNextEvent() override
unsigned int lastLumiFound()
void hltTriggerBits(uint8 *put_here) const
void logLumiState(const LumiEntry &lumi, const std::string &msg)
volatile std::atomic< bool > shutdown_flag
std::shared_ptr< TriggerSelector > eventSelector_
EventMsgView const * getEventMsg()
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
char const * what() const override
void hltTriggerNames(Strings &save_here) const
void setComment(std::string const &value)
std::unique_ptr< edm::StreamerInputFile > streamFile_
std::string get_data_path() const
void addParameter(std::string const &name, T const &value)
void logFileAction(const std::string &msg, const std::string &fileName="") const
unsigned int processedEventPerLs_
void openFileImp_(const DQMFileIterator::LumiEntry &entry)
DQMStreamerReader(edm::ParameterSet const &pset, edm::InputSourceDescription const &desc)
std::vector< std::string > Strings
DQMFileIterator fiterator_
bool acceptEvent(const EventMsgView *)
~DQMStreamerReader() override
InitMsgView const * getHeaderMsg()
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)
bool matchTriggerSel(Strings const &tnames)
void advanceToLumi(unsigned int lumi, std::string reason)
EventMsgView const * prepareNextEvent()
static void fillDescription(edm::ParameterSetDescription &d)
struct dqmservices::DQMStreamerReader::OpenFile file_
void skip(int toSkip) override