CMS 3D CMS Logo

EcalDCCHeaderDisplay.cc
Go to the documentation of this file.
1 
12 #include <sstream>
13 
15  : EcalDCCHeaderCollection_(
16  consumes<EcalRawDataCollection>(iConfig.getParameter<edm::InputTag>("EcalDCCHeaderCollection"))) {}
17 
19  const edm::Handle<EcalRawDataCollection>& DCCHeaders = e.getHandle(EcalDCCHeaderCollection_);
20 
21  edm::LogVerbatim("EcalTools") << "\n\n ^^^^^^^^^^^^^^^^^^ [EcalDCCHeaderDisplay] DCCHeaders collection size "
22  << DCCHeaders->size() << std::endl;
23  edm::LogVerbatim("EcalTools") << " [EcalDCCHeaderDisplay] the Header(s)\n" << std::endl;
24  //short dumpConter =0;
25 
26  for (EcalRawDataCollection::const_iterator headerItr = DCCHeaders->begin(); headerItr != DCCHeaders->end();
27  ++headerItr) {
28  // int nevt =headerItr->getLV1();
29  bool skip = false;
30 
31  if (skip) {
32  continue;
33  }
34  edm::LogVerbatim("EcalTools") << "######################################################################";
35  edm::LogVerbatim("EcalTools") << "FedId: " << headerItr->fedId();
36 
37  edm::LogVerbatim("EcalTools") << "DCCErrors: " << headerItr->getDCCErrors();
38  edm::LogVerbatim("EcalTools") << "Run Number: " << headerItr->getRunNumber();
39  edm::LogVerbatim("EcalTools") << "Event number (LV1): " << headerItr->getLV1();
40  edm::LogVerbatim("EcalTools") << "Orbit: " << headerItr->getOrbit();
41  edm::LogVerbatim("EcalTools") << "BX: " << headerItr->getBX();
42  edm::LogVerbatim("EcalTools") << "TRIGGER TYPE: " << headerItr->getBasicTriggerType();
43 
44  edm::LogVerbatim("EcalTools") << "RUNTYPE: " << headerItr->getRunType();
45  edm::LogVerbatim("EcalTools") << "Half: " << headerItr->getRtHalf();
46  edm::LogVerbatim("EcalTools") << "DCCIdInTCCCommand: " << headerItr->getDccInTCCCommand();
47  edm::LogVerbatim("EcalTools") << "MGPA gain: " << headerItr->getMgpaGain();
48  edm::LogVerbatim("EcalTools") << "MEM gain: " << headerItr->getMemGain();
49  EcalDCCHeaderBlock::EcalDCCEventSettings settings = headerItr->getEventSettings();
50  edm::LogVerbatim("EcalTools") << "LaserPower: " << settings.LaserPower;
51  edm::LogVerbatim("EcalTools") << "LAserFilter: " << settings.LaserFilter;
52  edm::LogVerbatim("EcalTools") << "Wavelenght: " << settings.wavelength;
53  edm::LogVerbatim("EcalTools") << "delay: " << settings.delay;
54  edm::LogVerbatim("EcalTools") << "MEM Vinj: " << settings.MEMVinj;
55  edm::LogVerbatim("EcalTools") << "MGPA content: " << settings.mgpa_content;
56  edm::LogVerbatim("EcalTools") << "Ped offset dac: " << settings.ped_offset;
57 
58  edm::LogVerbatim("EcalTools") << "Selective Readout: " << headerItr->getSelectiveReadout();
59  edm::LogVerbatim("EcalTools") << "ZS: " << headerItr->getZeroSuppression();
60  edm::LogVerbatim("EcalTools") << "TZS: " << headerItr->getTestZeroSuppression();
61  edm::LogVerbatim("EcalTools") << "SRStatus: " << headerItr->getSrpStatus();
62 
63  std::vector<short> TCCStatus = headerItr->getTccStatus();
64  edm::LogVerbatim("EcalTools") << "TCC Status size: " << TCCStatus.size();
65  std::ostringstream st0;
66  st0 << "TCC Status: ";
67  for (unsigned u = 0; u < TCCStatus.size(); u++) {
68  st0 << TCCStatus[u] << " ";
69  }
70  edm::LogVerbatim("EcalTools") << st0.str();
71 
72  std::vector<short> TTStatus = headerItr->getFEStatus();
73  edm::LogVerbatim("EcalTools") << "TT Status size: " << TTStatus.size() << std::endl;
74  std::ostringstream st1[100];
75  int k(0), kk(0);
76  st1[k] << "TT Statuses: ";
77  for (unsigned u = 0; u < TTStatus.size(); u++) {
78  ++kk;
79  if (!(u % 14)) {
80  edm::LogVerbatim("EcalTools") << st1[k].str(); // TODO: add space after first six in a row
81  ++k;
82  kk = 0;
83  }
84  st1[k] << TTStatus[u] << " ";
85  }
86  if (kk > 0)
87  edm::LogVerbatim("EcalTools") << st1[k].str();
88  edm::LogVerbatim("EcalTools") << "\n######################################################################";
89  ;
90  }
91 }
Log< level::Info, true > LogVerbatim
const edm::EDGetTokenT< EcalRawDataCollection > EcalDCCHeaderCollection_
void analyze(const edm::Event &e, const edm::EventSetup &c) override
size_type size() const
std::vector< T >::const_iterator const_iterator
const_iterator begin() const
const_iterator end() const
EcalDCCHeaderDisplay(const edm::ParameterSet &ps)
HLT enums.