CMS 3D CMS Logo

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 {
20  class ModuleCallingContext;
21  class ParameterSet;
22 
24  public:
25  explicit TimeoutPoolOutputModule(ParameterSet const& ps);
27  TimeoutPoolOutputModule(TimeoutPoolOutputModule const&) = delete; // Disallow copying and moving
28  TimeoutPoolOutputModule& operator=(TimeoutPoolOutputModule const&) = delete; // Disallow copying and moving
29 
30  static void fillDescriptions(ConfigurationDescriptions& descriptions);
31 
32  protected:
33  bool shouldWeCloseFile() const override;
34  void write(EventForOutput const& e) override;
35 
36  private:
37  mutable time_t m_lastEvent;
38  mutable unsigned int eventsWrittenInCurrentFile;
39  mutable int m_timeout;
40  };
41 } // namespace edm
42 
43 #endif
edm::TimeoutPoolOutputModule::operator=
TimeoutPoolOutputModule & operator=(TimeoutPoolOutputModule const &)=delete
edm::TimeoutPoolOutputModule::TimeoutPoolOutputModule
TimeoutPoolOutputModule(ParameterSet const &ps)
Definition: TimeoutPoolOutputModule.cc:13
PoolOutputModule.h
edm::TimeoutPoolOutputModule::m_timeout
int m_timeout
Definition: TimeoutPoolOutputModule.h:39
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::TimeoutPoolOutputModule::write
void write(EventForOutput const &e) override
Definition: TimeoutPoolOutputModule.cc:8
edm::PoolOutputModule
Definition: PoolOutputModule.h:39
edm::TimeoutPoolOutputModule::eventsWrittenInCurrentFile
unsigned int eventsWrittenInCurrentFile
Definition: TimeoutPoolOutputModule.h:38
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
edm::TimeoutPoolOutputModule::shouldWeCloseFile
bool shouldWeCloseFile() const override
allow inheriting classes to override but still be able to call this method in the overridden version
Definition: TimeoutPoolOutputModule.cc:27
edm::ParameterSet
Definition: ParameterSet.h:47
ParameterSet
Definition: Functions.h:16
edm::TimeoutPoolOutputModule::fillDescriptions
static void fillDescriptions(ConfigurationDescriptions &descriptions)
Definition: TimeoutPoolOutputModule.cc:21
edm::EventForOutput
Definition: EventForOutput.h:50
edm::TimeoutPoolOutputModule::m_lastEvent
time_t m_lastEvent
Definition: TimeoutPoolOutputModule.h:37
ConfigurationDescriptions
edm::TimeoutPoolOutputModule::~TimeoutPoolOutputModule
~TimeoutPoolOutputModule() override
Definition: TimeoutPoolOutputModule.h:26
edm::TimeoutPoolOutputModule
Definition: TimeoutPoolOutputModule.h:23
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37