CMS 3D CMS Logo

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

#include <OutputModuleBase.h>

Inheritance diagram for edm::limited::OutputModuleBase:
edm::core::OutputModuleCore edm::EDConsumerBase edm::limited::OutputModule< T > edm::limited::outputmodule::InputFileWatcher edm::limited::OutputModule< WatchInputFiles, RunCache< int >, LuminosityBlockCache< int > > edm::TestLimitedOutput

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

unsigned int concurrencyLimit () const
 
OutputModuleBaseoperator= (OutputModuleBase const &)=delete
 
 OutputModuleBase (ParameterSet const &pset)
 
 OutputModuleBase (OutputModuleBase const &)=delete
 
LimitedTaskQueuequeue ()
 
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)
 

Static Public Member Functions

static void fillDescription (ParameterSetDescription &desc, std::vector< std::string > const &iDefaultOutputCommands=ProductSelectorRules::defaultSelectionStrings())
 
- 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 Member Functions

void doBeginJob ()
 
void doBeginStream (StreamID id)
 
void doEndStream (StreamID id)
 
bool doEvent (EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *)
 
void doPreallocate (PreallocationConfiguration const &)
 
void preActionBeforeRunEventAsync (WaitingTaskHolder, ModuleCallingContext const &, Principal const &) 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 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 &)
 
bool hasAcquire () const
 
virtual void preallocate (PreallocationConfiguration const &)
 
virtual void preallocStreams (unsigned int)
 
void registerProductsAndCallbacks (OutputModuleBase const *, ProductRegistry const *)
 
std::string workerType () const
 

Private Attributes

LimitedTaskQueue queue_
 

Friends

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

Additional Inherited Members

- Protected Attributes inherited from edm::core::OutputModuleCore
std::atomic< int > remainingEvents_
 

Detailed Description

Definition at line 30 of file OutputModuleBase.h.

Member Typedef Documentation

◆ ModuleType

Definition at line 38 of file OutputModuleBase.h.

Constructor & Destructor Documentation

◆ OutputModuleBase() [1/2]

OutputModuleBase::OutputModuleBase ( ParameterSet const &  pset)
explicit

Definition at line 23 of file OutputModuleBase.cc.

24  : core::OutputModuleCore(pset), queue_(pset.getUntrackedParameter<unsigned int>("concurrencyLimit")) {}

◆ OutputModuleBase() [2/2]

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

Member Function Documentation

◆ concurrencyLimit()

unsigned int edm::limited::OutputModuleBase::concurrencyLimit ( ) const
inline

Definition at line 57 of file OutputModuleBase.h.

References edm::LimitedTaskQueue::concurrencyLimit(), and queue_.

57 { return queue_.concurrencyLimit(); }
unsigned int concurrencyLimit() const

◆ doBeginJob()

void OutputModuleBase::doBeginJob ( )
protected

◆ doBeginLuminosityBlockSummary_()

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

Definition at line 95 of file OutputModuleBase.h.

95 {}

◆ doBeginRunSummary_()

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

Definition at line 93 of file OutputModuleBase.h.

93 {}

◆ doBeginStream()

void edm::limited::OutputModuleBase::doBeginStream ( StreamID  id)
protected

◆ doBeginStream_()

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

Definition at line 84 of file OutputModuleBase.h.

84 {}

◆ doEndLuminosityBlockSummary_()

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

Definition at line 96 of file OutputModuleBase.h.

96 {}

◆ doEndRunSummary_()

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

Definition at line 94 of file OutputModuleBase.h.

94 {}

◆ doEndStream()

void edm::limited::OutputModuleBase::doEndStream ( StreamID  id)
protected

◆ doEndStream_()

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

Definition at line 85 of file OutputModuleBase.h.

85 {}

◆ 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 26 of file OutputModuleBase.cc.

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

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

◆ doStreamBeginLuminosityBlock_()

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

Definition at line 89 of file OutputModuleBase.h.

89 {}

◆ doStreamBeginRun_()

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

Definition at line 86 of file OutputModuleBase.h.

86 {}

◆ doStreamEndLuminosityBlock_()

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

Definition at line 90 of file OutputModuleBase.h.

90 {}

◆ doStreamEndLuminosityBlockSummary_()

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

Definition at line 91 of file OutputModuleBase.h.

91 {}

◆ doStreamEndRun_()

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

Definition at line 87 of file OutputModuleBase.h.

87 {}

◆ doStreamEndRunSummary_()

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

Definition at line 88 of file OutputModuleBase.h.

88 {}

◆ fillDescription()

void OutputModuleBase::fillDescription ( ParameterSetDescription desc,
std::vector< std::string > const &  iDefaultOutputCommands = ProductSelectorRules::defaultSelectionStrings() 
)
static

Definition at line 55 of file OutputModuleBase.cc.

References submitPVResolutionJobs::desc, and edm::core::OutputModuleCore::fillDescription().

56  {
57  core::OutputModuleCore::fillDescription(desc, defaultOutputCommands);
58  desc.addUntracked<unsigned int>("concurrencyLimit", 1);
59  }
static void fillDescription(ParameterSetDescription &desc, std::vector< std::string > const &iDefaultOutputCommands=ProductSelectorRules::defaultSelectionStrings())

◆ hasAcquire()

bool edm::limited::OutputModuleBase::hasAcquire ( ) const
inlineprivate

Definition at line 97 of file OutputModuleBase.h.

97 { return false; }

◆ operator=()

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

◆ preActionBeforeRunEventAsync()

void edm::limited::OutputModuleBase::preActionBeforeRunEventAsync ( WaitingTaskHolder  ,
ModuleCallingContext const &  ,
Principal const &   
) const
inlineprotected

Definition at line 71 of file OutputModuleBase.h.

73  {}

◆ preallocate()

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

Definition at line 83 of file OutputModuleBase.h.

Referenced by doPreallocate().

83 {}

◆ preallocStreams()

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

Definition at line 82 of file OutputModuleBase.h.

Referenced by doPreallocate().

82 {}

◆ queue()

LimitedTaskQueue& edm::limited::OutputModuleBase::queue ( )
inline

Definition at line 59 of file OutputModuleBase.h.

References queue_.

59 { return queue_; }

◆ registerProductsAndCallbacks()

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

Definition at line 80 of file OutputModuleBase.h.

80 {}

◆ wantsGlobalLuminosityBlocks()

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

Definition at line 51 of file OutputModuleBase.h.

51 { return true; }

◆ wantsGlobalRuns()

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

Definition at line 50 of file OutputModuleBase.h.

50 { return true; }

◆ wantsInputProcessBlocks()

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

◆ wantsProcessBlocks()

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

◆ wantsStreamLuminosityBlocks()

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

◆ wantsStreamRuns()

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

◆ workerType()

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

Definition at line 78 of file OutputModuleBase.h.

78 { return "WorkerT<edm::limited::OutputModuleBase>"; }

Friends And Related Function Documentation

◆ ::edm::OutputModuleCommunicatorT

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

Definition at line 37 of file OutputModuleBase.h.

◆ ::edm::WorkerT

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

Definition at line 35 of file OutputModuleBase.h.

◆ edm::maker::ModuleHolderT

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

Definition at line 33 of file OutputModuleBase.h.

Member Data Documentation

◆ queue_

LimitedTaskQueue edm::limited::OutputModuleBase::queue_
private

Definition at line 76 of file OutputModuleBase.h.

Referenced by concurrencyLimit(), and queue().