test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StreamerOutputModule.h
Go to the documentation of this file.
1 #ifndef IOPool_Streamer_StreamerOutputModule_h
2 #define IOPool_Streamer_StreamerOutputModule_h
3 
6 
7 namespace edm {
8  template<typename Consumer>
10 
19  public:
20  explicit StreamerOutputModule(ParameterSet const& ps);
21  virtual ~StreamerOutputModule();
22  static void fillDescriptions(ConfigurationDescriptions& descriptions);
23 
24  private:
25  virtual void start() const;
26  virtual void stop() const;
27  virtual void doOutputHeader(InitMsgBuilder const& init_message) const;
28  virtual void doOutputEvent(EventMsgBuilder const& msg) const;
31 
32  private:
33  std::auto_ptr<Consumer> c_;
34  }; //end-of-class-def
35 
36  template<typename Consumer>
38  edm::one::OutputModuleBase::OutputModuleBase(ps),
40  c_(new Consumer(ps))
41  {
42  }
43 
44  template<typename Consumer>
46 
47  template<typename Consumer>
48  void
50  c_->start();
51  }
52 
53  template<typename Consumer>
54  void
56  c_->stop();
57  }
58 
59  template<typename Consumer>
60  void
62  c_->doOutputHeader(init_message);
63  }
64 
65 //______________________________________________________________________________
66  template<typename Consumer>
67  void
69  c_->doOutputEvent(msg); // You can't use msg in StreamerOutputModule after this point
70  }
71 
72  template<typename Consumer>
73  void
75 
76  template<typename Consumer>
77  void
79 
80  template<typename Consumer>
81  void
85  Consumer::fillDescription(desc);
86  descriptions.add("streamerOutput", desc);
87  }
88 } // end of namespace-edm
89 
90 #endif
static void fillDescription(ParameterSetDescription &desc)
virtual void doOutputEvent(EventMsgBuilder const &msg) const
std::auto_ptr< Consumer > c_
virtual void beginLuminosityBlock(edm::LuminosityBlockPrincipal const &, edm::ModuleCallingContext const *) override
StreamerOutputModule(ParameterSet const &ps)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
virtual void doOutputHeader(InitMsgBuilder const &init_message) const
virtual void endLuminosityBlock(edm::LuminosityBlockPrincipal const &, edm::ModuleCallingContext const *) override
virtual void start() const
virtual void stop() const