#include <CSCNoiseMatrix.h>
Classes | |
struct | Item |
Public Types | |
typedef std::map< int, std::vector< Item > > | NoiseMatrixMap |
Public Member Functions | |
CSCNoiseMatrix () | |
const Item & | item (const CSCDetId &cscId, int strip) const |
std::string | print () const |
~CSCNoiseMatrix () | |
Public Attributes | |
NoiseMatrixMap | matrix |
Definition at line 8 of file CSCNoiseMatrix.h.
typedef std::map< int,std::vector<Item> > CSCNoiseMatrix::NoiseMatrixMap |
Definition at line 22 of file CSCNoiseMatrix.h.
CSCNoiseMatrix::CSCNoiseMatrix | ( | ) |
Definition at line 8 of file CSCNoiseMatrix.cc.
{}
CSCNoiseMatrix::~CSCNoiseMatrix | ( | ) |
Definition at line 9 of file CSCNoiseMatrix.cc.
{}
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.
{ CSCIndexer indexer; NoiseMatrixMap::const_iterator mapItr = matrix.find( indexer.dbIndex(cscId, strip) ); if(mapItr == matrix.end()) { throw cms::Exception("CSCNoiseMatrix") << "Cannot find CSC conditions for chamber " << CSCDetId(cscId); } return mapItr->second.at(strip-1); }
std::string CSCNoiseMatrix::print | ( | void | ) | const |
Definition at line 33 of file CSCNoiseMatrix.cc.
References matrix.
{ std::ostringstream os; for(NoiseMatrixMap::const_iterator mapItr = matrix.begin(); mapItr != matrix.end(); ++mapItr) { os << mapItr->first<< " "; for(std::vector<Item>::const_iterator itemItr = mapItr->second.begin(); itemItr != mapItr->second.end(); ++itemItr) { os << itemItr->print(); } } return os.str(); }
Definition at line 23 of file CSCNoiseMatrix.h.
Referenced by item(), CSCFakeNoiseMatrixConditions::prefillNoiseMatrix(), CSCNoiseMatrixConditions::prefillNoiseMatrix(), and print().