CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
AlcaPCCEventProducer Class Reference
Inheritance diagram for AlcaPCCEventProducer:
edm::stream::EDProducer<>

Public Member Functions

 AlcaPCCEventProducer (const edm::ParameterSet &)
 
 ~AlcaPCCEventProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

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::PixelClusterCountsInEventthePCCob
 
std::string trigstring_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description


class: AlcaPCCEventProducer.cc

authors: Sam Higginbotham (shigg.nosp@m.inb@.nosp@m.cern..nosp@m.ch), Chris Palmer (capal.nosp@m.mer@.nosp@m.cern..nosp@m.ch), Attila Radl (attil.nosp@m.a.ra.nosp@m.dl@ce.nosp@m.rn.c.nosp@m.h)


Definition at line 32 of file AlcaPCCEventProducer.cc.

Constructor & Destructor Documentation

◆ AlcaPCCEventProducer()

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

Definition at line 52 of file AlcaPCCEventProducer.cc.

52  {
53  fPixelClusterLabel = iConfig.getParameter<edm::InputTag>("pixelClusterLabel");
54  trigstring_ = iConfig.getUntrackedParameter<std::string>("trigstring", "alcaPCCEvent");
55  produces<reco::PixelClusterCountsInEvent, edm::Transition::Event>(trigstring_);
56  pixelToken = consumes<edmNew::DetSetVector<SiPixelCluster> >(fPixelClusterLabel);
57 }

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

◆ ~AlcaPCCEventProducer()

AlcaPCCEventProducer::~AlcaPCCEventProducer ( )
override

Definition at line 60 of file AlcaPCCEventProducer.cc.

60 {}

Member Function Documentation

◆ fillDescriptions()

void AlcaPCCEventProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 99 of file AlcaPCCEventProducer.cc.

99  {
100  edm::ParameterSetDescription evtParamDesc;
101  evtParamDesc.add<edm::InputTag>("pixelClusterLabel", edm::InputTag("siPixelClustersForLumi"));
102  evtParamDesc.addUntracked<std::string>("trigstring", "alcaPCCEvent");
103  descriptions.add("alcaPCCEventProducer", evtParamDesc);
104 }

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ produce()

void AlcaPCCEventProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 63 of file AlcaPCCEventProducer.cc.

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

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

Member Data Documentation

◆ countEvt_

int AlcaPCCEventProducer::countEvt_
private

Definition at line 45 of file AlcaPCCEventProducer.cc.

Referenced by produce().

◆ countLumi_

int AlcaPCCEventProducer::countLumi_
private

Definition at line 46 of file AlcaPCCEventProducer.cc.

◆ fPixelClusterLabel

edm::InputTag AlcaPCCEventProducer::fPixelClusterLabel
private

Definition at line 42 of file AlcaPCCEventProducer.cc.

Referenced by AlcaPCCEventProducer().

◆ pixelToken

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

Definition at line 41 of file AlcaPCCEventProducer.cc.

Referenced by AlcaPCCEventProducer(), and produce().

◆ thePCCob

std::unique_ptr<reco::PixelClusterCountsInEvent> AlcaPCCEventProducer::thePCCob
private

Definition at line 48 of file AlcaPCCEventProducer.cc.

Referenced by produce().

◆ trigstring_

std::string AlcaPCCEventProducer::trigstring_
private

Definition at line 44 of file AlcaPCCEventProducer.cc.

Referenced by AlcaPCCEventProducer(), and produce().

edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
edm::Handle::product
T const * product() const
Definition: Handle.h:70
mod
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89285
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::Handle
Definition: AssociativeIterator.h:50
DetId
Definition: DetId.h:17
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
AlcaPCCEventProducer::pixelToken
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelToken
Definition: AlcaPCCEventProducer.cc:41
iEvent
int iEvent
Definition: GenABIO.cc:224
AlcaPCCEventProducer::fPixelClusterLabel
edm::InputTag fPixelClusterLabel
Definition: AlcaPCCEventProducer.cc:42
AlcaPCCEventProducer::thePCCob
std::unique_ptr< reco::PixelClusterCountsInEvent > thePCCob
Definition: AlcaPCCEventProducer.cc:48
edmNew::DetSetVector
Definition: DetSetNew.h:13
eostools.move
def move(src, dest)
Definition: eostools.py:511
AlcaPCCEventProducer::trigstring_
std::string trigstring_
Definition: AlcaPCCEventProducer.cc:44
AlcaPCCEventProducer::countEvt_
int countEvt_
Definition: AlcaPCCEventProducer.cc:45
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::InputTag
Definition: InputTag.h:15