test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DQMStreamerReader.h
Go to the documentation of this file.
1 #ifndef DQMServices_StreamerIO_DQMStreamerReader_h
2 #define DQMServices_StreamerIO_DQMStreamerReader_h
3 
8 
9 #include "DQMFileIterator.h"
10 #include "DQMMonitoringService.h"
11 #include "TriggerSelector.h"
12 
13 #include "boost/filesystem.hpp"
14 
15 #include <memory>
16 #include <string>
17 #include <vector>
18 #include <iterator>
19 #include <boost/property_tree/json_parser.hpp>
20 #include <boost/property_tree/ptree.hpp>
21 
22 namespace dqmservices {
23 
25  public:
27  edm::InputSourceDescription const& desc);
28  virtual ~DQMStreamerReader();
29 
30  bool newHeader();
31  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
32 
33  typedef std::vector<std::string> Strings;
34 
35  protected:
36  virtual bool checkNextEvent(); /* from raw input source */
37  virtual void skip(int toSkip); /* from raw input source */
38 
39  private:
40  // our own, but we do inherit reset(),
41  // which will break things if called
42  void reset_();
43 
45  void closeFile_(const std::string& reason);
46 
47  bool openNextFile_();
48 
49  InitMsgView const* getHeaderMsg();
50  EventMsgView const* getEventMsg();
51 
53  bool prepareNextFile();
54  bool acceptEvent(const EventMsgView*);
55 
56  bool triggerSel();
57  bool matchTriggerSel(Strings const& tnames);
60 
61  unsigned int runNumber_;
65 
66  unsigned int processedEventPerLs_;
67  unsigned int minEventsPerLs_;
68 
72 
74 
75  struct OpenFile {
76  std::unique_ptr<edm::StreamerInputFile> streamFile_;
78 
79  bool open() { return (streamFile_.get() != nullptr); }
80 
81  } file_;
82 
83  std::shared_ptr<edm::EventSkipperByID> eventSkipperByID_;
84  std::shared_ptr<TriggerSelector> eventSelector_;
85 
86  /* this is for monitoring */
88 };
89 
90 } // end-of-namespace-def
91 
92 #endif
std::shared_ptr< TriggerSelector > eventSelector_
EventMsgView const * getEventMsg()
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void openFile_(const DQMFileIterator::LumiEntry &entry)
std::unique_ptr< edm::StreamerInputFile > streamFile_
virtual void skip(int toSkip)
virtual void closeFile_() overridefinal
DQMStreamerReader(edm::ParameterSet const &pset, edm::InputSourceDescription const &desc)
std::vector< std::string > Strings
bool acceptEvent(const EventMsgView *)
InitMsgView const * getHeaderMsg()
edm::Service< DQMMonitoringService > mon_
std::shared_ptr< edm::EventSkipperByID > eventSkipperByID_
list entry
Definition: mps_splice.py:62
bool matchTriggerSel(Strings const &tnames)
EventMsgView const * prepareNextEvent()
struct dqmservices::DQMStreamerReader::OpenFile file_