CMS 3D CMS Logo

CSCMap1Read.cc
Go to the documentation of this file.
7 
8 //
9 // class declaration
10 //
11 
12 class CSCMap1Read : public edm::EDAnalyzer {
13 public:
14  explicit CSCMap1Read(const edm::ParameterSet &);
15  ~CSCMap1Read() override;
16 
17 private:
18  void beginJob() override;
19  void analyze(const edm::Event &, const edm::EventSetup &) override;
20  void endJob() override;
21 };
22 
25 
28 
31  cscmap1 *map = new cscmap1();
32  std::cout << " Connected cscmap ... " << std::endl;
33 
34  // Get information by chamber ID.
35  int chamberid = 122090;
36  std::cout << std::endl;
37  std::cout << std::endl;
38  std::cout << "Method chamberid, input: chamberID " << chamberid << std::endl;
39  std::cout << std::endl;
40  map->chamber(chamberid, &item);
41 
42  std::cout << "cscLabel "
43  << " " << item.chamberLabel << std::endl;
44  std::cout << "cscId "
45  << " " << item.chamberId << std::endl;
46  std::cout << "endcap "
47  << " " << item.endcap << std::endl;
48  std::cout << "station "
49  << " " << item.station << std::endl;
50  std::cout << "ring "
51  << " " << item.ring << std::endl;
52  std::cout << "chamber "
53  << " " << item.chamber << std::endl;
54  std::cout << "cscIndex "
55  << " " << item.cscIndex << std::endl;
56  std::cout << "layerIndex "
57  << " " << item.layerIndex << std::endl;
58  std::cout << "stripIndex "
59  << " " << item.stripIndex << std::endl;
60  std::cout << "anodeIndex "
61  << " " << item.anodeIndex << std::endl;
62  std::cout << "strips "
63  << " " << item.strips << std::endl;
64  std::cout << "anodes "
65  << " " << item.anodes << std::endl;
66  std::cout << "crateLabel "
67  << " " << item.crateLabel << std::endl;
68  std::cout << "crateid "
69  << " " << item.crateid << std::endl;
70  std::cout << "sector "
71  << " " << item.sector << std::endl;
72  std::cout << "trig_sector "
73  << " " << item.trig_sector << std::endl;
74  std::cout << "dmb "
75  << " " << item.dmb << std::endl;
76  std::cout << "cscid "
77  << " " << item.cscid << std::endl;
78  std::cout << "ddu "
79  << " " << item.ddu << std::endl;
80  std::cout << "ddu_input "
81  << " " << item.ddu_input << std::endl;
82  std::cout << "slink "
83  << " " << item.slink << std::endl;
84  std::cout << "fed_crate "
85  << " " << item.fed_crate << std::endl;
86  std::cout << "ddu_slot "
87  << " " << item.ddu_slot << std::endl;
88  std::cout << "dcc_fifo "
89  << " " << item.dcc_fifo << std::endl;
90  std::cout << "fiber_crate "
91  << " " << item.fiber_crate << std::endl;
92  std::cout << "fiber_pos "
93  << " " << item.fiber_pos << std::endl;
94  std::cout << "fiber_socket "
95  << " " << item.fiber_socket << std::endl;
96 
97  // Get information by crateid and dmb.
98  int crateid = 33;
99  int dmb = 7;
100  std::cout << std::endl;
101  std::cout << std::endl;
102  std::cout << "Method cratedmb, input: crateid " << crateid << ", dmb " << dmb << std::endl;
103  std::cout << std::endl;
104  map->cratedmb(crateid, dmb, &item);
105 
106  std::cout << "cscLabel "
107  << " " << item.chamberLabel << std::endl;
108  std::cout << "cscId "
109  << " " << item.chamberId << std::endl;
110  std::cout << "endcap "
111  << " " << item.endcap << std::endl;
112  std::cout << "station "
113  << " " << item.station << std::endl;
114  std::cout << "ring "
115  << " " << item.ring << std::endl;
116  std::cout << "chamber "
117  << " " << item.chamber << std::endl;
118  std::cout << "cscIndex "
119  << " " << item.cscIndex << std::endl;
120  std::cout << "layerIndex "
121  << " " << item.layerIndex << std::endl;
122  std::cout << "stripIndex "
123  << " " << item.stripIndex << std::endl;
124  std::cout << "anodeIndex "
125  << " " << item.anodeIndex << std::endl;
126  std::cout << "strips "
127  << " " << item.strips << std::endl;
128  std::cout << "anodes "
129  << " " << item.anodes << std::endl;
130  std::cout << "crateLabel "
131  << " " << item.crateLabel << std::endl;
132  std::cout << "crateid "
133  << " " << item.crateid << std::endl;
134  std::cout << "sector "
135  << " " << item.sector << std::endl;
136  std::cout << "trig_sector "
137  << " " << item.trig_sector << std::endl;
138  std::cout << "dmb "
139  << " " << item.dmb << std::endl;
140  std::cout << "cscid "
141  << " " << item.cscid << std::endl;
142  std::cout << "ddu "
143  << " " << item.ddu << std::endl;
144  std::cout << "ddu_input "
145  << " " << item.ddu_input << std::endl;
146  std::cout << "slink "
147  << " " << item.slink << std::endl;
148  std::cout << "fed_crate "
149  << " " << item.fed_crate << std::endl;
150  std::cout << "ddu_slot "
151  << " " << item.ddu_slot << std::endl;
152  std::cout << "dcc_fifo "
153  << " " << item.dcc_fifo << std::endl;
154  std::cout << "fiber_crate "
155  << " " << item.fiber_crate << std::endl;
156  std::cout << "fiber_pos "
157  << " " << item.fiber_pos << std::endl;
158  std::cout << "fiber_socket "
159  << " " << item.fiber_socket << std::endl;
160 
161  // Get information by rui and ddu_input.
162  int rui = 2;
163  int ddu_input = 2;
164  std::cout << std::endl;
165  std::cout << std::endl;
166  std::cout << "Method ruiddu, input: rui " << rui << ", ddu_input " << ddu_input << std::endl;
167  std::cout << std::endl;
168  map->ruiddu(rui, ddu_input, &item);
169 
170  std::cout << "cscLabel "
171  << " " << item.chamberLabel << std::endl;
172  std::cout << "cscId "
173  << " " << item.chamberId << std::endl;
174  std::cout << "endcap "
175  << " " << item.endcap << std::endl;
176  std::cout << "station "
177  << " " << item.station << std::endl;
178  std::cout << "ring "
179  << " " << item.ring << std::endl;
180  std::cout << "chamber "
181  << " " << item.chamber << std::endl;
182  std::cout << "cscIndex "
183  << " " << item.cscIndex << std::endl;
184  std::cout << "layerIndex "
185  << " " << item.layerIndex << std::endl;
186  std::cout << "stripIndex "
187  << " " << item.stripIndex << std::endl;
188  std::cout << "anodeIndex "
189  << " " << item.anodeIndex << std::endl;
190  std::cout << "strips "
191  << " " << item.strips << std::endl;
192  std::cout << "anodes "
193  << " " << item.anodes << std::endl;
194  std::cout << "crateLabel "
195  << " " << item.crateLabel << std::endl;
196  std::cout << "crateid "
197  << " " << item.crateid << std::endl;
198  std::cout << "sector "
199  << " " << item.sector << std::endl;
200  std::cout << "trig_sector "
201  << " " << item.trig_sector << std::endl;
202  std::cout << "dmb "
203  << " " << item.dmb << std::endl;
204  std::cout << "cscid "
205  << " " << item.cscid << std::endl;
206  std::cout << "ddu "
207  << " " << item.ddu << std::endl;
208  std::cout << "ddu_input "
209  << " " << item.ddu_input << std::endl;
210  std::cout << "slink "
211  << " " << item.slink << std::endl;
212  std::cout << "fed_crate "
213  << " " << item.fed_crate << std::endl;
214  std::cout << "ddu_slot "
215  << " " << item.ddu_slot << std::endl;
216  std::cout << "dcc_fifo "
217  << " " << item.dcc_fifo << std::endl;
218  std::cout << "fiber_crate "
219  << " " << item.fiber_crate << std::endl;
220  std::cout << "fiber_pos "
221  << " " << item.fiber_pos << std::endl;
222  std::cout << "fiber_socket "
223  << " " << item.fiber_socket << std::endl;
224 }
226  std::cout << "Here is the start" << std::endl;
227  std::cout << "-----------------" << std::endl;
228 }
230  std::cout << "---------------" << std::endl;
231  std::cout << "Here is the end" << std::endl;
232 }
CSCMap1Read::CSCMap1Read
CSCMap1Read(const edm::ParameterSet &)
Definition: CSCMap1Read.cc:26
gather_cfg.cout
cout
Definition: gather_cfg.py:144
EDAnalyzer.h
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
CSCMapItem::MapItem
Definition: CSCMapItem.h:13
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
cscmap1
Definition: CSCMap1.h:9
CSCMap1Read::~CSCMap1Read
~CSCMap1Read() override
Definition: CSCMap1Read.cc:27
CSCMap1Read::endJob
void endJob() override
Definition: CSCMap1Read.cc:229
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
edm::EventSetup
Definition: EventSetup.h:58
CSCMap1Read::beginJob
void beginJob() override
Definition: CSCMap1Read.cc:225
CSCMap1Read
Definition: CSCMap1Read.cc:12
Frameworkfwd.h
EventSetup.h
genParticles_cff.map
map
Definition: genParticles_cff.py:11
ParameterSet.h
CSCMap1Read::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: CSCMap1Read.cc:29
edm::Event
Definition: Event.h:73
CSCMap1.h