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

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

Definition at line 26 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 CSCIndexer::dbIndex(), Exception, and matrix.

Referenced by Vispa.Views.TableView.TableView::_selectedRow(), Vispa.Views.TableView.TableView::itemSelectionChanged(), Vispa.Views.TableView.TableView::select(), and Vispa.Views.TableView.TableView::selection().

12 {
13  CSCIndexer indexer;
14  NoiseMatrixMap::const_iterator mapItr = matrix.find( indexer.dbIndex(cscId, strip) );
15  if(mapItr == matrix.end())
16  {
17  throw cms::Exception("CSCNoiseMatrix")
18  << "Cannot find CSC conditions for chamber " << CSCDetId(cscId);
19  }
20  return mapItr->second.at(strip-1);
21 }
int dbIndex(const CSCDetId &id, int &channel)
Definition: CSCIndexer.cc:240
NoiseMatrixMap matrix
std::string CSCNoiseMatrix::print ( void  ) const

Definition at line 33 of file CSCNoiseMatrix.cc.

References matrix.

34 {
35  std::ostringstream os;
36  for(NoiseMatrixMap::const_iterator mapItr = matrix.begin(); mapItr != matrix.end(); ++mapItr)
37  {
38  os << mapItr->first<< " ";
39  for(std::vector<Item>::const_iterator itemItr = mapItr->second.begin();
40  itemItr != mapItr->second.end(); ++itemItr)
41  {
42  os << itemItr->print();
43  }
44  }
45  return os.str();
46 }
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 29 of file CSCNoiseMatrix.h.

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

Definition at line 29 of file CSCNoiseMatrix.h.

Member Data Documentation

NoiseMatrixMap CSCNoiseMatrix::matrix