CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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::LuminosityBlockCache< reco::PixelClusterCounts > > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 AlcaPCCProducer (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::LuminosityBlockCache< reco::PixelClusterCounts > >
 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 endLuminosityBlockProduce (edm::LuminosityBlock &lumiSeg, const edm::EventSetup &iSetup) final
 
std::shared_ptr< reco::PixelClusterCountsglobalBeginLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &iSetup) const final
 
void globalEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void produce (edm::Event &iEvent, const edm::EventSetup &iSetup) final
 

Private Attributes

edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelToken_
 
edm::EDPutTokenT< reco::PixelClusterCountsputToken_
 

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 29 of file AlcaPCCProducer.cc.

Constructor & Destructor Documentation

◆ AlcaPCCProducer()

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

Definition at line 46 of file AlcaPCCProducer.cc.

47  : pixelToken_(consumes(iConfig.getParameter<edm::InputTag>("pixelClusterLabel"))),
48  //specifies the trigger Rand or ZeroBias
49  putToken_(produces<reco::PixelClusterCounts, edm::Transition::EndLuminosityBlock>(
50  iConfig.getUntrackedParameter<std::string>("trigstring", "alcaPCC"))) {}

Member Function Documentation

◆ endLuminosityBlockProduce()

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

Definition at line 90 of file AlcaPCCProducer.cc.

90  {
91  //Saving the PCC object
92  lumiSeg.emplace(putToken_, std::move(*luminosityBlockCache(lumiSeg.index())));
93 }

References edm::LuminosityBlock::emplace(), edm::LuminosityBlock::index(), eostools::move(), and putToken_.

◆ globalBeginLuminosityBlock()

std::shared_ptr< reco::PixelClusterCounts > AlcaPCCProducer::globalBeginLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  iSetup 
) const
finalprivate

Definition at line 83 of file AlcaPCCProducer.cc.

84  {
85  //New PCC object at the beginning of each lumi section
86  return std::make_shared<reco::PixelClusterCounts>();
87 }

◆ globalEndLuminosityBlock()

void AlcaPCCProducer::globalEndLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
inlinefinalprivate

Definition at line 38 of file AlcaPCCProducer.cc.

38 {}

◆ produce()

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

Implements edm::one::EDProducerBase.

Definition at line 53 of file AlcaPCCProducer.cc.

53  {
54  unsigned int bx = iEvent.bunchCrossing();
55  //std::cout<<"The Bunch Crossing"<<bx<<std::endl;
56  auto* pccOb = luminosityBlockCache(iEvent.getLuminosityBlock().index());
57  pccOb->eventCounter(bx);
58 
59  //Looping over the clusters and adding the counts up
61  // ----------------------------------------------------------------------
62  // -- Clusters without tracks
63  for (auto const& mod : clustColl) {
64  if (mod.empty()) {
65  continue;
66  }
67  DetId detId = mod.id();
68 
69  //--The following will be used when we make a theshold for the clusters.
70  //--Keeping this for features that may be implemented later.
71  // -- clusters on this det
72  //edmNew::DetSet<SiPixelCluster>::const_iterator di;
73  //int nClusterCount=0;
74  //for (di = mod.begin(); di != mod.end(); ++di) {
75  // nClusterCount++;
76  //}
77  int nCluster = mod.size();
78  pccOb->increment(detId(), bx, nCluster);
79  }
80 }

References l1GtPatternGenerator_cfi::bx, iEvent, mod(), and pixelToken_.

Member Data Documentation

◆ pixelToken_

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

Definition at line 41 of file AlcaPCCProducer.cc.

Referenced by produce().

◆ putToken_

edm::EDPutTokenT<reco::PixelClusterCounts> AlcaPCCProducer::putToken_
private

Definition at line 42 of file AlcaPCCProducer.cc.

Referenced by endLuminosityBlockProduce().

edm::LuminosityBlock::index
LuminosityBlockIndex index() const
Definition: LuminosityBlock.cc:28
mod
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
AlcaPCCProducer::pixelToken_
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelToken_
Definition: AlcaPCCProducer.cc:41
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::LuminosityBlock::emplace
void emplace(EDPutTokenT< PROD > token, Args &&... args)
puts a new product
Definition: LuminosityBlock.h:249
DetId
Definition: DetId.h:17
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
iEvent
int iEvent
Definition: GenABIO.cc:224
edmNew::DetSetVector
Definition: DetSetNew.h:13
eostools.move
def move(src, dest)
Definition: eostools.py:511
AlcaPCCProducer::putToken_
edm::EDPutTokenT< reco::PixelClusterCounts > putToken_
Definition: AlcaPCCProducer.cc:42
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:155
edm::InputTag
Definition: InputTag.h:15