CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
 
 EDProducer (const EDProducer &)=delete
 
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
 
const EDProduceroperator= (const EDProducer &)=delete
 
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
 
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
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, 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::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::PixelClusterCountsInEvent
pccToken_
 
std::string prodInst_
 
std::unique_ptr
< reco::PixelClusterCounts
thePCCob
 
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
ProducesCollector producesCollector ()
 
- 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< B > consumes (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 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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
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...
 
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)
 

Detailed Description

Definition at line 30 of file AlcaPCCIntegrator.cc.

Constructor & Destructor Documentation

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

Definition at line 54 of file AlcaPCCIntegrator.cc.

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

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 }
edm::EDGetTokenT< reco::PixelClusterCountsInEvent > pccToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
AlcaPCCIntegrator::~AlcaPCCIntegrator ( )
override

Definition at line 71 of file AlcaPCCIntegrator.cc.

71 {}

Member Function Documentation

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

Definition at line 91 of file AlcaPCCIntegrator.cc.

References countLumi_, and thePCCob.

91  {
92  //PCC object at the beginning of each lumi section
93  thePCCob = std::make_unique<reco::PixelClusterCounts>();
94  countLumi_++;
95 }
std::unique_ptr< reco::PixelClusterCounts > thePCCob
void AlcaPCCIntegrator::endLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 98 of file AlcaPCCIntegrator.cc.

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

Definition at line 101 of file AlcaPCCIntegrator.cc.

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

101  {
102  //Saving the PCC object
104 }
std::unique_ptr< reco::PixelClusterCounts > thePCCob
void put(std::unique_ptr< PROD > product)
Put a new product.
def move
Definition: eostools.py:511
void AlcaPCCIntegrator::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::one::EDProducerBase.

Definition at line 74 of file AlcaPCCIntegrator.cc.

References edm::EventBase::bunchCrossing(), makePileupJSON::bx, countEvt_, edm::Event::getByToken(), pccToken_, edm::Handle< T >::product(), and thePCCob.

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 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
int bunchCrossing() const
Definition: EventBase.h:64
std::unique_ptr< reco::PixelClusterCounts > thePCCob
edm::EDGetTokenT< reco::PixelClusterCountsInEvent > pccToken_
T const * product() const
Definition: Handle.h:70

Member Data Documentation

int AlcaPCCIntegrator::countEvt_
private

Definition at line 47 of file AlcaPCCIntegrator.cc.

Referenced by produce().

int AlcaPCCIntegrator::countLumi_
private

Definition at line 48 of file AlcaPCCIntegrator.cc.

Referenced by AlcaPCCIntegrator(), and beginLuminosityBlock().

std::string AlcaPCCIntegrator::pccSource_
private

Definition at line 43 of file AlcaPCCIntegrator.cc.

Referenced by AlcaPCCIntegrator().

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

Definition at line 42 of file AlcaPCCIntegrator.cc.

Referenced by AlcaPCCIntegrator(), and produce().

std::string AlcaPCCIntegrator::prodInst_
private

Definition at line 46 of file AlcaPCCIntegrator.cc.

Referenced by AlcaPCCIntegrator(), and endLuminosityBlockProduce().

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

Definition at line 50 of file AlcaPCCIntegrator.cc.

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

std::string AlcaPCCIntegrator::trigstring_
private

Definition at line 45 of file AlcaPCCIntegrator.cc.

Referenced by AlcaPCCIntegrator().