CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TimeoutPoolOutputModule.h
Go to the documentation of this file.
1 #ifndef IOPool_Output_TimeoutPoolOutputModule_h
2 #define IOPool_Output_TimeoutPoolOutputModule_h
3 
5 //
6 // Class TimeoutPoolOutputModule. Output module to POOL file with file
7 // closure based on timeout. First file has only one event, second
8 // file is closed after 15 seconds if at least one event was processed.
9 // Then timeout is increased to 30 seconds and 60 seconds. After that
10 // all other files are closed with timeout of 60 seconds.
11 //
12 // Created by Dmytro.Kovalskyi@cern.ch
13 //
15 
17 
18 namespace edm {
19  class ParameterSet;
20 
22  public:
23  explicit TimeoutPoolOutputModule(ParameterSet const& ps);
25  TimeoutPoolOutputModule(TimeoutPoolOutputModule const&) = delete; // Disallow copying and moving
26  TimeoutPoolOutputModule& operator=(TimeoutPoolOutputModule const&) = delete; // Disallow copying and moving
27  protected:
28  virtual bool shouldWeCloseFile() const;
29  virtual void write(EventPrincipal const& e);
30 
31  private:
32  mutable time_t m_lastEvent;
33  mutable unsigned int eventsWrittenInCurrentFile;
34  mutable int m_timeout;
35  };
36 }
37 
38 #endif
virtual bool shouldWeCloseFile() const
allow inheriting classes to override but still be able to call this method in the overridden version ...
TimeoutPoolOutputModule(ParameterSet const &ps)
TimeoutPoolOutputModule & operator=(TimeoutPoolOutputModule const &)=delete
virtual void write(EventPrincipal const &e)