CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

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

Definition at line 25 of file CSCNoiseMatrix.h.

Constructor & Destructor Documentation

CSCNoiseMatrix::CSCNoiseMatrix ( )

Definition at line 8 of file CSCNoiseMatrix.cc.

8 {}
CSCNoiseMatrix::~CSCNoiseMatrix ( )

Definition at line 9 of file CSCNoiseMatrix.cc.

9 {}

Member Function Documentation

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

Definition at line 11 of file CSCNoiseMatrix.cc.

References CSCDetId, CSCIndexer::dbIndex(), Exception, and matrix.

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 }
int dbIndex(const CSCDetId &id, int &channel)
Definition: CSCIndexer.cc:231
NoiseMatrixMap matrix
std::string CSCNoiseMatrix::print ( void  ) const

Definition at line 27 of file CSCNoiseMatrix.cc.

References matrix.

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 }
NoiseMatrixMap matrix
template<class Archive >
void CSCNoiseMatrix::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 28 of file CSCNoiseMatrix.h.

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

Definition at line 28 of file CSCNoiseMatrix.h.

Member Data Documentation

NoiseMatrixMap CSCNoiseMatrix::matrix