CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
edm::OutputModuleCommunicatorT< T > Class Template Reference

#include <OutputModuleBase.h>

Inheritance diagram for edm::OutputModuleCommunicatorT< T >:
edm::OutputModuleCommunicator

Public Member Functions

virtual void closeFile () override
 
virtual void configure (edm::OutputModuleDescription const &desc) override
 
virtual ModuleDescription const & description () const override
 
virtual edm::SelectedProductsForBranchType const & keptProducts () const override
 
virtual bool limitReached () const override
 
virtual void openFile (edm::FileBlock const &fb) override
 
virtual void openNewFileIfNeeded () override
 
 OutputModuleCommunicatorT (T *iModule)
 
virtual void selectProducts (edm::ProductRegistry const &preg, ThinnedAssociationsHelper const &) override
 
virtual void setEventSelectionInfo (std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced) override
 
virtual bool shouldWeCloseFile () const override
 
virtual bool wantAllEvents () const override
 
virtual void writeLumi (edm::LuminosityBlockPrincipal const &lbp, ProcessContext const *) override
 
virtual void writeRun (edm::RunPrincipal const &rp, ProcessContext const *) override
 
- Public Member Functions inherited from edm::OutputModuleCommunicator
 OutputModuleCommunicator ()=default
 
virtual ~OutputModuleCommunicator ()
 

Static Public Member Functions

static std::unique_ptr< edm::OutputModuleCommunicatorcreateIfNeeded (T *iMod)
 

Private Member Functions

Tmodule () const
 

Private Attributes

Tmodule_
 

Detailed Description

template<typename T>
class edm::OutputModuleCommunicatorT< T >

Definition at line 53 of file OutputModuleBase.h.

Constructor & Destructor Documentation

template<typename T >
edm::OutputModuleCommunicatorT< T >::OutputModuleCommunicatorT ( T iModule)
inline

Member Function Documentation

template<typename T >
void edm::OutputModuleCommunicatorT< T >::closeFile ( )
overridevirtual
template<typename T >
void edm::OutputModuleCommunicatorT< T >::configure ( edm::OutputModuleDescription const &  desc)
overridevirtual

Implements edm::OutputModuleCommunicator.

Definition at line 78 of file OutputModuleCommunicatorT.cc.

References python.rootplot.argparse::module.

78 {module().configure(desc);}
template<typename T >
static std::unique_ptr<edm::OutputModuleCommunicator> edm::OutputModuleCommunicatorT< T >::createIfNeeded ( T iMod)
inlinestatic

Definition at line 62 of file OutputModuleCommunicatorT.h.

References edm::impl::createCommunicatorIfNeeded(), and eostools::move().

62  {
64  }
std::unique_ptr< edm::OutputModuleCommunicator > createCommunicatorIfNeeded(void *)
def move(src, dest)
Definition: eostools.py:510
template<typename T >
ModuleDescription const & edm::OutputModuleCommunicatorT< T >::description ( ) const
overridevirtual

Implements edm::OutputModuleCommunicator.

Definition at line 97 of file OutputModuleCommunicatorT.cc.

References python.rootplot.argparse::module.

97  {
98  return module().description();
99  }
template<typename T >
edm::SelectedProductsForBranchType const & edm::OutputModuleCommunicatorT< T >::keptProducts ( ) const
overridevirtual

Implements edm::OutputModuleCommunicator.

Definition at line 81 of file OutputModuleCommunicatorT.cc.

References python.rootplot.argparse::module.

81  {
82  return module().keptProducts();
83  }
template<typename T >
bool edm::OutputModuleCommunicatorT< T >::limitReached ( ) const
overridevirtual
Returns
true if OutputModule has reached its limit on maximum number of events it wants to see

Implements edm::OutputModuleCommunicator.

Definition at line 75 of file OutputModuleCommunicatorT.cc.

References python.rootplot.argparse::module.

75 {return module().limitReached();}
template<typename T >
T& edm::OutputModuleCommunicatorT< T >::module ( ) const
inlineprivate

Definition at line 67 of file OutputModuleCommunicatorT.h.

References sistrip::module_.

template<typename T >
void edm::OutputModuleCommunicatorT< T >::openFile ( edm::FileBlock const &  fb)
overridevirtual
template<typename T >
void edm::OutputModuleCommunicatorT< T >::openNewFileIfNeeded ( )
overridevirtual

Implements edm::OutputModuleCommunicator.

Definition at line 31 of file OutputModuleCommunicatorT.cc.

References python.rootplot.argparse::module.

31  {
32  module().maybeOpenFile();
33  }
template<typename T >
void edm::OutputModuleCommunicatorT< T >::selectProducts ( edm::ProductRegistry const &  preg,
ThinnedAssociationsHelper const &  helper 
)
overridevirtual

Implements edm::OutputModuleCommunicator.

Definition at line 86 of file OutputModuleCommunicatorT.cc.

References python.rootplot.argparse::module.

86  {
87  module().selectProducts(preg, helper);
88  }
Definition: helper.py:1
template<typename T >
void edm::OutputModuleCommunicatorT< T >::setEventSelectionInfo ( std::map< std::string, std::vector< std::pair< std::string, int > > > const &  outputModulePathPositions,
bool  anyProductProduced 
)
overridevirtual

Implements edm::OutputModuleCommunicator.

Definition at line 91 of file OutputModuleCommunicatorT.cc.

References python.rootplot.argparse::module.

92  {
93  module().setEventSelectionInfo(outputModulePathPositions, anyProductProduced);
94  }
template<typename T >
bool edm::OutputModuleCommunicatorT< T >::shouldWeCloseFile ( ) const
overridevirtual
Returns
true if output module wishes to close its file

Implements edm::OutputModuleCommunicator.

Definition at line 25 of file OutputModuleCommunicatorT.cc.

References python.rootplot.argparse::module.

25  {
26  return module().shouldWeCloseFile();
27  }
template<typename T >
bool edm::OutputModuleCommunicatorT< T >::wantAllEvents ( ) const
overridevirtual
Returns
true if no event filtering is applied to OutputModule

Implements edm::OutputModuleCommunicator.

Definition at line 72 of file OutputModuleCommunicatorT.cc.

References python.rootplot.argparse::module.

72 {return module().wantAllEvents();}
template<typename T >
void edm::OutputModuleCommunicatorT< T >::writeLumi ( edm::LuminosityBlockPrincipal const &  lbp,
ProcessContext const *  processContext 
)
overridevirtual

Implements edm::OutputModuleCommunicator.

Definition at line 58 of file OutputModuleCommunicatorT.cc.

References edm::LuminosityBlockPrincipal::beginTime(), heppy_report::description, edm::LuminosityBlockPrincipal::id(), edm::RunPrincipal::index(), edm::LuminosityBlockPrincipal::index(), edm::GlobalContext::kWriteLuminosityBlock, python.rootplot.argparse::module, and edm::LuminosityBlockPrincipal::runPrincipal().

58  {
59  GlobalContext globalContext(GlobalContext::Transition::kWriteLuminosityBlock,
60  lbp.id(),
61  lbp.runPrincipal().index(),
62  lbp.index(),
63  lbp.beginTime(),
64  processContext);
65  ParentContext parentContext(&globalContext);
66  ModuleCallingContext mcc(&description());
67  ModuleContextSentry moduleContextSentry(&mcc, parentContext);
68  module().doWriteLuminosityBlock(lbp, &mcc);
69  }
virtual ModuleDescription const & description() const override
template<typename T >
void edm::OutputModuleCommunicatorT< T >::writeRun ( edm::RunPrincipal const &  rp,
ProcessContext const *  processContext 
)
overridevirtual

Implements edm::OutputModuleCommunicator.

Definition at line 43 of file OutputModuleCommunicatorT.cc.

References heppy_report::description, edm::RunPrincipal::endTime(), edm::RunPrincipal::index(), edm::LuminosityBlockIndex::invalidLuminosityBlockIndex(), edm::GlobalContext::kWriteRun, python.rootplot.argparse::module, and edm::RunPrincipal::run().

43  {
44  GlobalContext globalContext(GlobalContext::Transition::kWriteRun,
45  LuminosityBlockID(rp.run(), 0),
46  rp.index(),
48  rp.endTime(),
49  processContext);
50  ParentContext parentContext(&globalContext);
51  ModuleCallingContext mcc(&description());
52  ModuleContextSentry moduleContextSentry(&mcc, parentContext);
53  module().doWriteRun(rp, &mcc);
54  }
virtual ModuleDescription const & description() const override
static LuminosityBlockIndex invalidLuminosityBlockIndex()

Member Data Documentation

template<typename T >
T* edm::OutputModuleCommunicatorT< T >::module_
private

Definition at line 68 of file OutputModuleCommunicatorT.h.