CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
edm::EventAuxiliaryHistoryProducer Class Reference
Inheritance diagram for edm::EventAuxiliaryHistoryProducer:
edm::one::EDProducer<> edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void endJob () override
 
 EventAuxiliaryHistoryProducer (ParameterSet const &)
 
void produce (Event &e, EventSetup const &c) override
 
- Public Member Functions inherited from edm::one::EDProducer<>
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
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 fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Attributes

unsigned int depth_
 
std::deque< EventAuxiliaryhistory_
 
EDPutTokenT< std::vector< EventAuxiliary > > token_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (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)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 13 of file EventAuxiliaryHistoryProducer.cc.

Constructor & Destructor Documentation

◆ EventAuxiliaryHistoryProducer()

edm::EventAuxiliaryHistoryProducer::EventAuxiliaryHistoryProducer ( ParameterSet const &  ps)
explicit

Definition at line 27 of file EventAuxiliaryHistoryProducer.cc.

28  : depth_(ps.getParameter<unsigned int>("historyDepth")),
29  history_(),
30  token_{produces<std::vector<EventAuxiliary>>()} {}

Member Function Documentation

◆ endJob()

void edm::EventAuxiliaryHistoryProducer::endJob ( void  )
overridevirtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 54 of file EventAuxiliaryHistoryProducer.cc.

54 {}

◆ fillDescriptions()

void edm::EventAuxiliaryHistoryProducer::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 56 of file EventAuxiliaryHistoryProducer.cc.

56  {
58  desc.add<unsigned int>("historyDepth");
59  descriptions.add("eventAuxiliaryHistory", desc);
60  }

References edm::ConfigurationDescriptions::add(), and edm::ParameterSetDescription::add().

◆ produce()

void edm::EventAuxiliaryHistoryProducer::produce ( Event e,
EventSetup const &  c 
)
overridevirtual

Implements edm::one::EDProducerBase.

Definition at line 32 of file EventAuxiliaryHistoryProducer.cc.

32  {
33  EventAuxiliary aux(e.id(),
34  "",
35  e.time(),
36  e.isRealData(),
37  e.experimentType(),
38  e.bunchCrossing(),
40  e.orbitNumber());
41  //EventAuxiliary const& aux = e.auxiliary(); // when available
42  if (!history_.empty()) {
43  if (history_.back().id().next(aux.luminosityBlock()) != aux.id())
44  history_.clear();
45  if (history_.size() >= depth_)
46  history_.pop_front();
47  }
48 
49  history_.push_back(aux);
50 
51  e.emplace(token_, history_.begin(), history_.end());
52  }

References printConversionInfo::aux, depth_, MillePedeFileConverter_cfg::e, history_, edm::EventAuxiliary::invalidStoreNumber, and token_.

Member Data Documentation

◆ depth_

unsigned int edm::EventAuxiliaryHistoryProducer::depth_
private

Definition at line 22 of file EventAuxiliaryHistoryProducer.cc.

Referenced by produce().

◆ history_

std::deque<EventAuxiliary> edm::EventAuxiliaryHistoryProducer::history_
private

Definition at line 23 of file EventAuxiliaryHistoryProducer.cc.

Referenced by produce().

◆ token_

EDPutTokenT<std::vector<EventAuxiliary> > edm::EventAuxiliaryHistoryProducer::token_
private

Definition at line 24 of file EventAuxiliaryHistoryProducer.cc.

Referenced by produce().

edm::EventAuxiliary::invalidStoreNumber
static const int invalidStoreNumber
Definition: EventAuxiliary.h:29
printConversionInfo.aux
aux
Definition: printConversionInfo.py:19
ParameterSetDescription
edm::EventAuxiliaryHistoryProducer::token_
EDPutTokenT< std::vector< EventAuxiliary > > token_
Definition: EventAuxiliaryHistoryProducer.cc:24
edm::EventAuxiliaryHistoryProducer::depth_
unsigned int depth_
Definition: EventAuxiliaryHistoryProducer.cc:22
edm::EventAuxiliaryHistoryProducer::history_
std::deque< EventAuxiliary > history_
Definition: EventAuxiliaryHistoryProducer.cc:23
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37