CMS 3D CMS Logo

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

Public Member Functions

 AlcaPCCProducer (const edm::ParameterSet &)
 
 ~AlcaPCCProducer () 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::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)
 

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_
 
edm::InputTag fPixelClusterLabel
 
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelToken
 
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


class: AlcaPCCProducer.cc

authors:Sam Higginbotham (shigg.nosp@m.inb@.nosp@m.cern..nosp@m.ch) and Chris Palmer (capal.nosp@m.mer@.nosp@m.cern..nosp@m.ch)


Definition at line 32 of file AlcaPCCProducer.cc.

Constructor & Destructor Documentation

◆ AlcaPCCProducer()

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

Definition at line 54 of file AlcaPCCProducer.cc.

54  {
55  fPixelClusterLabel = iConfig.getParameter<edm::InputTag>("pixelClusterLabel");
56  trigstring_ = iConfig.getUntrackedParameter<std::string>("trigstring", "alcaPCC");
57 
58  countLumi_ = 0;
59 
60  produces<reco::PixelClusterCounts, edm::Transition::EndLuminosityBlock>(trigstring_);
61  pixelToken = consumes<edmNew::DetSetVector<SiPixelCluster> >(fPixelClusterLabel);
62 }

References countLumi_, fPixelClusterLabel, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), pixelToken, AlCaHLTBitMon_QueryRunRegistry::string, and trigstring_.

◆ ~AlcaPCCProducer()

AlcaPCCProducer::~AlcaPCCProducer ( )
override

Definition at line 65 of file AlcaPCCProducer.cc.

65 {}

Member Function Documentation

◆ beginLuminosityBlock()

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

Definition at line 102 of file AlcaPCCProducer.cc.

102  {
103  //New PCC object at the beginning of each lumi section
104  thePCCob = std::make_unique<reco::PixelClusterCounts>();
105  countLumi_++;
106 }

References countLumi_, and thePCCob.

◆ endLuminosityBlock()

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

Definition at line 109 of file AlcaPCCProducer.cc.

109 {}

◆ endLuminosityBlockProduce()

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

Definition at line 112 of file AlcaPCCProducer.cc.

112  {
113  //Saving the PCC object
115 }

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

◆ produce()

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

Implements edm::one::EDProducerBase.

Definition at line 68 of file AlcaPCCProducer.cc.

68  {
69  countEvt_++;
70 
71  unsigned int bx = iEvent.bunchCrossing();
72  //std::cout<<"The Bunch Crossing"<<bx<<std::endl;
73  thePCCob->eventCounter(bx);
74 
75  //Looping over the clusters and adding the counts up
77  iEvent.getByToken(pixelToken, hClusterColl);
78 
79  const edmNew::DetSetVector<SiPixelCluster>& clustColl = *(hClusterColl.product());
80  // ----------------------------------------------------------------------
81  // -- Clusters without tracks
82  for (auto const& mod : clustColl) {
83  if (mod.empty()) {
84  continue;
85  }
86  DetId detId = mod.id();
87 
88  //--The following will be used when we make a theshold for the clusters.
89  //--Keeping this for features that may be implemented later.
90  // -- clusters on this det
91  //edmNew::DetSet<SiPixelCluster>::const_iterator di;
92  //int nClusterCount=0;
93  //for (di = mod.begin(); di != mod.end(); ++di) {
94  // nClusterCount++;
95  //}
96  int nCluster = mod.size();
97  thePCCob->increment(detId(), bx, nCluster);
98  }
99 }

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

Member Data Documentation

◆ countEvt_

int AlcaPCCProducer::countEvt_
private

Definition at line 47 of file AlcaPCCProducer.cc.

Referenced by produce().

◆ countLumi_

int AlcaPCCProducer::countLumi_
private

Definition at line 48 of file AlcaPCCProducer.cc.

Referenced by AlcaPCCProducer(), and beginLuminosityBlock().

◆ fPixelClusterLabel

edm::InputTag AlcaPCCProducer::fPixelClusterLabel
private

Definition at line 44 of file AlcaPCCProducer.cc.

Referenced by AlcaPCCProducer().

◆ pixelToken

edm::EDGetTokenT<edmNew::DetSetVector<SiPixelCluster> > AlcaPCCProducer::pixelToken
private

Definition at line 43 of file AlcaPCCProducer.cc.

Referenced by AlcaPCCProducer(), and produce().

◆ thePCCob

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

Definition at line 50 of file AlcaPCCProducer.cc.

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

◆ trigstring_

std::string AlcaPCCProducer::trigstring_
private

Definition at line 46 of file AlcaPCCProducer.cc.

Referenced by AlcaPCCProducer(), and endLuminosityBlockProduce().

edm::Handle::product
T const * product() const
Definition: Handle.h:70
AlcaPCCProducer::countLumi_
int countLumi_
Definition: AlcaPCCProducer.cc:48
mod
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
AlcaPCCProducer::thePCCob
std::unique_ptr< reco::PixelClusterCounts > thePCCob
Definition: AlcaPCCProducer.cc:50
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::Handle
Definition: AssociativeIterator.h:50
DetId
Definition: DetId.h:17
AlcaPCCProducer::fPixelClusterLabel
edm::InputTag fPixelClusterLabel
Definition: AlcaPCCProducer.cc:44
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
AlcaPCCProducer::pixelToken
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelToken
Definition: AlcaPCCProducer.cc:43
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::LuminosityBlock::put
void put(std::unique_ptr< PROD > product)
Put a new product.
Definition: LuminosityBlock.h:116
AlcaPCCProducer::countEvt_
int countEvt_
Definition: AlcaPCCProducer.cc:47
edmNew::DetSetVector
Definition: DetSetNew.h:13
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
AlcaPCCProducer::trigstring_
std::string trigstring_
Definition: AlcaPCCProducer.cc:46
edm::InputTag
Definition: InputTag.h:15