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
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () 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)
 
virtual ~ProducerBase () noexcept(false)
 
- 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
 
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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
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 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 33 of file AlcaPCCProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 56 of file AlcaPCCProducer.cc.

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

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

Definition at line 68 of file AlcaPCCProducer.cc.

68  {
69 }

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 
109 }
std::unique_ptr< reco::PixelClusterCounts > thePCCob
void AlcaPCCProducer::endLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 112 of file AlcaPCCProducer.cc.

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

Definition at line 116 of file AlcaPCCProducer.cc.

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

116  {
117 
118  //Saving the PCC object
120 
121 }
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:510
void AlcaPCCProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 72 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().

72  {
73  countEvt_++;
74 
75  unsigned int bx=iEvent.bunchCrossing();
76  //std::cout<<"The Bunch Crossing"<<bx<<std::endl;
77  thePCCob->eventCounter(bx);
78 
79  //Looping over the clusters and adding the counts up
81  iEvent.getByToken(pixelToken,hClusterColl);
82 
83  const edmNew::DetSetVector<SiPixelCluster>& clustColl = *(hClusterColl.product());
84  // ----------------------------------------------------------------------
85  // -- Clusters without tracks
86  for (auto const & mod: clustColl) {
87  if(mod.empty()) { continue; }
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:508
int bunchCrossing() const
Definition: EventBase.h:66
std::unique_ptr< reco::PixelClusterCounts > thePCCob
Definition: DetId.h:18
T const * product() const
Definition: Handle.h:81
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 48 of file AlcaPCCProducer.cc.

Referenced by produce().

int AlcaPCCProducer::countLumi_
private

Definition at line 49 of file AlcaPCCProducer.cc.

Referenced by AlcaPCCProducer(), and beginLuminosityBlock().

edm::InputTag AlcaPCCProducer::fPixelClusterLabel
private

Definition at line 45 of file AlcaPCCProducer.cc.

Referenced by AlcaPCCProducer().

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

Definition at line 44 of file AlcaPCCProducer.cc.

Referenced by AlcaPCCProducer(), and produce().

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

Definition at line 51 of file AlcaPCCProducer.cc.

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

std::string AlcaPCCProducer::trigstring_
private

Definition at line 47 of file AlcaPCCProducer.cc.

Referenced by AlcaPCCProducer(), and endLuminosityBlockProduce().