CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
reco::PixelClusterCounts Class Reference

#include <PixelClusterCounts.h>

Public Member Functions

void add (reco::PixelClusterCountsInEvent const &pccInEvent)
 
void eventCounter (unsigned int bxID)
 
void increment (int mD, unsigned int bxID, int count)
 
 PixelClusterCounts ()
 
std::vector< int > const & readCounts () const
 
std::vector< int > const & readEvents () const
 
std::vector< int > const & readModID () const
 

Private Attributes

std::vector< int > m_counts
 
std::vector< int > m_events
 
std::vector< int > m_ModID
 

Detailed Description

Reconstructed PixelClusterCounts object that will contain the moduleID, BX, and counts.

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 21 of file PixelClusterCounts.h.

Constructor & Destructor Documentation

reco::PixelClusterCounts::PixelClusterCounts ( )
inline

Definition at line 23 of file PixelClusterCounts.h.

static const unsigned int numBX
Definition: LumiConstants.h:8
std::vector< int > m_events

Member Function Documentation

void reco::PixelClusterCounts::add ( reco::PixelClusterCountsInEvent const &  pccInEvent)
inline

Definition at line 36 of file PixelClusterCounts.h.

References reco::PixelClusterCountsInEvent::bxID(), reco::PixelClusterCountsInEvent::counts(), mps_fire::i, increment(), and reco::PixelClusterCountsInEvent::modID().

Referenced by counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

36  {
37  std::vector<int> const& countsInEvent = pccInEvent.counts();
38  std::vector<int> const& modIDInEvent = pccInEvent.modID();
39  int bxIDInEvent = pccInEvent.bxID();
40  for (unsigned int i = 0; i < modIDInEvent.size(); i++) {
41  increment(modIDInEvent[i], bxIDInEvent, countsInEvent.at(i));
42  }
43  }
void increment(int mD, unsigned int bxID, int count)
void reco::PixelClusterCounts::eventCounter ( unsigned int  bxID)
inline

Definition at line 34 of file PixelClusterCounts.h.

References m_events.

34 { m_events.at(bxID - 1)++; }
std::vector< int > m_events
void reco::PixelClusterCounts::increment ( int  mD,
unsigned int  bxID,
int  count 
)
inline

Definition at line 25 of file PixelClusterCounts.h.

References submitPVResolutionJobs::count, HLT_FULL_cff::distance, spr::find(), m_counts, m_ModID, and LumiConstants::numBX.

Referenced by add().

25  {
26  size_t modIndex = std::distance(m_ModID.begin(), std::find(m_ModID.begin(), m_ModID.end(), mD));
27  if (modIndex == m_ModID.size()) {
28  m_ModID.push_back(mD);
29  m_counts.resize(m_counts.size() + LumiConstants::numBX, 0);
30  }
31  m_counts.at(LumiConstants::numBX * modIndex + bxID - 1) += count;
32  }
static const unsigned int numBX
Definition: LumiConstants.h:8
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
std::vector< int > m_counts
std::vector< int > m_ModID
std::vector<int> const& reco::PixelClusterCounts::readCounts ( ) const
inline

Definition at line 45 of file PixelClusterCounts.h.

References m_counts.

Referenced by RawPCCProducer::globalEndLuminosityBlockProduce().

45 { return (m_counts); }
std::vector< int > m_counts
std::vector<int> const& reco::PixelClusterCounts::readEvents ( ) const
inline

Definition at line 46 of file PixelClusterCounts.h.

References m_events.

Referenced by RawPCCProducer::globalEndLuminosityBlockProduce().

46 { return (m_events); }
std::vector< int > m_events
std::vector<int> const& reco::PixelClusterCounts::readModID ( ) const
inline

Definition at line 47 of file PixelClusterCounts.h.

References m_ModID.

Referenced by RawPCCProducer::globalEndLuminosityBlockProduce().

47 { return (m_ModID); }
std::vector< int > m_ModID

Member Data Documentation

std::vector<int> reco::PixelClusterCounts::m_counts
private

Definition at line 50 of file PixelClusterCounts.h.

Referenced by increment(), and readCounts().

std::vector<int> reco::PixelClusterCounts::m_events
private

Definition at line 51 of file PixelClusterCounts.h.

Referenced by eventCounter(), and readEvents().

std::vector<int> reco::PixelClusterCounts::m_ModID
private

Definition at line 52 of file PixelClusterCounts.h.

Referenced by increment(), and readModID().