File indexing completed on 2023-03-17 11:14:57
0001 #include "FWCore/Framework/interface/Frameworkfwd.h"
0002 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0003 #include "FWCore/Framework/interface/Event.h"
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005 #include "FWCore/Framework/interface/EventSetup.h"
0006 #include "OnlineDB/CSCCondDB/interface/CSCMap1.h"
0007
0008
0009
0010
0011
0012 class CSCMap1Read : public edm::one::EDAnalyzer<> {
0013 public:
0014 explicit CSCMap1Read(const edm::ParameterSet &);
0015 ~CSCMap1Read() override = default;
0016
0017 private:
0018 void beginJob() override;
0019 void analyze(const edm::Event &, const edm::EventSetup &) override;
0020 void endJob() override;
0021 };
0022
0023 #include "FWCore/Framework/interface/MakerMacros.h"
0024 DEFINE_FWK_MODULE(CSCMap1Read);
0025
0026 CSCMap1Read::CSCMap1Read(const edm::ParameterSet &) {}
0027
0028 void CSCMap1Read::analyze(const edm::Event &, const edm::EventSetup &) {
0029 CSCMapItem::MapItem item;
0030 cscmap1 *map = new cscmap1();
0031 std::cout << " Connected cscmap ... " << std::endl;
0032
0033
0034 int chamberid = 122090;
0035 std::cout << std::endl;
0036 std::cout << std::endl;
0037 std::cout << "Method chamberid, input: chamberID " << chamberid << std::endl;
0038 std::cout << std::endl;
0039 map->chamber(chamberid, &item);
0040
0041 std::cout << "cscLabel "
0042 << " " << item.chamberLabel << std::endl;
0043 std::cout << "cscId "
0044 << " " << item.chamberId << std::endl;
0045 std::cout << "endcap "
0046 << " " << item.endcap << std::endl;
0047 std::cout << "station "
0048 << " " << item.station << std::endl;
0049 std::cout << "ring "
0050 << " " << item.ring << std::endl;
0051 std::cout << "chamber "
0052 << " " << item.chamber << std::endl;
0053 std::cout << "cscIndex "
0054 << " " << item.cscIndex << std::endl;
0055 std::cout << "layerIndex "
0056 << " " << item.layerIndex << std::endl;
0057 std::cout << "stripIndex "
0058 << " " << item.stripIndex << std::endl;
0059 std::cout << "anodeIndex "
0060 << " " << item.anodeIndex << std::endl;
0061 std::cout << "strips "
0062 << " " << item.strips << std::endl;
0063 std::cout << "anodes "
0064 << " " << item.anodes << std::endl;
0065 std::cout << "crateLabel "
0066 << " " << item.crateLabel << std::endl;
0067 std::cout << "crateid "
0068 << " " << item.crateid << std::endl;
0069 std::cout << "sector "
0070 << " " << item.sector << std::endl;
0071 std::cout << "trig_sector "
0072 << " " << item.trig_sector << std::endl;
0073 std::cout << "dmb "
0074 << " " << item.dmb << std::endl;
0075 std::cout << "cscid "
0076 << " " << item.cscid << std::endl;
0077 std::cout << "ddu "
0078 << " " << item.ddu << std::endl;
0079 std::cout << "ddu_input "
0080 << " " << item.ddu_input << std::endl;
0081 std::cout << "slink "
0082 << " " << item.slink << std::endl;
0083 std::cout << "fed_crate "
0084 << " " << item.fed_crate << std::endl;
0085 std::cout << "ddu_slot "
0086 << " " << item.ddu_slot << std::endl;
0087 std::cout << "dcc_fifo "
0088 << " " << item.dcc_fifo << std::endl;
0089 std::cout << "fiber_crate "
0090 << " " << item.fiber_crate << std::endl;
0091 std::cout << "fiber_pos "
0092 << " " << item.fiber_pos << std::endl;
0093 std::cout << "fiber_socket "
0094 << " " << item.fiber_socket << std::endl;
0095
0096
0097 int crateid = 33;
0098 int dmb = 7;
0099 std::cout << std::endl;
0100 std::cout << std::endl;
0101 std::cout << "Method cratedmb, input: crateid " << crateid << ", dmb " << dmb << std::endl;
0102 std::cout << std::endl;
0103 map->cratedmb(crateid, dmb, &item);
0104
0105 std::cout << "cscLabel "
0106 << " " << item.chamberLabel << std::endl;
0107 std::cout << "cscId "
0108 << " " << item.chamberId << std::endl;
0109 std::cout << "endcap "
0110 << " " << item.endcap << std::endl;
0111 std::cout << "station "
0112 << " " << item.station << std::endl;
0113 std::cout << "ring "
0114 << " " << item.ring << std::endl;
0115 std::cout << "chamber "
0116 << " " << item.chamber << std::endl;
0117 std::cout << "cscIndex "
0118 << " " << item.cscIndex << std::endl;
0119 std::cout << "layerIndex "
0120 << " " << item.layerIndex << std::endl;
0121 std::cout << "stripIndex "
0122 << " " << item.stripIndex << std::endl;
0123 std::cout << "anodeIndex "
0124 << " " << item.anodeIndex << std::endl;
0125 std::cout << "strips "
0126 << " " << item.strips << std::endl;
0127 std::cout << "anodes "
0128 << " " << item.anodes << std::endl;
0129 std::cout << "crateLabel "
0130 << " " << item.crateLabel << std::endl;
0131 std::cout << "crateid "
0132 << " " << item.crateid << std::endl;
0133 std::cout << "sector "
0134 << " " << item.sector << std::endl;
0135 std::cout << "trig_sector "
0136 << " " << item.trig_sector << std::endl;
0137 std::cout << "dmb "
0138 << " " << item.dmb << std::endl;
0139 std::cout << "cscid "
0140 << " " << item.cscid << std::endl;
0141 std::cout << "ddu "
0142 << " " << item.ddu << std::endl;
0143 std::cout << "ddu_input "
0144 << " " << item.ddu_input << std::endl;
0145 std::cout << "slink "
0146 << " " << item.slink << std::endl;
0147 std::cout << "fed_crate "
0148 << " " << item.fed_crate << std::endl;
0149 std::cout << "ddu_slot "
0150 << " " << item.ddu_slot << std::endl;
0151 std::cout << "dcc_fifo "
0152 << " " << item.dcc_fifo << std::endl;
0153 std::cout << "fiber_crate "
0154 << " " << item.fiber_crate << std::endl;
0155 std::cout << "fiber_pos "
0156 << " " << item.fiber_pos << std::endl;
0157 std::cout << "fiber_socket "
0158 << " " << item.fiber_socket << std::endl;
0159
0160
0161 int rui = 2;
0162 int ddu_input = 2;
0163 std::cout << std::endl;
0164 std::cout << std::endl;
0165 std::cout << "Method ruiddu, input: rui " << rui << ", ddu_input " << ddu_input << std::endl;
0166 std::cout << std::endl;
0167 map->ruiddu(rui, ddu_input, &item);
0168
0169 std::cout << "cscLabel "
0170 << " " << item.chamberLabel << std::endl;
0171 std::cout << "cscId "
0172 << " " << item.chamberId << std::endl;
0173 std::cout << "endcap "
0174 << " " << item.endcap << std::endl;
0175 std::cout << "station "
0176 << " " << item.station << std::endl;
0177 std::cout << "ring "
0178 << " " << item.ring << std::endl;
0179 std::cout << "chamber "
0180 << " " << item.chamber << std::endl;
0181 std::cout << "cscIndex "
0182 << " " << item.cscIndex << std::endl;
0183 std::cout << "layerIndex "
0184 << " " << item.layerIndex << std::endl;
0185 std::cout << "stripIndex "
0186 << " " << item.stripIndex << std::endl;
0187 std::cout << "anodeIndex "
0188 << " " << item.anodeIndex << std::endl;
0189 std::cout << "strips "
0190 << " " << item.strips << std::endl;
0191 std::cout << "anodes "
0192 << " " << item.anodes << std::endl;
0193 std::cout << "crateLabel "
0194 << " " << item.crateLabel << std::endl;
0195 std::cout << "crateid "
0196 << " " << item.crateid << std::endl;
0197 std::cout << "sector "
0198 << " " << item.sector << std::endl;
0199 std::cout << "trig_sector "
0200 << " " << item.trig_sector << std::endl;
0201 std::cout << "dmb "
0202 << " " << item.dmb << std::endl;
0203 std::cout << "cscid "
0204 << " " << item.cscid << std::endl;
0205 std::cout << "ddu "
0206 << " " << item.ddu << std::endl;
0207 std::cout << "ddu_input "
0208 << " " << item.ddu_input << std::endl;
0209 std::cout << "slink "
0210 << " " << item.slink << std::endl;
0211 std::cout << "fed_crate "
0212 << " " << item.fed_crate << std::endl;
0213 std::cout << "ddu_slot "
0214 << " " << item.ddu_slot << std::endl;
0215 std::cout << "dcc_fifo "
0216 << " " << item.dcc_fifo << std::endl;
0217 std::cout << "fiber_crate "
0218 << " " << item.fiber_crate << std::endl;
0219 std::cout << "fiber_pos "
0220 << " " << item.fiber_pos << std::endl;
0221 std::cout << "fiber_socket "
0222 << " " << item.fiber_socket << std::endl;
0223 }
0224 void CSCMap1Read::beginJob() {
0225 std::cout << "Here is the start" << std::endl;
0226 std::cout << "-----------------" << std::endl;
0227 }
0228 void CSCMap1Read::endJob() {
0229 std::cout << "---------------" << std::endl;
0230 std::cout << "Here is the end" << std::endl;
0231 }