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 hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () 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
 
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)
 
 ~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 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 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::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)
 

Detailed Description

Definition at line 13 of file EventAuxiliaryHistoryProducer.cc.

Constructor & Destructor Documentation

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>>()} {}
EDPutTokenT< std::vector< EventAuxiliary > > token_

Member Function Documentation

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

Reimplemented from edm::one::EDProducerBase.

Definition at line 54 of file EventAuxiliaryHistoryProducer.cc.

54 {}
void edm::EventAuxiliaryHistoryProducer::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 56 of file EventAuxiliaryHistoryProducer.cc.

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

56  {
58  desc.add<unsigned int>("historyDepth");
59  descriptions.add("eventAuxiliaryHistory", desc);
60  }
void edm::EventAuxiliaryHistoryProducer::produce ( Event e,
EventSetup const &  c 
)
overridevirtual

Implements edm::one::EDProducerBase.

Definition at line 32 of file EventAuxiliaryHistoryProducer.cc.

References printConversionInfo::aux, edm::EventBase::bunchCrossing(), depth_, edm::Event::emplace(), edm::EventBase::experimentType(), history_, edm::EventBase::id(), edm::EventAuxiliary::invalidStoreNumber, edm::EventBase::isRealData(), edm::EventBase::orbitNumber(), edm::EventBase::time(), and token_.

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  }
EDPutTokenT< std::vector< EventAuxiliary > > token_
static int const invalidStoreNumber

Member Data Documentation

unsigned int edm::EventAuxiliaryHistoryProducer::depth_
private

Definition at line 22 of file EventAuxiliaryHistoryProducer.cc.

Referenced by produce().

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

Definition at line 23 of file EventAuxiliaryHistoryProducer.cc.

Referenced by produce().

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

Definition at line 24 of file EventAuxiliaryHistoryProducer.cc.

Referenced by produce().