CMS 3D CMS Logo

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

#include <StreamerOutputModuleBase.h>

Inheritance diagram for edm::StreamerOutputModuleBase:
edm::one::OutputModule< one::WatchRuns, one::WatchLuminosityBlocks > edm::StreamerOutputModuleCommon edm::one::OutputModuleBase edm::EDConsumerBase edm::StreamerOutputModule< Consumer > evf::RecoEventOutputModuleForFU< 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
 
 OutputModule (edm::ParameterSet const &iPSet)
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::OutputModuleBase
BranchIDLists const * branchIDLists ()
 
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch () const
 
SelectedProductsForBranchType const & keptProducts () const
 
int maxEvents () const
 
const ModuleDescriptionmoduleDescription () const
 
OutputModuleBaseoperator= (OutputModuleBase const &)=delete
 
 OutputModuleBase (ParameterSet const &pset)
 
 OutputModuleBase (OutputModuleBase const &)=delete
 
std::string const & processName () const
 
int remainingEvents () const
 
bool selected (BranchDescription const &desc) const
 
void selectProducts (ProductRegistry const &preg, ThinnedAssociationsHelper const &)
 
SharedResourcesAcquirersharedResourcesAcquirer ()
 
SubProcessParentageHelper const * subProcessParentageHelper () const
 
ThinnedAssociationsHelper const * thinnedAssociationsHelper () const
 
bool wantAllEvents () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~OutputModuleBase () 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
 
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::vector< ModuleDescription const * > &modules, 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
 
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)
 
- Static Public Member Functions inherited from edm::one::OutputModuleBase
static const std::string & baseType ()
 
static void fillDescription (ParameterSetDescription &desc)
 
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::StreamerOutputModuleCommon
void clearSerializeDataBuffer ()
 
std::unique_ptr< EventMsgBuilderserializeEvent (EventForOutput const &e, Handle< TriggerResults > const &triggerResults, ParameterSetID const &selectorCfg)
 
std::unique_ptr< InitMsgBuilderserializeRegistry (BranchIDLists const &branchLists, ThinnedAssociationsHelper const &helper, std::string const &processName, std::string const &moduleLabel, ParameterSetID const &toplevel)
 
 StreamerOutputModuleCommon (ParameterSet const &ps, SelectedProducts const *selections)
 
 ~StreamerOutputModuleCommon ()
 

Private Attributes

edm::EDGetTokenT< edm::TriggerResultstrToken_
 

Additional Inherited Members

- Public Types inherited from edm::one::OutputModuleBase
typedef OutputModuleBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::one::OutputModuleBase
void configure (OutputModuleDescription const &desc)
 
ModuleDescription const & description () const
 
void doBeginJob ()
 
bool doBeginLuminosityBlock (LuminosityBlockPrincipal const &lbp, EventSetupImpl const &c, ModuleCallingContext const *)
 
bool doBeginRun (RunPrincipal const &rp, EventSetupImpl const &c, ModuleCallingContext const *)
 
void doEndJob ()
 
bool doEndLuminosityBlock (LuminosityBlockPrincipal const &lbp, EventSetupImpl const &c, ModuleCallingContext const *)
 
bool doEndRun (RunPrincipal const &rp, EventSetupImpl const &c, ModuleCallingContext const *)
 
bool doEvent (EventPrincipal const &ep, EventSetupImpl const &c, 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)
 
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<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)
 
- Static Private Member Functions inherited from edm::StreamerOutputModuleCommon
static void fillDescription (ParameterSetDescription &desc)
 

Detailed Description

Definition at line 19 of file StreamerOutputModuleBase.h.

Constructor & Destructor Documentation

edm::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"))) {}
StreamerOutputModuleCommon(ParameterSet const &ps, SelectedProducts const *selections)
SelectedProductsForBranchType const & keptProducts() const
OutputModuleBase(ParameterSet const &pset)
edm::EDGetTokenT< edm::TriggerResults > trToken_
edm::StreamerOutputModuleBase::~StreamerOutputModuleBase ( )
override

Definition at line 22 of file StreamerOutputModuleBase.cc.

22 {}

Member Function Documentation

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

Reimplemented from edm::one::OutputModuleBase.

Definition at line 39 of file StreamerOutputModuleBase.cc.

39 {}
void edm::StreamerOutputModuleBase::beginRun ( RunForOutput const &  )
overrideprivate

Definition at line 24 of file StreamerOutputModuleBase.cc.

References edm::one::OutputModuleBase::branchIDLists(), edm::StreamerOutputModuleCommon::clearSerializeDataBuffer(), edm::one::OutputModuleBase::description(), doOutputHeader(), edm::one::OutputModuleBase::moduleDescription(), edm::OutputModule::processName(), edm::StreamerOutputModuleCommon::serializeRegistry(), start(), and edm::one::OutputModuleBase::thinnedAssociationsHelper().

24  {
25  start();
26 
27  std::unique_ptr<InitMsgBuilder> init_message = serializeRegistry(*branchIDLists(),
30  description().moduleLabel(),
31  moduleDescription().mainParameterSetID());
32 
33  doOutputHeader(*init_message);
35  }
ModuleDescription const & description() const
ThinnedAssociationsHelper const * thinnedAssociationsHelper() const
virtual void doOutputHeader(InitMsgBuilder const &init_message)=0
std::string const & processName() const
Definition: OutputModule.h:81
std::unique_ptr< InitMsgBuilder > serializeRegistry(BranchIDLists const &branchLists, ThinnedAssociationsHelper const &helper, std::string const &processName, std::string const &moduleLabel, ParameterSetID const &toplevel)
const ModuleDescription & moduleDescription() const
BranchIDLists const * branchIDLists()
virtual void edm::StreamerOutputModuleBase::doOutputEvent ( EventMsgBuilder const &  msg)
privatepure virtual
virtual void edm::StreamerOutputModuleBase::doOutputHeader ( InitMsgBuilder const &  init_message)
privatepure virtual
void edm::StreamerOutputModuleBase::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::OutputModuleBase.

Definition at line 41 of file StreamerOutputModuleBase.cc.

References stop().

41 { stop(); }
void edm::StreamerOutputModuleBase::endRun ( RunForOutput const &  )
overrideprivate

Definition at line 37 of file StreamerOutputModuleBase.cc.

References stop().

37 { stop(); }
void edm::StreamerOutputModuleBase::fillDescription ( ParameterSetDescription desc)
static

Definition at line 60 of file StreamerOutputModuleBase.cc.

References edm::StreamerOutputModuleCommon::fillDescription(), and edm::OutputModule::fillDescription().

Referenced by edm::StreamerOutputModule< Consumer >::fillDescriptions(), and evf::RecoEventOutputModuleForFU< Consumer >::fillDescriptions().

60  {
63  }
static void fillDescription(ParameterSetDescription &desc)
static void fillDescription(ParameterSetDescription &desc, std::vector< std::string > const &iDefaultOutputCommands=ProductSelectorRules::defaultSelectionStrings())
Trig edm::StreamerOutputModuleBase::getTriggerResults ( EDGetTokenT< TriggerResults > const &  token,
EventForOutput const &  e 
) const
private

Definition at line 53 of file StreamerOutputModuleBase.cc.

References edm::OccurrenceForOutput::getByToken(), and mps_fire::result.

Referenced by write().

54  {
55  Trig result;
56  e.getByToken<TriggerResults>(token, result);
57  return result;
58  }
virtual void edm::StreamerOutputModuleBase::start ( )
privatepure virtual
virtual void edm::StreamerOutputModuleBase::stop ( )
privatepure virtual
void edm::StreamerOutputModuleBase::write ( EventForOutput const &  e)
overrideprivatevirtual

Implements edm::one::OutputModuleBase.

Definition at line 47 of file StreamerOutputModuleBase.cc.

References doOutputEvent(), getTriggerResults(), mps_check::msg, edm::one::OutputModuleBase::selectorConfig(), edm::StreamerOutputModuleCommon::serializeEvent(), edm::triggerResults(), and trToken_.

47  {
49  std::unique_ptr<EventMsgBuilder> msg = serializeEvent(e, triggerResults, selectorConfig());
50  doOutputEvent(*msg); // You can't use msg in StreamerOutputModuleBase after this point
51  }
Trig getTriggerResults(EDGetTokenT< TriggerResults > const &token, EventForOutput const &e) const
ParameterSetID selectorConfig() const
virtual void doOutputEvent(EventMsgBuilder const &msg)=0
static std::string const triggerResults("TriggerResults")
edm::EDGetTokenT< edm::TriggerResults > trToken_
tuple msg
Definition: mps_check.py:285
std::unique_ptr< EventMsgBuilder > serializeEvent(EventForOutput const &e, Handle< TriggerResults > const &triggerResults, ParameterSetID const &selectorCfg)
void edm::StreamerOutputModuleBase::writeLuminosityBlock ( LuminosityBlockForOutput const &  )
overrideprivatevirtual

Implements edm::one::OutputModuleBase.

Definition at line 45 of file StreamerOutputModuleBase.cc.

45 {}
void edm::StreamerOutputModuleBase::writeRun ( RunForOutput const &  )
overrideprivatevirtual

Implements edm::one::OutputModuleBase.

Definition at line 43 of file StreamerOutputModuleBase.cc.

43 {}

Member Data Documentation

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

Definition at line 43 of file StreamerOutputModuleBase.h.

Referenced by write().