CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Public Attributes
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

 COND_SERIALIZABLE
 
NoiseMatrixMap matrix
 

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 CSCDetId, CSCIndexer::dbIndex(), edm::hlt::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

Member Data Documentation

CSCNoiseMatrix::COND_SERIALIZABLE

Definition at line 29 of file CSCNoiseMatrix.h.

NoiseMatrixMap CSCNoiseMatrix::matrix