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::one::OutputModule< WatchInputFiles > edm::one::OutputModuleBase edm::EDConsumerBase dqmservices::JsonWritingTimeoutPoolOutputModule

Public Member Functions

TimeoutPoolOutputModuleoperator= (TimeoutPoolOutputModule const &)=delete
 
 TimeoutPoolOutputModule (ParameterSet const &ps)
 
 TimeoutPoolOutputModule (TimeoutPoolOutputModule const &)=delete
 
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
 
std::string const & compressionAlgorithm () const
 
int const & compressionLevel () const
 
std::string const & currentFileName () const
 
DropMetaData const & dropMetaData () const
 
int 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
 
PoolOutputModuleoperator= (PoolOutputModule const &)=delete
 
bool const & overrideInputFileSplitLevels () const
 
 PoolOutputModule (ParameterSet const &ps)
 
 PoolOutputModule (PoolOutputModule const &)=delete
 
OutputItemListArray const & selectedOutputItemList () const
 
int const & splitLevel () const
 
int const & treeMaxVirtualSize () const
 
int const & whyNotFastClonable () const
 
virtual ~PoolOutputModule ()
 
- Public Member Functions inherited from edm::one::OutputModule< WatchInputFiles >
 OutputModule (edm::ParameterSet const &iPSet)
 
- Public Member Functions inherited from edm::one::OutputModuleBase
BranchChildren const & branchChildren () const
 
BranchIDLists const * branchIDLists () const
 
std::array< bool,
NumBranchTypes > const & 
hasNewlyDroppedBranch () const
 
SelectedProductsForBranchType
const & 
keptProducts () const
 
int maxEvents () const
 
const ModuleDescriptionmoduleDescription () const
 
OutputModuleBaseoperator= (OutputModuleBase const &)=delete
 
 OutputModuleBase (ParameterSet const &pset)
 
 OutputModuleBase (OutputModuleBase const &)=delete
 
std::string const & processName () const
 
int remainingEvents () const
 
bool selected (BranchDescription const &desc) const
 
void selectProducts (ProductRegistry const &preg, ThinnedAssociationsHelper const &)
 
ThinnedAssociationsHelper const * thinnedAssociationsHelper () const
 
bool wantAllEvents () const
 
virtual ~OutputModuleBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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, ModuleCallingContext const *) override
 
- Protected Member Functions inherited from edm::PoolOutputModule
virtual void doExtrasAfterCloseFile ()
 
virtual std::pair< std::string,
std::string > 
physicalAndLogicalNameForNewFile ()
 
- Protected Member Functions inherited from edm::one::OutputModuleBase
void configure (OutputModuleDescription const &desc)
 
ModuleDescription const & description () const
 
void doBeginJob ()
 
bool doBeginLuminosityBlock (LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
 
bool doBeginRun (RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
 
void doEndJob ()
 
bool doEndLuminosityBlock (LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
 
bool doEndRun (RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
 
bool doEvent (EventPrincipal const &ep, EventSetup const &c, ActivityRegistry *, ModuleCallingContext const *)
 
void doPreallocate (PreallocationConfiguration const &)
 
std::map< BranchID::value_type,
BranchID::value_type > const & 
droppedBranchIDToKeptBranchID ()
 
Trig getTriggerResults (EventPrincipal const &ep, ModuleCallingContext const *) const
 
ParameterSetID selectorConfig () const
 
void setEventSelectionInfo (std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Attributes

unsigned int eventsWrittenInCurrentFile
 
time_t m_lastEvent
 
int m_timeout
 

Additional Inherited Members

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

Detailed Description

Definition at line 22 of file TimeoutPoolOutputModule.h.

Constructor & Destructor Documentation

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

Definition at line 11 of file TimeoutPoolOutputModule.cc.

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

Definition at line 25 of file TimeoutPoolOutputModule.h.

25 {};
edm::TimeoutPoolOutputModule::TimeoutPoolOutputModule ( TimeoutPoolOutputModule const &  )
delete

Member Function Documentation

TimeoutPoolOutputModule& edm::TimeoutPoolOutputModule::operator= ( TimeoutPoolOutputModule const &  )
delete
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 19 of file TimeoutPoolOutputModule.cc.

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

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

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, ModuleCallingContext const *) override

Member Data Documentation

unsigned int edm::TimeoutPoolOutputModule::eventsWrittenInCurrentFile
mutableprivate

Definition at line 34 of file TimeoutPoolOutputModule.h.

Referenced by shouldWeCloseFile(), and write().

time_t edm::TimeoutPoolOutputModule::m_lastEvent
mutableprivate

Definition at line 33 of file TimeoutPoolOutputModule.h.

Referenced by shouldWeCloseFile().

int edm::TimeoutPoolOutputModule::m_timeout
mutableprivate

Definition at line 35 of file TimeoutPoolOutputModule.h.

Referenced by shouldWeCloseFile().