CMS 3D CMS Logo

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

Public Member Functions

 AlcaPCCIntegrator (const edm::ParameterSet &)
 
 ~AlcaPCCIntegrator () override
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () 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
 
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
 
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)
 

Private Member Functions

void beginLuminosityBlock (edm::LuminosityBlock const &lumiSeg, const edm::EventSetup &iSetup) override
 
void endLuminosityBlock (edm::LuminosityBlock const &lumiSeg, const edm::EventSetup &iSetup) override
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumiSeg, const edm::EventSetup &iSetup) override
 
void produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override
 

Private Attributes

int countEvt_
 
int countLumi_
 
std::string pccSource_
 
edm::EDGetTokenT< reco::PixelClusterCountsInEventpccToken_
 
std::string prodInst_
 
std::unique_ptr< reco::PixelClusterCountsthePCCob
 
std::string trigstring_
 

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
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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 = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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 30 of file AlcaPCCIntegrator.cc.

Constructor & Destructor Documentation

◆ AlcaPCCIntegrator()

AlcaPCCIntegrator::AlcaPCCIntegrator ( const edm::ParameterSet iConfig)
explicit

Definition at line 54 of file AlcaPCCIntegrator.cc.

54  {
55  pccSource_ =
56  iConfig.getParameter<edm::ParameterSet>("AlcaPCCIntegratorParameters").getParameter<std::string>("inputPccLabel");
57  auto trigstring_ = iConfig.getParameter<edm::ParameterSet>("AlcaPCCIntegratorParameters")
58  .getUntrackedParameter<std::string>("trigstring", "alcaPCC");
59  prodInst_ =
60  iConfig.getParameter<edm::ParameterSet>("AlcaPCCIntegratorParameters").getParameter<std::string>("ProdInst");
61 
62  edm::InputTag PCCInputTag_(pccSource_, trigstring_);
63 
64  countLumi_ = 0;
65 
66  produces<reco::PixelClusterCounts, edm::Transition::EndLuminosityBlock>(prodInst_);
67  pccToken_ = consumes<reco::PixelClusterCountsInEvent>(PCCInputTag_);
68 }

References countLumi_, edm::ParameterSet::getParameter(), pccSource_, pccToken_, prodInst_, and trigstring_.

◆ ~AlcaPCCIntegrator()

AlcaPCCIntegrator::~AlcaPCCIntegrator ( )
override

Definition at line 71 of file AlcaPCCIntegrator.cc.

71 {}

Member Function Documentation

◆ beginLuminosityBlock()

void AlcaPCCIntegrator::beginLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 91 of file AlcaPCCIntegrator.cc.

91  {
92  //PCC object at the beginning of each lumi section
93  thePCCob = std::make_unique<reco::PixelClusterCounts>();
94  countLumi_++;
95 }

References countLumi_, and thePCCob.

◆ endLuminosityBlock()

void AlcaPCCIntegrator::endLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 98 of file AlcaPCCIntegrator.cc.

98 {}

◆ endLuminosityBlockProduce()

void AlcaPCCIntegrator::endLuminosityBlockProduce ( edm::LuminosityBlock lumiSeg,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 101 of file AlcaPCCIntegrator.cc.

101  {
102  //Saving the PCC object
104 }

References eostools::move(), prodInst_, edm::LuminosityBlock::put(), AlCaHLTBitMon_QueryRunRegistry::string, and thePCCob.

◆ produce()

void AlcaPCCIntegrator::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::one::EDProducerBase.

Definition at line 74 of file AlcaPCCIntegrator.cc.

74  {
75  countEvt_++;
76 
77  unsigned int bx = iEvent.bunchCrossing();
78  //std::cout<<"The Bunch Crossing Int"<<bx<<std::endl;
79 
80  thePCCob->eventCounter(bx);
81 
82  //Looping over the clusters and adding the counts up
84  iEvent.getByToken(pccToken_, pccHandle);
85 
86  const reco::PixelClusterCountsInEvent inputPcc = *(pccHandle.product());
87  thePCCob->add(inputPcc);
88 }

References l1GtPatternGenerator_cfi::bx, countEvt_, iEvent, pccToken_, edm::Handle< T >::product(), and thePCCob.

Member Data Documentation

◆ countEvt_

int AlcaPCCIntegrator::countEvt_
private

Definition at line 47 of file AlcaPCCIntegrator.cc.

Referenced by produce().

◆ countLumi_

int AlcaPCCIntegrator::countLumi_
private

Definition at line 48 of file AlcaPCCIntegrator.cc.

Referenced by AlcaPCCIntegrator(), and beginLuminosityBlock().

◆ pccSource_

std::string AlcaPCCIntegrator::pccSource_
private

Definition at line 43 of file AlcaPCCIntegrator.cc.

Referenced by AlcaPCCIntegrator().

◆ pccToken_

edm::EDGetTokenT<reco::PixelClusterCountsInEvent> AlcaPCCIntegrator::pccToken_
private

Definition at line 42 of file AlcaPCCIntegrator.cc.

Referenced by AlcaPCCIntegrator(), and produce().

◆ prodInst_

std::string AlcaPCCIntegrator::prodInst_
private

Definition at line 46 of file AlcaPCCIntegrator.cc.

Referenced by AlcaPCCIntegrator(), and endLuminosityBlockProduce().

◆ thePCCob

std::unique_ptr<reco::PixelClusterCounts> AlcaPCCIntegrator::thePCCob
private

Definition at line 50 of file AlcaPCCIntegrator.cc.

Referenced by beginLuminosityBlock(), endLuminosityBlockProduce(), and produce().

◆ trigstring_

std::string AlcaPCCIntegrator::trigstring_
private

Definition at line 45 of file AlcaPCCIntegrator.cc.

Referenced by AlcaPCCIntegrator().

reco::PixelClusterCountsInEvent
Definition: PixelClusterCountsInEvent.h:15
edm::Handle::product
T const * product() const
Definition: Handle.h:70
AlcaPCCIntegrator::thePCCob
std::unique_ptr< reco::PixelClusterCounts > thePCCob
Definition: AlcaPCCIntegrator.cc:50
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
edm::Handle
Definition: AssociativeIterator.h:50
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
AlcaPCCIntegrator::countEvt_
int countEvt_
Definition: AlcaPCCIntegrator.cc:47
iEvent
int iEvent
Definition: GenABIO.cc:224
AlcaPCCIntegrator::trigstring_
std::string trigstring_
Definition: AlcaPCCIntegrator.cc:45
AlcaPCCIntegrator::prodInst_
std::string prodInst_
Definition: AlcaPCCIntegrator.cc:46
edm::LuminosityBlock::put
void put(std::unique_ptr< PROD > product)
Put a new product.
Definition: LuminosityBlock.h:116
eostools.move
def move(src, dest)
Definition: eostools.py:511
AlcaPCCIntegrator::pccToken_
edm::EDGetTokenT< reco::PixelClusterCountsInEvent > pccToken_
Definition: AlcaPCCIntegrator.cc:42
AlcaPCCIntegrator::countLumi_
int countLumi_
Definition: AlcaPCCIntegrator.cc:48
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
AlcaPCCIntegrator::pccSource_
std::string pccSource_
Definition: AlcaPCCIntegrator.cc:43
edm::InputTag
Definition: InputTag.h:15