CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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) 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::OutputModuleCommunicator
createIfNeeded (T *iMod)
 

Private Member Functions

Tmodule () const
 

Private Attributes

Tmodule_
 

Detailed Description

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

Definition at line 49 of file OutputModuleBase.h.

Constructor & Destructor Documentation

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

Definition at line 25 of file OutputModuleCommunicatorT.h.

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 79 of file OutputModuleCommunicatorT.cc.

References python.rootplot.argparse::module.

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

Definition at line 57 of file OutputModuleCommunicatorT.h.

References edm::impl::createCommunicatorIfNeeded().

57  {
58  return std::move(impl::createCommunicatorIfNeeded(iMod));
59  return std::move(std::unique_ptr<edm::OutputModuleCommunicator>{});
60  }
std::unique_ptr< edm::OutputModuleCommunicator > createCommunicatorIfNeeded(void *)
template<typename T >
ModuleDescription const & edm::OutputModuleCommunicatorT< T >::description ( ) const
overridevirtual

Implements edm::OutputModuleCommunicator.

Definition at line 98 of file OutputModuleCommunicatorT.cc.

References python.rootplot.argparse::module.

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

Implements edm::OutputModuleCommunicator.

Definition at line 82 of file OutputModuleCommunicatorT.cc.

References python.rootplot.argparse::module.

82  {
83  return module().keptProducts();
84  }
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 76 of file OutputModuleCommunicatorT.cc.

References python.rootplot.argparse::module.

76 {return module().limitReached();}
template<typename T >
T& edm::OutputModuleCommunicatorT< T >::module ( ) const
inlineprivate
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 32 of file OutputModuleCommunicatorT.cc.

References python.rootplot.argparse::module.

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

Implements edm::OutputModuleCommunicator.

Definition at line 87 of file OutputModuleCommunicatorT.cc.

References python.rootplot.argparse::module.

87  {
88  module().selectProducts(preg);
89  }
preg
Definition: Schedule.cc:362
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 92 of file OutputModuleCommunicatorT.cc.

References python.rootplot.argparse::module.

93  {
94  module().setEventSelectionInfo(outputModulePathPositions, anyProductProduced);
95  }
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 26 of file OutputModuleCommunicatorT.cc.

References python.rootplot.argparse::module.

26  {
27  return module().shouldWeCloseFile();
28  }
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 73 of file OutputModuleCommunicatorT.cc.

References python.rootplot.argparse::module.

73 {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 59 of file OutputModuleCommunicatorT.cc.

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

59  {
60  GlobalContext globalContext(GlobalContext::Transition::kWriteLuminosityBlock,
61  lbp.id(),
62  lbp.runPrincipal().index(),
63  lbp.index(),
64  lbp.beginTime(),
65  processContext);
66  ParentContext parentContext(&globalContext);
67  ModuleCallingContext mcc(&description());
68  ModuleContextSentry moduleContextSentry(&mcc, parentContext);
69  module().doWriteLuminosityBlock(lbp, &mcc);
70  }
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 44 of file OutputModuleCommunicatorT.cc.

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

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

Member Data Documentation

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