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 IOPool_DQMStreamer_DQMStreamerReader_h
2 #define IOPool_DQMStreamer_DQMStreamerReader_h
3 
6 
7 #include "DQMFileIterator.h"
8 #include "TriggerSelector.h"
9 
10 #include "boost/shared_ptr.hpp"
11 #include "boost/filesystem.hpp"
12 
13 #include <memory>
14 #include <string>
15 #include <vector>
16 #include <iterator>
17 #include <boost/property_tree/json_parser.hpp>
18 #include <boost/property_tree/ptree.hpp>
19 
20 class EventMsgView;
21 class InitMsgView;
22 
23 namespace edm {
25 class EventPrincipal;
26 class EventSkipperByID;
27 struct InputSourceDescription;
28 class ParameterSet;
29 class StreamerInputFile;
30 
32  public:
33  DQMStreamerReader(ParameterSet const& pset,
34  InputSourceDescription const& desc);
35  virtual ~DQMStreamerReader();
36 
37  bool newHeader();
38  static void fillDescriptions(ConfigurationDescriptions& descriptions);
39 
40  typedef std::vector<std::string> Strings;
41 
42  protected:
43  virtual bool checkNextEvent(); /* from raw input source */
44  virtual void skip(int toSkip); /* from raw input source */
45 
46  private:
47  // our own, but we do inherit reset(),
48  // which will break things if called
49  void reset_();
50 
52  bool openNextFile_();
53  void closeFile_();
54 
55  InitMsgView const* getHeaderMsg();
56  EventMsgView const* getEventMsg();
57 
59  bool prepareNextFile();
60  bool acceptEvent( const EventMsgView*);
61 
62  bool triggerSel();
63  bool matchTriggerSel(Strings const& tnames);
66 
67  unsigned int runNumber_;
71 
72  unsigned int processedEventPerLs_;
73  unsigned int minEventsPerLs_;
74 
78 
80 
81  std::unique_ptr<StreamerInputFile> streamReader_;
82  boost::shared_ptr<EventSkipperByID> eventSkipperByID_;
84 };
85 
86 } //end-of-namespace-def
87 
88 #endif
bool acceptEvent(const EventMsgView *)
DQMStreamerReader(ParameterSet const &pset, InputSourceDescription const &desc)
std::vector< std::string > Strings
bool matchTriggerSel(Strings const &tnames)
void openFile_(std::string filename)
InitMsgView const * getHeaderMsg()
TriggerSelectorPtr eventSelector_
EventMsgView const * prepareNextEvent()
std::unique_ptr< StreamerInputFile > streamReader_
static void fillDescriptions(ConfigurationDescriptions &descriptions)
boost::shared_ptr< TriggerSelector > TriggerSelectorPtr
unsigned int processedEventPerLs_
EventMsgView const * getEventMsg()
DQMFileIterator fiterator_
tuple filename
Definition: lut2db_cfg.py:20
virtual void skip(int toSkip)
boost::shared_ptr< EventSkipperByID > eventSkipperByID_