CMS 3D CMS Logo

StreamerOutputModuleBase.h
Go to the documentation of this file.
1 #ifndef IOPool_Streamer_StreamerOutputModuleBase_h
2 #define IOPool_Streamer_StreamerOutputModuleBase_h
3 
8 #include <memory>
9 #include <vector>
10 
11 class InitMsgBuilder;
12 class EventMsgBuilder;
13 namespace edm {
15 
17 
18  class StreamerOutputModuleBase : public one::OutputModule<one::WatchRuns, one::WatchLuminosityBlocks> {
19  public:
20  explicit StreamerOutputModuleBase(ParameterSet const& ps);
21  ~StreamerOutputModuleBase() override;
22  static void fillDescription(ParameterSetDescription & desc);
23 
24  private:
25  void beginRun(RunForOutput const&) override;
26  void endRun(RunForOutput const&) override;
27  void beginJob() override;
28  void endJob() override;
29  void writeRun(RunForOutput const&) override;
30  void writeLuminosityBlock(LuminosityBlockForOutput const&) override;
31  void write(EventForOutput const& e) override;
32 
33  virtual void start() = 0;
34  virtual void stop() = 0;
35  virtual void doOutputHeader(InitMsgBuilder const& init_message) = 0;
36  virtual void doOutputEvent(EventMsgBuilder const& msg) = 0;
37 
38  std::unique_ptr<InitMsgBuilder> serializeRegistry();
39  std::unique_ptr<EventMsgBuilder> serializeEvent(EventForOutput const& e);
40  Trig getTriggerResults(EDGetTokenT<TriggerResults> const& token, EventForOutput const& e) const;
41  void setHltMask(EventForOutput const& e);
42  void setLumiSection();
43 
44  private:
46 
50 
51  // test luminosity sections
54 
56 
58 
59  //Event variables, made class memebers to avoid re instatiation for each event.
60  unsigned int hltsize_;
62  std::vector<bool> l1bit_;
63  std::vector<unsigned char> hltbits_;
65  char host_name_[255];
66 
70  }; //end-of-class-def
71 } // end of namespace-edm
72 
73 #endif
std::unique_ptr< EventMsgBuilder > serializeEvent(EventForOutput const &e)
static void fillDescription(ParameterSetDescription &desc)
Trig getTriggerResults(EDGetTokenT< TriggerResults > const &token, EventForOutput const &e) const
virtual void doOutputHeader(InitMsgBuilder const &init_message)=0
EventSelector::Strings Strings
void endRun(RunForOutput const &) override
void write(EventForOutput const &e) override
detail::TriggerResultsBasedEventSelector::handle_t Trig
Definition: OutputModule.h:49
std::vector< std::pair< BranchDescription const *, EDGetToken > > SelectedProducts
void beginRun(RunForOutput const &) override
void writeLuminosityBlock(LuminosityBlockForOutput const &) override
virtual void doOutputEvent(EventMsgBuilder const &msg)=0
unsigned int uint32
Definition: MsgTools.h:13
StreamerOutputModuleBase(ParameterSet const &ps)
SelectedProducts const * selections_
std::unique_ptr< InitMsgBuilder > serializeRegistry()
edm::EDGetTokenT< edm::TriggerResults > trToken_
tuple msg
Definition: mps_check.py:277
void setHltMask(EventForOutput const &e)
void writeRun(RunForOutput const &) override
HLT enums.
std::vector< unsigned char > hltbits_