21 #include <boost/regex.hpp>
22 #include <boost/format.hpp>
23 #include <boost/range.hpp>
24 #include <boost/filesystem.hpp>
61 "Waiting for the first lumi in order to initialize.");
79 "End of run reached before DQMStreamerReader was initialised.");
110 header->hltTriggerNames(tnames);
120 unlink(newStreamerFile_.c_str());
138 if (boost::filesystem::exists(p)) {
154 <<
"received wrong message type: expected INIT, got " << header->
code()
247 if (!next)
return nullptr;
257 if (eview ==
nullptr) {
278 if (eview ==
nullptr) {
299 std::vector<unsigned char> hltTriggerBits_;
300 int hltTriggerCount_ = evtmsg->
hltCount();
301 if (hltTriggerCount_ > 0) {
302 hltTriggerBits_.resize(1 + (hltTriggerCount_ - 1) / 4);
315 for (
int i = 0;
i != toSkip; ++
i) {
318 if (evMsg ==
nullptr) {
334 desc.
setComment(
"Reads events from streamer files.");
336 desc.
addUntracked<std::vector<std::string> >(
"SelectEvents")
337 ->setComment(
"HLT path to select events ");
339 desc.
addUntracked<
int>(
"minEventsPerLumi", 1)->setComment(
340 "Minimum number of events to process per lumisection, "
341 "before switching to a new input file. If the next file "
342 "does not yet exist, "
343 "the number of processed events will be bigger.");
345 desc.
addUntracked<
bool>(
"skipFirstLumis",
false)->setComment(
346 "Skip (and ignore the minEventsPerLumi parameter) for the files "
347 "which have been available at the begining of the processing. "
348 "If set to true, the reader will open last available file for "
351 desc.
addUntracked<
bool>(
"deleteDatFiles",
false)->setComment(
352 "Delete data files after they have been closed, in order to "
355 desc.
addUntracked<
bool>(
"endOfRunKills",
false)->setComment(
356 "Kill the processing as soon as the end-of-run file appears, even if "
357 "there are/will be unprocessed lumisections.");
365 desc.
addUntracked<
bool>(
"inputFileTransitionsEachEvent",
false);
371 descriptions.
add(
"source", desc);
T getUntrackedParameter(std::string const &, T const &) const
bool acceptEvent(const EventMsgView *)
std::string make_path_data(const LumiEntry &lumi)
virtual bool checkNextEvent()
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void hltTriggerBits(uint8 *put_here) const
virtual ~DQMStreamerReader()
DQMStreamerReader(ParameterSet const &pset, InputSourceDescription const &desc)
void advanceToLumi(unsigned int lumi)
std::vector< std::string > Strings
void setComment(std::string const &value)
void openFile_(std::string filename)
InitMsgView const * getHeaderMsg()
TriggerSelectorPtr eventSelector_
EventMsgView const * prepareNextEvent()
const LumiEntry & front()
std::unique_ptr< StreamerInputFile > streamReader_
void addParameter(std::string const &name, T const &value)
void logFileAction(const std::string &msg, const std::string &fileName="") const
static void fillDescriptions(ConfigurationDescriptions &descriptions)
static void fillDescription(ParameterSetDescription &d)
unsigned int lastLumiFound()
unsigned int processedEventPerLs_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
EventMsgView const * getEventMsg()
static void fillDescription(ParameterSetDescription &desc)
DQMFileIterator fiterator_
unsigned int minEventsPerLs_
virtual void skip(int toSkip)
boost::shared_ptr< EventSkipperByID > eventSkipperByID_