CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 }
constexpr double const * pedestalWidth() const
constexpr unsigned nSamples() const
constexpr double const * rawCharge() const
constexpr bool hasTimeInfo() const
constexpr int recoShape() const
constexpr double const * gain() const
constexpr float const * dFcPerADC() const
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
constexpr bool isDropped() const
constexpr uint8_t const * adc() const
constexpr double lambda() const
constexpr double const * pedestal() const
string inf
Definition: EcalCondDB.py:96
constexpr HcalDetId id() const
constexpr int capid() const
constexpr size_t nSamples
constexpr unsigned soi() const
constexpr bool hasCapidError() const
constexpr double fcByPE() const
constexpr bool hasEffectivePedestals() const
constexpr bool hasLinkError() const
constexpr double const * gainWidth() const
long double T
constexpr float const * riseTime() const
constexpr double darkCurrent() const