#include "EventFilter/EcalRawToDigi/plugins/EcalRawToDigi.h"
#include "EventFilter/EcalRawToDigi/interface/EcalElectronicsMapper.h"
#include "EventFilter/EcalRawToDigi/interface/DCCDataUnpacker.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "Geometry/EcalMapping/interface/EcalElectronicsMapping.h"
#include "DataFormats/EcalRawData/interface/EcalListOfFEDS.h"
#include "CondFormats/EcalObjects/interface/EcalChannelStatus.h"
#include "CondFormats/DataRecord/interface/EcalChannelStatusRcd.h"
Go to the source code of this file.
Functions | |
void | printStatusRecords (const DCCDataUnpacker *unpacker, const EcalElectronicsMapping *mapping) |
void printStatusRecords | ( | const DCCDataUnpacker * | unpacker, |
const EcalElectronicsMapping * | mapping | ||
) |
Definition at line 180 of file EcalRawToDigi.cc.
References gather_cfg::cout, EcalElectronicsId::dccId(), DCCDataUnpacker::electronicsMapper(), DCCDataUnpacker::getChannelValue(), EcalElectronicsMapper::getDCCId(), EcalElectronicsMapping::getElectronicsId(), i, EBDetId::kSizeForDenseIndexing, EEDetId::kSizeForDenseIndexing, EcalElectronicsId::stripId(), EcalElectronicsId::towerId(), EBDetId::unhashIndex(), EEDetId::unhashIndex(), and EcalElectronicsId::xtalId().
{ // Endcap std::cout << "===> ENDCAP" << std::endl; for (int i = 0; i < EEDetId::kSizeForDenseIndexing; ++i) { const EEDetId id = EEDetId::unhashIndex(i); if (!id.null()) { // channel status const uint16_t code = unpacker->getChannelValue(id); if (code) { const EcalElectronicsId ei = mapping->getElectronicsId(id); // convert DCC ID (1 - 54) to FED ID (601 - 654) const int fed_id = unpacker->electronicsMapper()->getDCCId(ei.dccId()); std::cout << " id " << id.rawId() << " -> (" << id.ix() << ", " << id.iy() << ", " << id.zside() << ") " << "(" << ei.dccId() << " : " << fed_id << ", " << ei.towerId() << ", " << ei.stripId() << ", " << ei.xtalId() << ") " << "status = " << code << std::endl; } } } std::cout << "<=== ENDCAP" << std::endl; std::cout << "===> BARREL" << std::endl; for (int i = 0; i < EBDetId::kSizeForDenseIndexing; ++i) { const EBDetId id = EBDetId::unhashIndex(i); if (!id.null()) { // channel status const uint16_t code = unpacker->getChannelValue(id); if (code) { const EcalElectronicsId ei = mapping->getElectronicsId(id); // convert DCC ID (1 - 54) to FED ID (601 - 654) const int fed_id = unpacker->electronicsMapper()->getDCCId(ei.dccId()); std::cout << " id " << id.rawId() << " -> (" << id.ieta() << ", " << id.iphi() << ", " << id.zside() << ") " << "(" << ei.dccId() << " : " << fed_id << ", " << ei.towerId() << ", " << ei.stripId() << ", " << ei.xtalId() << ") " << "status = " << code << std::endl; } } } std::cout << "<=== BARREL" << std::endl; }