File indexing completed on 2024-04-06 12:02:07
0001
0002
0003
0004
0005
0006
0007
0008 #include <stdexcept>
0009 #include <string>
0010 #include <iostream>
0011 #include <map>
0012 #include "FWCore/Framework/interface/ESHandle.h"
0013 #include "FWCore/Framework/interface/MakerMacros.h"
0014
0015 #include "CondFormats/DTObjects/test/stubs/DTDeadPrint.h"
0016
0017 namespace edmtest {
0018
0019 DTDeadPrint::DTDeadPrint(edm::ParameterSet const& p) : es_token(esConsumes()) {}
0020
0021 DTDeadPrint::DTDeadPrint(int i) {}
0022
0023 void DTDeadPrint::analyze(const edm::Event& e, const edm::EventSetup& context) {
0024 using namespace edm::eventsetup;
0025
0026 std::cout << " I AM IN RUN NUMBER " << e.id().run() << std::endl;
0027 std::cout << " ---EVENT NUMBER " << e.id().event() << std::endl;
0028 const auto& dList = context.getData(es_token);
0029 std::cout << dList.version() << std::endl;
0030 std::cout << std::distance(dList.begin(), dList.end()) << " data in the container" << std::endl;
0031 DTDeadFlag::const_iterator iter = dList.begin();
0032 DTDeadFlag::const_iterator iend = dList.end();
0033 while (iter != iend) {
0034 const std::pair<DTDeadFlagId, DTDeadFlagData>& data = *iter++;
0035 const DTDeadFlagId& id = data.first;
0036 const DTDeadFlagData& st = data.second;
0037 std::cout << id.wheelId << " " << id.stationId << " " << id.sectorId << " " << id.slId << " " << id.layerId << " "
0038 << id.cellId << " -> " << st.dead_HV << " " << st.dead_TP << " " << st.dead_RO << " " << st.discCat
0039 << std::endl;
0040 }
0041 }
0042 DEFINE_FWK_MODULE(DTDeadPrint);
0043 }