CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCDBGains.cc
Go to the documentation of this file.
3 
6 
7 const CSCDBGains::Item & CSCDBGains::item(const CSCDetId & cscId, int strip) const
8 {
9  CSCIndexer indexer;
10  // return gains.at( indexer.stripChannelIndex(cscId, strip)-1 ); // if we worry about range
11  return gains[ indexer.stripChannelIndex(cscId, strip)-1 ]; // no worries about range!
12 }
13 
14 std::ostream & operator<<(std::ostream & os, const CSCDBGains & cscDbGains)
15 {
16  CSCIndexer indexer;
17  for(size_t i = 0; i < cscDbGains.gains.size(); ++i)
18  {
19  std::pair<CSCDetId, CSCIndexer::IndexType> indexPair = indexer.detIdFromStripChannelIndex(i);
20  os << indexPair.first << " strip:" << indexPair.second
21  << " slope:" << cscDbGains.gains[i].gain_slope << "\n";
22  }
23  return os;
24 }
std::pair< CSCDetId, IndexType > detIdFromStripChannelIndex(LongIndexType ichi) const
Definition: CSCIndexer.cc:129
int i
Definition: DBlmapReader.cc:9
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
GainContainer gains
Definition: CSCDBGains.h:27
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
const Item & item(const CSCDetId &cscId, int strip) const
Definition: CSCDBGains.cc:7
LongIndexType stripChannelIndex(IndexType ie, IndexType is, IndexType ir, IndexType ic, IndexType il, IndexType istrip) const
Definition: CSCIndexer.h:176