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 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)
 

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::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


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 ( const edm::ParameterSet iConfig)
explicit

Definition at line 54 of file AlcaPCCProducer.cc.

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

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

Definition at line 67 of file AlcaPCCProducer.cc.

67 {}

Member Function Documentation

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

Definition at line 104 of file AlcaPCCProducer.cc.

References countLumi_, and thePCCob.

104  {
105  //New PCC object at the beginning of each lumi section
106  thePCCob = std::make_unique<reco::PixelClusterCounts>();
107  countLumi_++;
108 }
std::unique_ptr< reco::PixelClusterCounts > thePCCob
void AlcaPCCProducer::endLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 111 of file AlcaPCCProducer.cc.

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

Definition at line 114 of file AlcaPCCProducer.cc.

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

114  {
115  //Saving the PCC object
117 }
std::unique_ptr< reco::PixelClusterCounts > thePCCob
void put(std::unique_ptr< PROD > product)
Put a new product.
std::string trigstring_
def move(src, dest)
Definition: eostools.py:511
void AlcaPCCProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 70 of file AlcaPCCProducer.cc.

References edm::EventBase::bunchCrossing(), countEvt_, edm::Event::getByToken(), mod(), pixelToken, edm::Handle< T >::product(), and thePCCob.

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

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

Member Data Documentation

int AlcaPCCProducer::countEvt_
private

Definition at line 47 of file AlcaPCCProducer.cc.

Referenced by produce().

int AlcaPCCProducer::countLumi_
private

Definition at line 48 of file AlcaPCCProducer.cc.

Referenced by AlcaPCCProducer(), and beginLuminosityBlock().

edm::InputTag AlcaPCCProducer::fPixelClusterLabel
private

Definition at line 44 of file AlcaPCCProducer.cc.

Referenced by AlcaPCCProducer().

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

Definition at line 43 of file AlcaPCCProducer.cc.

Referenced by AlcaPCCProducer(), and produce().

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

Definition at line 50 of file AlcaPCCProducer.cc.

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

std::string AlcaPCCProducer::trigstring_
private

Definition at line 46 of file AlcaPCCProducer.cc.

Referenced by AlcaPCCProducer(), and endLuminosityBlockProduce().