CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
edm::streamer::StreamerOutputModuleBase Class Referenceabstract

#include <StreamerOutputModuleBase.h>

Inheritance diagram for edm::streamer::StreamerOutputModuleBase:
edm::one::OutputModule< one::WatchRuns, one::WatchLuminosityBlocks > edm::streamer::StreamerOutputModuleCommon edm::one::OutputModuleBase edm::core::OutputModuleCore edm::EDConsumerBase edm::streamer::StreamerOutputModule< Consumer >

Public Member Functions

 StreamerOutputModuleBase (ParameterSet const &ps)
 
 ~StreamerOutputModuleBase () override
 
- Public Member Functions inherited from edm::one::OutputModule< one::WatchRuns, one::WatchLuminosityBlocks >
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const OutputModuleoperator= (const OutputModule &)=delete
 
 OutputModule (edm::ParameterSet const &iPSet)
 
 OutputModule (const OutputModule &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::OutputModuleBase
OutputModuleBaseoperator= (OutputModuleBase const &)=delete
 
 OutputModuleBase (ParameterSet const &pset)
 
 OutputModuleBase (OutputModuleBase const &)=delete
 
SharedResourcesAcquirersharedResourcesAcquirer ()
 
SubProcessParentageHelper const * subProcessParentageHelper () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
- Public Member Functions inherited from edm::core::OutputModuleCore
BranchIDLists const * branchIDLists () const
 
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescription (ParameterSetDescription &desc)
 
- 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 &)
 

Private Member Functions

void beginJob () override
 
void beginRun (RunForOutput const &) override
 
virtual void doOutputEvent (EventMsgBuilder const &msg)=0
 
virtual void doOutputHeader (InitMsgBuilder const &init_message)=0
 
void endJob () override
 
void endRun (RunForOutput const &) override
 
Trig getTriggerResults (EDGetTokenT< TriggerResults > const &token, EventForOutput const &e) const
 
virtual void start ()=0
 
virtual void stop ()=0
 
void write (EventForOutput const &e) override
 
void writeLuminosityBlock (LuminosityBlockForOutput const &) override
 
void writeRun (RunForOutput const &) override
 
- Private Member Functions inherited from edm::streamer::StreamerOutputModuleCommon
std::unique_ptr< EventMsgBuilderserializeEvent (EventForOutput const &e, Handle< TriggerResults > const &triggerResults, ParameterSetID const &selectorCfg)
 
std::unique_ptr< EventMsgBuilderserializeEventMetaData (BranchIDLists const &branchLists, ThinnedAssociationsHelper const &helper)
 
std::unique_ptr< InitMsgBuilderserializeRegistry (std::string const &processName, std::string const &moduleLabel, ParameterSetID const &toplevel, SendJobHeader::ParameterSetMap const *psetMap)
 
 StreamerOutputModuleCommon (Parameters const &p, SelectedProducts const *selections, std::string const &moduleLabel)
 
 StreamerOutputModuleCommon (ParameterSet const &ps, SelectedProducts const *selections, std::string const &moduleLabel)
 
 ~StreamerOutputModuleCommon ()
 
void clearHeaderBuffer ()
 

Private Attributes

bool lastCallWasBeginRun_ = false
 
edm::EDGetTokenT< SendJobHeader::ParameterSetMappsetToken_
 
edm::EDGetTokenT< edm::TriggerResultstrToken_
 

Additional Inherited Members

- Public Types inherited from edm::one::OutputModuleBase
typedef OutputModuleBase ModuleType
 
- Public Types inherited from edm::core::OutputModuleCore
typedef OutputModuleCore ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::one::OutputModuleBase
void configure (OutputModuleDescription const &desc)
 
void doBeginJob ()
 
bool doEvent (EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *)
 
void doPreallocate (PreallocationConfiguration 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 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)
 
- Protected Attributes inherited from edm::core::OutputModuleCore
std::atomic< int > remainingEvents_
 
- Private Types inherited from edm::streamer::StreamerOutputModuleCommon
using Parameters = StreamerOutputMsgBuilders::Parameters
 
- Static Private Member Functions inherited from edm::streamer::StreamerOutputModuleCommon
static void fillDescription (ParameterSetDescription &desc)
 
static Parameters parameters (ParameterSet const &ps)
 

Detailed Description

Definition at line 22 of file StreamerOutputModuleBase.h.

Constructor & Destructor Documentation

◆ StreamerOutputModuleBase()

edm::streamer::StreamerOutputModuleBase::StreamerOutputModuleBase ( ParameterSet const &  ps)
explicit

Definition at line 16 of file StreamerOutputModuleBase.cc.

18  one::OutputModule<one::WatchRuns, one::WatchLuminosityBlocks>(ps),
20  trToken_(consumes<edm::TriggerResults>(edm::InputTag("TriggerResults"))),
21  psetToken_(
22  consumes<SendJobHeader::ParameterSetMap, edm::InRun>(ps.getUntrackedParameter<edm::InputTag>("psetMap"))) {}
StreamerOutputModuleCommon(Parameters const &p, SelectedProducts const *selections, std::string const &moduleLabel)
ModuleDescription const & description() const
edm::EDGetTokenT< SendJobHeader::ParameterSetMap > psetToken_
OutputModuleBase(ParameterSet const &pset)
edm::EDGetTokenT< edm::TriggerResults > trToken_
SelectedProductsForBranchType const & keptProducts() const
std::string const & moduleLabel() const

◆ ~StreamerOutputModuleBase()

edm::streamer::StreamerOutputModuleBase::~StreamerOutputModuleBase ( )
override

Definition at line 24 of file StreamerOutputModuleBase.cc.

24 {}

Member Function Documentation

◆ beginJob()

void edm::streamer::StreamerOutputModuleBase::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::core::OutputModuleCore.

Definition at line 45 of file StreamerOutputModuleBase.cc.

45 {}

◆ beginRun()

void edm::streamer::StreamerOutputModuleBase::beginRun ( RunForOutput const &  iRun)
overrideprivate

Definition at line 26 of file StreamerOutputModuleBase.cc.

References edm::streamer::StreamerOutputModuleCommon::clearHeaderBuffer(), edm::core::OutputModuleCore::description(), doOutputHeader(), edm::OccurrenceForOutput::getHandle(), lastCallWasBeginRun_, edm::core::OutputModuleCore::moduleDescription(), HerwigMaxPtPartonFilter_cfi::moduleLabel, SimL1EmulatorRepack_CalouGT_cff::processName, psetToken_, edm::streamer::StreamerOutputModuleCommon::serializeRegistry(), and start().

26  {
27  start();
28 
29  auto psetMapHandle = iRun.getHandle(psetToken_);
30 
31  std::unique_ptr<InitMsgBuilder> init_message =
34  moduleDescription().mainParameterSetID(),
35  psetMapHandle.isValid() ? psetMapHandle.product() : nullptr);
36 
37  doOutputHeader(*init_message);
38  lastCallWasBeginRun_ = true;
39 
41  }
ModuleDescription const & description() const
edm::EDGetTokenT< SendJobHeader::ParameterSetMap > psetToken_
std::unique_ptr< InitMsgBuilder > serializeRegistry(std::string const &processName, std::string const &moduleLabel, ParameterSetID const &toplevel, SendJobHeader::ParameterSetMap const *psetMap)
virtual void doOutputHeader(InitMsgBuilder const &init_message)=0
const ModuleDescription & moduleDescription() const

◆ doOutputEvent()

virtual void edm::streamer::StreamerOutputModuleBase::doOutputEvent ( EventMsgBuilder const &  msg)
privatepure virtual

◆ doOutputHeader()

virtual void edm::streamer::StreamerOutputModuleBase::doOutputHeader ( InitMsgBuilder const &  init_message)
privatepure virtual

◆ endJob()

void edm::streamer::StreamerOutputModuleBase::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::core::OutputModuleCore.

Definition at line 47 of file StreamerOutputModuleBase.cc.

References stop().

47 { stop(); }

◆ endRun()

void edm::streamer::StreamerOutputModuleBase::endRun ( RunForOutput const &  )
overrideprivate

Definition at line 43 of file StreamerOutputModuleBase.cc.

References stop().

43 { stop(); }

◆ fillDescription()

void edm::streamer::StreamerOutputModuleBase::fillDescription ( ParameterSetDescription desc)
static

Definition at line 73 of file StreamerOutputModuleBase.cc.

References submitPVResolutionJobs::desc, and edm::streamer::StreamerOutputModuleCommon::fillDescription().

Referenced by edm::streamer::StreamerOutputModule< Consumer >::fillDescriptions().

73  {
75  OutputModule::fillDescription(desc);
76  desc.addUntracked<edm::InputTag>("psetMap", {"hltPSetMap"})
77  ->setComment("Optionally allow the map of ParameterSets to be calculated externally.");
78  }
static void fillDescription(ParameterSetDescription &desc)

◆ getTriggerResults()

Trig edm::streamer::StreamerOutputModuleBase::getTriggerResults ( EDGetTokenT< TriggerResults > const &  token,
EventForOutput const &  e 
) const
private

◆ start()

virtual void edm::streamer::StreamerOutputModuleBase::start ( )
privatepure virtual

◆ stop()

virtual void edm::streamer::StreamerOutputModuleBase::stop ( )
privatepure virtual

◆ write()

void edm::streamer::StreamerOutputModuleBase::write ( EventForOutput const &  e)
overrideprivatevirtual

Implements edm::core::OutputModuleCore.

Definition at line 53 of file StreamerOutputModuleBase.cc.

References edm::core::OutputModuleCore::branchIDLists(), doOutputEvent(), MillePedeFileConverter_cfg::e, getTriggerResults(), lastCallWasBeginRun_, mps_check::msg, edm::core::OutputModuleCore::selectorConfig(), edm::streamer::StreamerOutputModuleCommon::serializeEvent(), edm::streamer::StreamerOutputModuleCommon::serializeEventMetaData(), edm::core::OutputModuleCore::thinnedAssociationsHelper(), edm::triggerResults(), and trToken_.

53  {
55 
59  lastCallWasBeginRun_ = false;
60  }
62 
63  doOutputEvent(*msg); // You can't use msg in StreamerOutputModuleBase after this point
64  }
ThinnedAssociationsHelper const * thinnedAssociationsHelper() const
Trig getTriggerResults(EDGetTokenT< TriggerResults > const &token, EventForOutput const &e) const
BranchIDLists const * branchIDLists() const
std::unique_ptr< EventMsgBuilder > serializeEventMetaData(BranchIDLists const &branchLists, ThinnedAssociationsHelper const &helper)
virtual void doOutputEvent(EventMsgBuilder const &msg)=0
edm::EDGetTokenT< edm::TriggerResults > trToken_
ParameterSetID selectorConfig() const
static std::string const triggerResults("TriggerResults")
tuple msg
Definition: mps_check.py:286
std::unique_ptr< EventMsgBuilder > serializeEvent(EventForOutput const &e, Handle< TriggerResults > const &triggerResults, ParameterSetID const &selectorCfg)

◆ writeLuminosityBlock()

void edm::streamer::StreamerOutputModuleBase::writeLuminosityBlock ( LuminosityBlockForOutput const &  )
overrideprivatevirtual

Implements edm::core::OutputModuleCore.

Definition at line 51 of file StreamerOutputModuleBase.cc.

51 {}

◆ writeRun()

void edm::streamer::StreamerOutputModuleBase::writeRun ( RunForOutput const &  )
overrideprivatevirtual

Implements edm::core::OutputModuleCore.

Definition at line 49 of file StreamerOutputModuleBase.cc.

49 {}

Member Data Documentation

◆ lastCallWasBeginRun_

bool edm::streamer::StreamerOutputModuleBase::lastCallWasBeginRun_ = false
private

Definition at line 48 of file StreamerOutputModuleBase.h.

Referenced by beginRun(), and write().

◆ psetToken_

edm::EDGetTokenT<SendJobHeader::ParameterSetMap> edm::streamer::StreamerOutputModuleBase::psetToken_
private

Definition at line 47 of file StreamerOutputModuleBase.h.

Referenced by beginRun().

◆ trToken_

edm::EDGetTokenT<edm::TriggerResults> edm::streamer::StreamerOutputModuleBase::trToken_
private

Definition at line 46 of file StreamerOutputModuleBase.h.

Referenced by write().