CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
reco::PixelClusterCounts Class Reference

#include <PixelClusterCounts.h>

Public Member Functions

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.ib@c.nosp@m.ern.c.nosp@m.h and Chris Palmer capal.nosp@m.mer@.nosp@m.cern..nosp@m.ch

Definition at line 23 of file PixelClusterCounts.h.

Constructor & Destructor Documentation

reco::PixelClusterCounts::PixelClusterCounts ( )
inline

Definition at line 26 of file PixelClusterCounts.h.

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

Member Function Documentation

void reco::PixelClusterCounts::eventCounter ( unsigned int  bxID)
inline

Definition at line 37 of file PixelClusterCounts.h.

References m_events.

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

Definition at line 28 of file PixelClusterCounts.h.

References KineDebug3::count(), SoftLeptonByDistance_cfi::distance, spr::find(), m_counts, m_ModID, and LumiConstants::numBX.

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

Definition at line 41 of file PixelClusterCounts.h.

References m_counts.

Referenced by RawPCCProducer::globalEndLuminosityBlockProduce().

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

Definition at line 44 of file PixelClusterCounts.h.

References m_events.

Referenced by RawPCCProducer::globalEndLuminosityBlockProduce().

44  {
45  return(m_events);
46  }
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  {
48  return(m_ModID);
49  }
std::vector< int > m_ModID

Member Data Documentation

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

Definition at line 52 of file PixelClusterCounts.h.

Referenced by increment(), and readCounts().

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

Definition at line 53 of file PixelClusterCounts.h.

Referenced by eventCounter(), and readEvents().

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

Definition at line 54 of file PixelClusterCounts.h.

Referenced by increment(), and readModID().