File indexing completed on 2023-03-17 11:10:25
0001 #ifndef IOPool_Output_TimeoutPoolOutputModule_h
0002 #define IOPool_Output_TimeoutPoolOutputModule_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "IOPool/Output/interface/PoolOutputModule.h"
0017
0018 namespace edm {
0019 class ConfigurationDescriptions;
0020 class ModuleCallingContext;
0021 class ParameterSet;
0022
0023 class TimeoutPoolOutputModule : public PoolOutputModule {
0024 public:
0025 explicit TimeoutPoolOutputModule(ParameterSet const& ps);
0026 ~TimeoutPoolOutputModule() override{};
0027 TimeoutPoolOutputModule(TimeoutPoolOutputModule const&) = delete;
0028 TimeoutPoolOutputModule& operator=(TimeoutPoolOutputModule const&) = delete;
0029
0030 static void fillDescriptions(ConfigurationDescriptions& descriptions);
0031
0032 protected:
0033 bool shouldWeCloseFile() const override;
0034 void write(EventForOutput const& e) override;
0035
0036 private:
0037 mutable time_t m_lastEvent;
0038 mutable unsigned int eventsWrittenInCurrentFile;
0039 mutable int m_timeout;
0040 };
0041 }
0042
0043 #endif