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 }
mps_fire.i
i
Definition: mps_fire.py:428
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
PresampleTask_cfi.nSamples
nSamples
Definition: PresampleTask_cfi.py:7
alignCSCRings.s
s
Definition: alignCSCRings.py:92
operator<<
std::ostream & operator<<(std::ostream &s, const HBHEChannelInfo &inf)
Definition: HBHEChannelInfo.cc:21
HBHEChannelInfo.h
dqmiodatasetharvest.inf
inf
Definition: dqmiodatasetharvest.py:38
T
long double T
Definition: Basic3DVectorLD.h:48
HBHEChannelInfo
Definition: HBHEChannelInfo.h:15