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/shared_ptr.hpp"
14 #include "boost/filesystem.hpp"
15 
16 #include <memory>
17 #include <string>
18 #include <vector>
19 #include <iterator>
20 #include <boost/property_tree/json_parser.hpp>
21 #include <boost/property_tree/ptree.hpp>
22 
23 namespace dqmservices {
24 
26  public:
28  edm::InputSourceDescription const& desc);
29  virtual ~DQMStreamerReader();
30 
31  bool newHeader();
32  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
33 
34  typedef std::vector<std::string> Strings;
35 
36  protected:
37  virtual bool checkNextEvent(); /* from raw input source */
38  virtual void skip(int toSkip); /* from raw input source */
39 
40  private:
41  // our own, but we do inherit reset(),
42  // which will break things if called
43  void reset_();
44 
46  bool openNextFile_();
47  void closeFile_();
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  std::unique_ptr<edm::StreamerInputFile> streamReader_;
76  boost::shared_ptr<edm::EventSkipperByID> eventSkipperByID_;
77  std::shared_ptr<TriggerSelector> eventSelector_;
78 
79  /* this is for monitoring */
81 };
82 
83 } //end-of-namespace-def
84 
85 #endif
std::shared_ptr< TriggerSelector > eventSelector_
EventMsgView const * getEventMsg()
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::unique_ptr< edm::StreamerInputFile > streamReader_
virtual void skip(int toSkip)
void openFile_(std::string filename)
DQMStreamerReader(edm::ParameterSet const &pset, edm::InputSourceDescription const &desc)
std::vector< std::string > Strings
boost::shared_ptr< edm::EventSkipperByID > eventSkipperByID_
bool acceptEvent(const EventMsgView *)
InitMsgView const * getHeaderMsg()
edm::Service< DQMMonitoringService > mon_
tuple filename
Definition: lut2db_cfg.py:20
bool matchTriggerSel(Strings const &tnames)
EventMsgView const * prepareNextEvent()