File indexing completed on 2024-04-06 12:00:03
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #include "CaloOnlineTools/EcalTools/plugins/EcalDCCHeaderDisplay.h"
0011 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0012 #include <sstream>
0013
0014 EcalDCCHeaderDisplay::EcalDCCHeaderDisplay(const edm::ParameterSet& iConfig)
0015 : EcalDCCHeaderCollection_(
0016 consumes<EcalRawDataCollection>(iConfig.getParameter<edm::InputTag>("EcalDCCHeaderCollection"))) {}
0017
0018 void EcalDCCHeaderDisplay::analyze(const edm::Event& e, const edm::EventSetup& c) {
0019 const edm::Handle<EcalRawDataCollection>& DCCHeaders = e.getHandle(EcalDCCHeaderCollection_);
0020
0021 edm::LogVerbatim("EcalTools") << "\n\n ^^^^^^^^^^^^^^^^^^ [EcalDCCHeaderDisplay] DCCHeaders collection size "
0022 << DCCHeaders->size() << std::endl;
0023 edm::LogVerbatim("EcalTools") << " [EcalDCCHeaderDisplay] the Header(s)\n" << std::endl;
0024
0025
0026 for (EcalRawDataCollection::const_iterator headerItr = DCCHeaders->begin(); headerItr != DCCHeaders->end();
0027 ++headerItr) {
0028
0029 bool skip = false;
0030
0031 if (skip) {
0032 continue;
0033 }
0034 edm::LogVerbatim("EcalTools") << "######################################################################";
0035 edm::LogVerbatim("EcalTools") << "FedId: " << headerItr->fedId();
0036
0037 edm::LogVerbatim("EcalTools") << "DCCErrors: " << headerItr->getDCCErrors();
0038 edm::LogVerbatim("EcalTools") << "Run Number: " << headerItr->getRunNumber();
0039 edm::LogVerbatim("EcalTools") << "Event number (LV1): " << headerItr->getLV1();
0040 edm::LogVerbatim("EcalTools") << "Orbit: " << headerItr->getOrbit();
0041 edm::LogVerbatim("EcalTools") << "BX: " << headerItr->getBX();
0042 edm::LogVerbatim("EcalTools") << "TRIGGER TYPE: " << headerItr->getBasicTriggerType();
0043
0044 edm::LogVerbatim("EcalTools") << "RUNTYPE: " << headerItr->getRunType();
0045 edm::LogVerbatim("EcalTools") << "Half: " << headerItr->getRtHalf();
0046 edm::LogVerbatim("EcalTools") << "DCCIdInTCCCommand: " << headerItr->getDccInTCCCommand();
0047 edm::LogVerbatim("EcalTools") << "MGPA gain: " << headerItr->getMgpaGain();
0048 edm::LogVerbatim("EcalTools") << "MEM gain: " << headerItr->getMemGain();
0049 EcalDCCHeaderBlock::EcalDCCEventSettings settings = headerItr->getEventSettings();
0050 edm::LogVerbatim("EcalTools") << "LaserPower: " << settings.LaserPower;
0051 edm::LogVerbatim("EcalTools") << "LAserFilter: " << settings.LaserFilter;
0052 edm::LogVerbatim("EcalTools") << "Wavelenght: " << settings.wavelength;
0053 edm::LogVerbatim("EcalTools") << "delay: " << settings.delay;
0054 edm::LogVerbatim("EcalTools") << "MEM Vinj: " << settings.MEMVinj;
0055 edm::LogVerbatim("EcalTools") << "MGPA content: " << settings.mgpa_content;
0056 edm::LogVerbatim("EcalTools") << "Ped offset dac: " << settings.ped_offset;
0057
0058 edm::LogVerbatim("EcalTools") << "Selective Readout: " << headerItr->getSelectiveReadout();
0059 edm::LogVerbatim("EcalTools") << "ZS: " << headerItr->getZeroSuppression();
0060 edm::LogVerbatim("EcalTools") << "TZS: " << headerItr->getTestZeroSuppression();
0061 edm::LogVerbatim("EcalTools") << "SRStatus: " << headerItr->getSrpStatus();
0062
0063 std::vector<short> TCCStatus = headerItr->getTccStatus();
0064 edm::LogVerbatim("EcalTools") << "TCC Status size: " << TCCStatus.size();
0065 std::ostringstream st0;
0066 st0 << "TCC Status: ";
0067 for (unsigned u = 0; u < TCCStatus.size(); u++) {
0068 st0 << TCCStatus[u] << " ";
0069 }
0070 edm::LogVerbatim("EcalTools") << st0.str();
0071
0072 std::vector<short> TTStatus = headerItr->getFEStatus();
0073 edm::LogVerbatim("EcalTools") << "TT Status size: " << TTStatus.size() << std::endl;
0074 std::ostringstream st1[100];
0075 int k(0), kk(0);
0076 st1[k] << "TT Statuses: ";
0077 for (unsigned u = 0; u < TTStatus.size(); u++) {
0078 ++kk;
0079 if (!(u % 14)) {
0080 edm::LogVerbatim("EcalTools") << st1[k].str();
0081 ++k;
0082 kk = 0;
0083 }
0084 st1[k] << TTStatus[u] << " ";
0085 }
0086 if (kk > 0)
0087 edm::LogVerbatim("EcalTools") << st1[k].str();
0088 edm::LogVerbatim("EcalTools") << "\n######################################################################";
0089 ;
0090 }
0091 }