CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Friends
edm::global::OutputModuleBase Class Referenceabstract

#include <OutputModuleBase.h>

Inheritance diagram for edm::global::OutputModuleBase:
edm::core::OutputModuleCore edm::EDConsumerBase edm::global::OutputModule< T > edm::global::outputmodule::InputFileWatcher edm::global::OutputModule< WatchInputFiles, RunCache< int >, LuminosityBlockCache< int > > edm::global::OutputModule<> evf::GlobalEvFOutputModule edm::TestGlobalOutput edm::AsciiOutputModule edmtest::TableTestOutputModule

Public Types

typedef OutputModuleBase ModuleType
 
- Public Types inherited from edm::core::OutputModuleCore
typedef OutputModuleCore ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

OutputModuleBaseoperator= (OutputModuleBase const &)=delete
 
 OutputModuleBase (ParameterSet const &pset)
 
 OutputModuleBase (OutputModuleBase const &)=delete
 
bool wantsGlobalLuminosityBlocks () const
 
bool wantsGlobalRuns () const
 
virtual bool wantsInputProcessBlocks () const =0
 
virtual bool wantsProcessBlocks () const =0
 
virtual bool wantsStreamLuminosityBlocks () const =0
 
virtual bool wantsStreamRuns () const =0
 
- Public Member Functions inherited from edm::core::OutputModuleCore
BranchIDLists const * branchIDLists () const
 
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch () const
 
SelectedProductsForBranchType const & keptProducts () const
 
int maxEvents () const
 
const ModuleDescriptionmoduleDescription () const
 
OutputModuleCoreoperator= (OutputModuleCore const &)=delete
 
 OutputModuleCore (ParameterSet const &pset)
 
 OutputModuleCore (OutputModuleCore const &)=delete
 
OutputProcessBlockHelper const & outputProcessBlockHelper () const
 
std::string const & processName () const
 
int remainingEvents () const
 
bool selected (BranchDescription const &desc) const
 
void selectProducts (ProductRegistry const &preg, ThinnedAssociationsHelper const &, ProcessBlockHelperBase const &)
 
ThinnedAssociationsHelper const * thinnedAssociationsHelper () const
 
bool wantAllEvents () const
 
 ~OutputModuleCore () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void doAcquire (EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *, WaitingTaskWithArenaHolder &)
 
void doBeginJob ()
 
void doBeginStream (StreamID id)
 
void doEndStream (StreamID id)
 
bool doEvent (EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *)
 
void doPreallocate (PreallocationConfiguration const &)
 
void preActionBeforeRunEventAsync (WaitingTaskHolder iTask, ModuleCallingContext const &iModuleCallingContext, Principal const &iPrincipal) const
 
- Protected Member Functions inherited from edm::core::OutputModuleCore
void configure (OutputModuleDescription const &desc)
 
ModuleDescription const & description () const
 
void doAccessInputProcessBlock (ProcessBlockPrincipal const &, ModuleCallingContext const *)
 
void doBeginJob_ ()
 
bool doBeginLuminosityBlock (LumiTransitionInfo const &, ModuleCallingContext const *)
 
void doBeginProcessBlock (ProcessBlockPrincipal const &, ModuleCallingContext const *)
 
bool doBeginRun (RunTransitionInfo const &, ModuleCallingContext const *)
 
void doEndJob ()
 
bool doEndLuminosityBlock (LumiTransitionInfo const &, ModuleCallingContext const *)
 
void doEndProcessBlock (ProcessBlockPrincipal const &, ModuleCallingContext const *)
 
bool doEndRun (RunTransitionInfo const &, ModuleCallingContext const *)
 
bool doEvent_ (EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *)
 
void doPreallocate_ (PreallocationConfiguration const &)
 
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID ()
 
virtual void preallocLumis (unsigned int)
 
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)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Private Member Functions

virtual void doAcquire_ (StreamID, EventForOutput const &, WaitingTaskWithArenaHolder &)
 
virtual void doBeginLuminosityBlockSummary_ (LuminosityBlockForOutput const &, EventSetup const &)
 
virtual void doBeginRunSummary_ (RunForOutput const &, EventSetup const &)
 
virtual void doBeginStream_ (StreamID)
 
virtual void doEndLuminosityBlockSummary_ (LuminosityBlockForOutput const &, EventSetup const &)
 
virtual void doEndRunSummary_ (RunForOutput const &, EventSetup const &)
 
virtual void doEndStream_ (StreamID)
 
virtual void doStreamBeginLuminosityBlock_ (StreamID, LuminosityBlockForOutput const &, EventSetup const &)
 
virtual void doStreamBeginRun_ (StreamID, RunForOutput const &, EventSetup const &)
 
virtual void doStreamEndLuminosityBlock_ (StreamID, LuminosityBlockForOutput const &, EventSetup const &)
 
virtual void doStreamEndLuminosityBlockSummary_ (StreamID, LuminosityBlockForOutput const &, EventSetup const &)
 
virtual void doStreamEndRun_ (StreamID, RunForOutput const &, EventSetup const &)
 
virtual void doStreamEndRunSummary_ (StreamID, RunForOutput const &, EventSetup const &)
 
virtual bool hasAcquire () const
 
virtual void preallocate (PreallocationConfiguration const &)
 
virtual void preallocStreams (unsigned int)
 
void registerProductsAndCallbacks (OutputModuleBase const *, ProductRegistry const *)
 
std::string workerType () const
 

Friends

template<typename T >
class ::edm::OutputModuleCommunicatorT
 
template<typename T >
class ::edm::WorkerT
 
template<typename U >
class edm::maker::ModuleHolderT
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::core::OutputModuleCore
static const std::string & baseType ()
 
static void fillDescription (ParameterSetDescription &desc, std::vector< std::string > const &iDefaultOutputCommands=ProductSelectorRules::defaultSelectionStrings())
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Attributes inherited from edm::core::OutputModuleCore
std::atomic< int > remainingEvents_
 

Detailed Description

Definition at line 29 of file OutputModuleBase.h.

Member Typedef Documentation

◆ ModuleType

Definition at line 37 of file OutputModuleBase.h.

Constructor & Destructor Documentation

◆ OutputModuleBase() [1/2]

OutputModuleBase::OutputModuleBase ( ParameterSet const &  pset)
explicit

Definition at line 25 of file OutputModuleBase.cc.

25 : core::OutputModuleCore(pset) {}

◆ OutputModuleBase() [2/2]

edm::global::OutputModuleBase::OutputModuleBase ( OutputModuleBase const &  )
delete

Member Function Documentation

◆ doAcquire()

void OutputModuleBase::doAcquire ( EventTransitionInfo const &  info,
ActivityRegistry act,
ModuleCallingContext const *  mcc,
WaitingTaskWithArenaHolder holder 
)
protected

Definition at line 55 of file OutputModuleBase.cc.

References doAcquire_(), MillePedeFileConverter_cfg::e, info(), edm::core::OutputModuleCore::moduleDescription(), and edm::EventForOutput::streamID().

58  {
59  EventForOutput e(info, moduleDescription(), mcc);
60  e.setConsumer(this);
61  EventAcquireSignalsSentry sentry(act, mcc);
62  this->doAcquire_(e.streamID(), e, holder);
63  }
static const TGPicture * info(bool iBackgroundIsBlack)
const ModuleDescription & moduleDescription() const
virtual void doAcquire_(StreamID, EventForOutput const &, WaitingTaskWithArenaHolder &)

◆ doAcquire_()

virtual void edm::global::OutputModuleBase::doAcquire_ ( StreamID  ,
EventForOutput const &  ,
WaitingTaskWithArenaHolder  
)
inlineprivatevirtual

Definition at line 91 of file OutputModuleBase.h.

Referenced by doAcquire().

91 {}

◆ doBeginJob()

void OutputModuleBase::doBeginJob ( )
protected

◆ doBeginLuminosityBlockSummary_()

virtual void edm::global::OutputModuleBase::doBeginLuminosityBlockSummary_ ( LuminosityBlockForOutput const &  ,
EventSetup const &   
)
inlineprivatevirtual

Definition at line 89 of file OutputModuleBase.h.

89 {}

◆ doBeginRunSummary_()

virtual void edm::global::OutputModuleBase::doBeginRunSummary_ ( RunForOutput const &  ,
EventSetup const &   
)
inlineprivatevirtual

Definition at line 87 of file OutputModuleBase.h.

87 {}

◆ doBeginStream()

void edm::global::OutputModuleBase::doBeginStream ( StreamID  id)
inlineprotected

Definition at line 58 of file OutputModuleBase.h.

References doBeginStream_().

58 { doBeginStream_(id); }
virtual void doBeginStream_(StreamID)

◆ doBeginStream_()

virtual void edm::global::OutputModuleBase::doBeginStream_ ( StreamID  )
inlineprivatevirtual

Definition at line 78 of file OutputModuleBase.h.

Referenced by doBeginStream().

78 {}

◆ doEndLuminosityBlockSummary_()

virtual void edm::global::OutputModuleBase::doEndLuminosityBlockSummary_ ( LuminosityBlockForOutput const &  ,
EventSetup const &   
)
inlineprivatevirtual

Definition at line 90 of file OutputModuleBase.h.

90 {}

◆ doEndRunSummary_()

virtual void edm::global::OutputModuleBase::doEndRunSummary_ ( RunForOutput const &  ,
EventSetup const &   
)
inlineprivatevirtual

Definition at line 88 of file OutputModuleBase.h.

88 {}

◆ doEndStream()

void edm::global::OutputModuleBase::doEndStream ( StreamID  id)
inlineprotected

Definition at line 59 of file OutputModuleBase.h.

References doEndStream_().

59 { doEndStream_(id); }
virtual void doEndStream_(StreamID)

◆ doEndStream_()

virtual void edm::global::OutputModuleBase::doEndStream_ ( StreamID  )
inlineprivatevirtual

Definition at line 79 of file OutputModuleBase.h.

Referenced by doEndStream().

79 {}

◆ doEvent()

bool OutputModuleBase::doEvent ( EventTransitionInfo const &  info,
ActivityRegistry act,
ModuleCallingContext const *  mcc 
)
protected

Definition at line 36 of file OutputModuleBase.cc.

References edm::core::OutputModuleCore::doEvent_(), info(), edm::core::OutputModuleCore::remainingEvents(), and edm::core::OutputModuleCore::remainingEvents_.

38  {
40 
41  auto remainingEvents = remainingEvents_.load();
42  bool keepTrying = remainingEvents > 0;
43  while (keepTrying) {
44  auto newValue = remainingEvents - 1;
45  keepTrying = !remainingEvents_.compare_exchange_strong(remainingEvents, newValue);
46  if (keepTrying) {
47  // the exchange failed because the value was changed by another thread.
48  // remainingEvents was changed to be the new value of remainingEvents_;
49  keepTrying = remainingEvents > 0;
50  }
51  }
52  return true;
53  }
static const TGPicture * info(bool iBackgroundIsBlack)
std::atomic< int > remainingEvents_
bool doEvent_(EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *)

◆ doPreallocate()

void OutputModuleBase::doPreallocate ( PreallocationConfiguration const &  iPC)
protected

Definition at line 27 of file OutputModuleBase.cc.

References edm::core::OutputModuleCore::doPreallocate_(), edm::PreallocationConfiguration::numberOfStreams(), preallocate(), and preallocStreams().

27  {
28  auto nstreams = iPC.numberOfStreams();
29  preallocStreams(nstreams);
31  preallocate(iPC);
32  }
virtual void preallocate(PreallocationConfiguration const &)
virtual void preallocStreams(unsigned int)
void doPreallocate_(PreallocationConfiguration const &)

◆ doStreamBeginLuminosityBlock_()

virtual void edm::global::OutputModuleBase::doStreamBeginLuminosityBlock_ ( StreamID  ,
LuminosityBlockForOutput const &  ,
EventSetup const &   
)
inlineprivatevirtual

Definition at line 83 of file OutputModuleBase.h.

83 {}

◆ doStreamBeginRun_()

virtual void edm::global::OutputModuleBase::doStreamBeginRun_ ( StreamID  ,
RunForOutput const &  ,
EventSetup const &   
)
inlineprivatevirtual

Definition at line 80 of file OutputModuleBase.h.

80 {}

◆ doStreamEndLuminosityBlock_()

virtual void edm::global::OutputModuleBase::doStreamEndLuminosityBlock_ ( StreamID  ,
LuminosityBlockForOutput const &  ,
EventSetup const &   
)
inlineprivatevirtual

Definition at line 84 of file OutputModuleBase.h.

84 {}

◆ doStreamEndLuminosityBlockSummary_()

virtual void edm::global::OutputModuleBase::doStreamEndLuminosityBlockSummary_ ( StreamID  ,
LuminosityBlockForOutput const &  ,
EventSetup const &   
)
inlineprivatevirtual

Definition at line 85 of file OutputModuleBase.h.

85 {}

◆ doStreamEndRun_()

virtual void edm::global::OutputModuleBase::doStreamEndRun_ ( StreamID  ,
RunForOutput const &  ,
EventSetup const &   
)
inlineprivatevirtual

Definition at line 81 of file OutputModuleBase.h.

81 {}

◆ doStreamEndRunSummary_()

virtual void edm::global::OutputModuleBase::doStreamEndRunSummary_ ( StreamID  ,
RunForOutput const &  ,
EventSetup const &   
)
inlineprivatevirtual

Definition at line 82 of file OutputModuleBase.h.

82 {}

◆ hasAcquire()

virtual bool edm::global::OutputModuleBase::hasAcquire ( ) const
inlineprivatevirtual

Definition at line 93 of file OutputModuleBase.h.

93 { return false; }

◆ operator=()

OutputModuleBase& edm::global::OutputModuleBase::operator= ( OutputModuleBase const &  )
delete

◆ preActionBeforeRunEventAsync()

void edm::global::OutputModuleBase::preActionBeforeRunEventAsync ( WaitingTaskHolder  iTask,
ModuleCallingContext const &  iModuleCallingContext,
Principal const &  iPrincipal 
) const
inlineprotected

Definition at line 67 of file OutputModuleBase.h.

69  {}

◆ preallocate()

virtual void edm::global::OutputModuleBase::preallocate ( PreallocationConfiguration const &  )
inlineprivatevirtual

Definition at line 77 of file OutputModuleBase.h.

Referenced by doPreallocate().

77 {}

◆ preallocStreams()

virtual void edm::global::OutputModuleBase::preallocStreams ( unsigned  int)
inlineprivatevirtual

Definition at line 76 of file OutputModuleBase.h.

Referenced by doPreallocate().

76 {}

◆ registerProductsAndCallbacks()

void edm::global::OutputModuleBase::registerProductsAndCallbacks ( OutputModuleBase const *  ,
ProductRegistry const *   
)
inlineprivate

Definition at line 74 of file OutputModuleBase.h.

74 {}

◆ wantsGlobalLuminosityBlocks()

bool edm::global::OutputModuleBase::wantsGlobalLuminosityBlocks ( ) const
inline

Definition at line 46 of file OutputModuleBase.h.

46 { return true; }

◆ wantsGlobalRuns()

bool edm::global::OutputModuleBase::wantsGlobalRuns ( ) const
inline

Definition at line 45 of file OutputModuleBase.h.

45 { return true; }

◆ wantsInputProcessBlocks()

virtual bool edm::global::OutputModuleBase::wantsInputProcessBlocks ( ) const
pure virtual

◆ wantsProcessBlocks()

virtual bool edm::global::OutputModuleBase::wantsProcessBlocks ( ) const
pure virtual

◆ wantsStreamLuminosityBlocks()

virtual bool edm::global::OutputModuleBase::wantsStreamLuminosityBlocks ( ) const
pure virtual

◆ wantsStreamRuns()

virtual bool edm::global::OutputModuleBase::wantsStreamRuns ( ) const
pure virtual

◆ workerType()

std::string edm::global::OutputModuleBase::workerType ( ) const
inlineprivate

Definition at line 72 of file OutputModuleBase.h.

72 { return "WorkerT<edm::global::OutputModuleBase>"; }

Friends And Related Function Documentation

◆ ::edm::OutputModuleCommunicatorT

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

Definition at line 36 of file OutputModuleBase.h.

◆ ::edm::WorkerT

template<typename T >
friend class ::edm::WorkerT
friend

Definition at line 34 of file OutputModuleBase.h.

◆ edm::maker::ModuleHolderT

template<typename U >
friend class edm::maker::ModuleHolderT
friend

Definition at line 32 of file OutputModuleBase.h.