CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
edm::TimeoutPoolOutputModule Class Reference

#include <TimeoutPoolOutputModule.h>

Inheritance diagram for edm::TimeoutPoolOutputModule:
edm::PoolOutputModule edm::OutputModule

Public Member Functions

 TimeoutPoolOutputModule (ParameterSet const &ps)
 
virtual ~TimeoutPoolOutputModule ()
 
- Public Member Functions inherited from edm::PoolOutputModule
AuxItemArray const & auxItems () const
 
std::string const & basketOrder () const
 
int const & basketSize () const
 
std::string const & catalog () const
 
int const & compressionLevel () const
 
std::string const & currentFileName () const
 
DropMetaData const & dropMetaData () const
 
int const eventAutoFlushSize () const
 
std::string const & fileName () const
 
int const & inputFileCount () const
 
std::string const & logicalFileName () const
 
unsigned int const & maxFileSize () const
 
std::string const & moduleLabel () const
 
bool const & overrideInputFileSplitLevels () const
 
 PoolOutputModule (ParameterSet const &ps)
 
OutputItemListArray const & selectedOutputItemList () const
 
int const & splitLevel () const
 
int const & treeMaxVirtualSize () const
 
int const & whyNotFastClonable () const
 
virtual ~PoolOutputModule ()
 
- Public Member Functions inherited from edm::OutputModule
BranchChildren const & branchChildren () const
 
boost::array< bool,
NumBranchTypes > const & 
hasNewlyDroppedBranch () const
 
SelectionsArray const & keptProducts () const
 
int maxEvents () const
 
 OutputModule (ParameterSet const &pset)
 
std::string const & processName () const
 
int remainingEvents () const
 
bool selected (BranchDescription const &desc) const
 
void selectProducts ()
 
bool wantAllEvents () const
 
virtual ~OutputModule ()
 

Protected Member Functions

virtual bool shouldWeCloseFile () const
 allow inheriting classes to override but still be able to call this method in the overridden version More...
 
virtual void write (EventPrincipal const &e)
 
- Protected Member Functions inherited from edm::OutputModule
CurrentProcessingContext const * currentContext () const
 
ModuleDescription const & description () const
 
void doBeginJob ()
 
bool doBeginLuminosityBlock (LuminosityBlockPrincipal const &lbp, EventSetup const &c, CurrentProcessingContext const *cpc)
 
bool doBeginRun (RunPrincipal const &rp, EventSetup const &c, CurrentProcessingContext const *cpc)
 
void doEndJob ()
 
bool doEndLuminosityBlock (LuminosityBlockPrincipal const &lbp, EventSetup const &c, CurrentProcessingContext const *cpc)
 
bool doEndRun (RunPrincipal const &rp, EventSetup const &c, CurrentProcessingContext const *cpc)
 
bool doEvent (EventPrincipal const &ep, EventSetup const &c, CurrentProcessingContext const *cpc)
 
Trig getTriggerResults (Event const &ep) const
 
Trig getTriggerResults (EventPrincipal const &ep) const
 
ParameterSetID selectorConfig () const
 

Private Attributes

unsigned int eventsWrittenInCurrentFile
 
time_t m_lastEvent
 
int m_timeout
 

Additional Inherited Members

- Public Types inherited from edm::PoolOutputModule
typedef boost::array< AuxItem,
NumBranchTypes
AuxItemArray
 
enum  DropMetaData { DropNone, DropDroppedPrior, DropPrior, DropAll }
 
typedef std::vector< OutputItemOutputItemList
 
typedef boost::array
< OutputItemList,
NumBranchTypes
OutputItemListArray
 
- Public Types inherited from edm::OutputModule
typedef OutputModule ModuleType
 
typedef OutputWorker WorkerType
 
- Static Public Member Functions inherited from edm::PoolOutputModule
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::OutputModule
static const std::string & baseType ()
 
static void fillDescription (ParameterSetDescription &desc)
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 21 of file TimeoutPoolOutputModule.h.

Constructor & Destructor Documentation

edm::TimeoutPoolOutputModule::TimeoutPoolOutputModule ( ParameterSet const &  ps)
explicit

Definition at line 11 of file TimeoutPoolOutputModule.cc.

11  :
12  PoolOutputModule(ps),
15  m_timeout(-1) // we want the first event right away
16  { }
#define NULL
Definition: scimark2.h:8
PoolOutputModule(ParameterSet const &ps)
virtual edm::TimeoutPoolOutputModule::~TimeoutPoolOutputModule ( )
inlinevirtual

Definition at line 24 of file TimeoutPoolOutputModule.h.

24 {};

Member Function Documentation

bool edm::TimeoutPoolOutputModule::shouldWeCloseFile ( ) const
protectedvirtual

allow inheriting classes to override but still be able to call this method in the overridden version

Reimplemented from edm::PoolOutputModule.

Definition at line 18 of file TimeoutPoolOutputModule.cc.

References edm::PoolOutputModule::currentFileName(), eventsWrittenInCurrentFile, m_lastEvent, m_timeout, cmsPerfSuiteHarvest::now, NULL, edm::PoolOutputModule::shouldWeCloseFile(), and cond::rpcobgas::time.

18  {
19  time_t now(time(NULL));
21  edm::LogVerbatim("TimeoutPoolOutputModule") <<" Closing file "<< currentFileName()<< " with "<< eventsWrittenInCurrentFile <<" events.";
23  m_lastEvent = now;
24  return true;
25  }
26  // std::cout <<" Events "<< eventsWrittenInCurrentFile<<" time "<< now - m_lastEvent<<std::endl;
27  if (eventsWrittenInCurrentFile==0) return false;
28  if ( now - m_lastEvent < m_timeout ) return false;
29  // next files are needed in 15, 30 and 60 sec
30  m_lastEvent = now;
31  if (m_timeout == 30) m_timeout = 60;
32  if (m_timeout == 15) m_timeout = 30;
33  if (m_timeout == -1) m_timeout = 15;
34 
35  edm::LogVerbatim("TimeoutPoolOutputModule") <<" Closing file "<< currentFileName()<< " with "<< eventsWrittenInCurrentFile <<" events.";
37  return true;
38  }
#define NULL
Definition: scimark2.h:8
virtual bool shouldWeCloseFile() const
allow inheriting classes to override but still be able to call this method in the overridden version ...
std::string const & currentFileName() const
void edm::TimeoutPoolOutputModule::write ( EventPrincipal const &  e)
protectedvirtual

Reimplemented from edm::PoolOutputModule.

Definition at line 6 of file TimeoutPoolOutputModule.cc.

References eventsWrittenInCurrentFile, and edm::PoolOutputModule::write().

6  {
9  }
virtual void write(EventPrincipal const &e)

Member Data Documentation

unsigned int edm::TimeoutPoolOutputModule::eventsWrittenInCurrentFile
mutableprivate

Definition at line 31 of file TimeoutPoolOutputModule.h.

Referenced by shouldWeCloseFile(), and write().

time_t edm::TimeoutPoolOutputModule::m_lastEvent
mutableprivate

Definition at line 30 of file TimeoutPoolOutputModule.h.

Referenced by shouldWeCloseFile().

int edm::TimeoutPoolOutputModule::m_timeout
mutableprivate

Definition at line 32 of file TimeoutPoolOutputModule.h.

Referenced by shouldWeCloseFile().