CMS 3D CMS Logo

Classes | Public Types | Public Member Functions | Public Attributes

CSCNoiseMatrix Class Reference

#include <CSCNoiseMatrix.h>

List of all members.

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

Detailed Description

Definition at line 8 of file CSCNoiseMatrix.h.


Member Typedef Documentation

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

Definition at line 22 of file CSCNoiseMatrix.h.


Constructor & Destructor Documentation

CSCNoiseMatrix::CSCNoiseMatrix ( )

Definition at line 8 of file CSCNoiseMatrix.cc.

{}
CSCNoiseMatrix::~CSCNoiseMatrix ( )

Definition at line 9 of file CSCNoiseMatrix.cc.

{}

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.

{
  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();
}

Member Data Documentation