CMS 3D CMS Logo

HBHEChannelInfo.cc
Go to the documentation of this file.
2 
3 namespace {
4  template <typename T>
5  void dumpArray(std::ostream& s, const char* p, const T* arr, const unsigned len) {
6  s << ' ' << p;
7  for (unsigned i = 0; i < len; ++i) {
8  s << ' ' << *arr++;
9  }
10  }
11 
12  template <typename T>
13  void dumpArrayAsUnsigned(std::ostream& s, const char* p, const T* arr, const unsigned len) {
14  s << ' ' << p;
15  for (unsigned i = 0; i < len; ++i) {
16  s << ' ' << static_cast<unsigned>(*arr++);
17  }
18  }
19 } // namespace
20 
21 std::ostream& operator<<(std::ostream& s, const HBHEChannelInfo& inf) {
22  const unsigned nSamples = inf.nSamples();
23 
24  s << inf.id() << " :"
25  << " recoShape " << inf.recoShape() << " nSamples " << nSamples << " soi " << inf.soi() << " capid " << inf.capid()
26  << " hasTDC " << inf.hasTimeInfo() << " hasEffPeds " << inf.hasEffectivePedestals() << " dropped "
27  << inf.isDropped() << " linkErr " << inf.hasLinkError() << " capidErr " << inf.hasCapidError() << " darkI "
28  << inf.darkCurrent() << " fcByPE " << inf.fcByPE() << " lambda " << inf.lambda();
29  dumpArray(s, "rawCharge", inf.rawCharge(), nSamples);
30  dumpArray(s, "peds", inf.pedestal(), nSamples);
31  dumpArray(s, "noise", inf.pedestalWidth(), nSamples);
32  dumpArray(s, "gain", inf.gain(), nSamples);
33  dumpArray(s, "gainWidth", inf.gainWidth(), nSamples);
34  dumpArray(s, "dFcPerADC", inf.dFcPerADC(), nSamples);
35  dumpArrayAsUnsigned(s, "adc", inf.adc(), nSamples);
36  if (inf.hasTimeInfo()) {
37  dumpArray(s, "tdc", inf.riseTime(), nSamples);
38  }
39 
40  return s;
41 }
std::ostream & operator<<(std::ostream &s, const HBHEChannelInfo &inf)
long double T