CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Public Attributes | Private Member Functions | Friends
CSCNoiseMatrix Class Reference

#include <CSCNoiseMatrix.h>

Classes

struct  Item
 

Public Types

typedef std::map< int, std::vector< Item > > NoiseMatrixMap
 

Public Member Functions

 CSCNoiseMatrix ()
 
const Itemitem (const CSCDetId &cscId, int strip) const
 
std::string print () const
 
 ~CSCNoiseMatrix ()
 

Public Attributes

NoiseMatrixMap matrix
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Definition at line 10 of file CSCNoiseMatrix.h.

Member Typedef Documentation

◆ NoiseMatrixMap

typedef std::map<int, std::vector<Item> > CSCNoiseMatrix::NoiseMatrixMap

Definition at line 25 of file CSCNoiseMatrix.h.

Constructor & Destructor Documentation

◆ CSCNoiseMatrix()

CSCNoiseMatrix::CSCNoiseMatrix ( )

Definition at line 8 of file CSCNoiseMatrix.cc.

8 {}

◆ ~CSCNoiseMatrix()

CSCNoiseMatrix::~CSCNoiseMatrix ( )

Definition at line 9 of file CSCNoiseMatrix.cc.

9 {}

Member Function Documentation

◆ item()

const CSCNoiseMatrix::Item & CSCNoiseMatrix::item ( const CSCDetId cscId,
int  strip 
) const

Definition at line 11 of file CSCNoiseMatrix.cc.

11  {
12  CSCIndexer indexer;
13  NoiseMatrixMap::const_iterator mapItr = matrix.find(indexer.dbIndex(cscId, strip));
14  if (mapItr == matrix.end()) {
15  throw cms::Exception("CSCNoiseMatrix") << "Cannot find CSC conditions for chamber " << CSCDetId(cscId);
16  }
17  return mapItr->second.at(strip - 1);
18 }

References CSCIndexer::dbIndex(), Exception, matrix, and digitizers_cfi::strip.

◆ print()

std::string CSCNoiseMatrix::print ( void  ) const

Definition at line 27 of file CSCNoiseMatrix.cc.

27  {
28  std::ostringstream os;
29  for (NoiseMatrixMap::const_iterator mapItr = matrix.begin(); mapItr != matrix.end(); ++mapItr) {
30  os << mapItr->first << " ";
31  for (std::vector<Item>::const_iterator itemItr = mapItr->second.begin(); itemItr != mapItr->second.end();
32  ++itemItr) {
33  os << itemItr->print();
34  }
35  }
36  return os.str();
37 }

References matrix.

◆ serialize()

template<class Archive >
void CSCNoiseMatrix::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 28 of file CSCNoiseMatrix.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 28 of file CSCNoiseMatrix.h.

Member Data Documentation

◆ matrix

NoiseMatrixMap CSCNoiseMatrix::matrix
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
CSCIndexer
Definition: CSCIndexer.h:44
CSCNoiseMatrix::matrix
NoiseMatrixMap matrix
Definition: CSCNoiseMatrix.h:26
CSCDetId
Definition: CSCDetId.h:26
CSCIndexer::dbIndex
int dbIndex(const CSCDetId &id, int &channel)
Definition: CSCIndexer.cc:231
Exception
Definition: hltDiff.cc:245