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;
29 
30  private:
31  std::auto_ptr<Consumer> c_;
32  }; //end-of-class-def
33 
34  template<typename Consumer>
37  c_(new Consumer(ps)) {
38  }
39 
40  template<typename Consumer>
42 
43  template<typename Consumer>
44  void
46  c_->start();
47  }
48 
49  template<typename Consumer>
50  void
52  c_->stop();
53  }
54 
55  template<typename Consumer>
56  void
58  c_->doOutputHeader(init_message);
59  }
60 
61 //______________________________________________________________________________
62  template<typename Consumer>
63  void
65  c_->doOutputEvent(msg); // You can't use msg in StreamerOutputModule after this point
66  }
67 
68  template<typename Consumer>
69  void
73  Consumer::fillDescription(desc);
74  descriptions.add("streamerOutput", desc);
75  }
76 } // end of namespace-edm
77 
78 #endif
static void fillDescription(ParameterSetDescription &desc)
virtual void doOutputEvent(EventMsgBuilder const &msg) const
std::auto_ptr< Consumer > c_
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 start() const
virtual void stop() const