CMS 3D CMS Logo

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