CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCViewDigi.cc
Go to the documentation of this file.
1 //
3 // Package: CSCViewDigi
4 // Class: CSCViewDigi
5 //
15 //
16 // Original Author: Alexandre Sakharov
17 // Created: Sun May 10 15:43:28 CEST 2009
18 // $Id: CSCViewDigi.cc,v 1.4 2010/06/11 15:50:27 asakharo Exp $
19 //
20 //
21 
23 //#include "CSCViewDigi.h"
24 
25 //
26 // constructors and destructor
27 //
29 : wireDigiTag_(conf.getParameter<edm::InputTag>("wireDigiTag")),
30  alctDigiTag_(conf.getParameter<edm::InputTag>("alctDigiTag")),
31  clctDigiTag_(conf.getParameter<edm::InputTag>("clctDigiTag")),
32  corrclctDigiTag_(conf.getParameter<edm::InputTag>("corrclctDigiTag")),
33  stripDigiTag_(conf.getParameter<edm::InputTag>("stripDigiTag")),
34  comparatorDigiTag_(conf.getParameter<edm::InputTag>("comparatorDigiTag")),
35  rpcDigiTag_(conf.getParameter<edm::InputTag>("rpcDigiTag")),
36  statusDigiTag_(conf.getParameter<edm::InputTag>("statusDigiTag")),
37  DDUstatusDigiTag_(conf.getParameter<edm::InputTag>("DDUstatusDigiTag")),
38  DCCstatusDigiTag_(conf.getParameter<edm::InputTag>("DCCstatusDigiTag"))
39 {
40 WiresDigiDump=conf.getUntrackedParameter<bool>("WiresDigiDump", false);
41 StripDigiDump=conf.getUntrackedParameter<bool>("StripDigiDump", false);
42 AlctDigiDump=conf.getUntrackedParameter<bool>("AlctDigiDump", false);
43 ClctDigiDump=conf.getUntrackedParameter<bool>("ClctDigiDump", false);
44 CorrClctDigiDump=conf.getUntrackedParameter<bool>("CorrClctDigiDump", false);
45 ComparatorDigiDump=conf.getUntrackedParameter<bool>("ComparatorDigiDump", false);
46 RpcDigiDump=conf.getUntrackedParameter<bool>("RpcDigiDump", false);
47 StatusDigiDump=conf.getUntrackedParameter<bool>("StatusDigiDump", false);
48 DDUStatusDigiDump=conf.getUntrackedParameter<bool>("DDUStatus",false);
49 DCCStatusDigiDump=conf.getUntrackedParameter<bool>("DCCStatus",false);
50 }
51 
52 
54 {
55 
56  // do anything here that needs to be done at desctruction time
57  // (e.g. close files, deallocate resources etc.)
58 
59 }
60 
61 
62 //
63 // member functions
64 //
65 
66 // ------------ method called to for each event ------------
67 void
69 {
70  using namespace edm;
71 
82 
83  iEvent.getByLabel(wireDigiTag_,wires);
85  iEvent.getByLabel(comparatorDigiTag_,comparators);
86  iEvent.getByLabel(rpcDigiTag_,rpcs);
87  iEvent.getByLabel(alctDigiTag_,alcts);
88  iEvent.getByLabel(clctDigiTag_,clcts);
89  iEvent.getByLabel(corrclctDigiTag_,corrclcts);
90 
91  if(StatusDigiDump)
92  iEvent.getByLabel(statusDigiTag_,statusdigis);
93 
95  iEvent.getByLabel(DDUstatusDigiTag_,DDUstatusdigi);
96 
98  iEvent.getByLabel(DCCstatusDigiTag_,DCCstatusdigi);
99 
100 
101  if(WiresDigiDump){
102  std::cout << std::endl;
103  std::cout << "Event " << iEvent.id() << std::endl;
104  std::cout << std::endl;
105  std::cout << "********WIRES Digis********" << std::endl;
106  for (CSCWireDigiCollection::DigiRangeIterator j=wires->begin(); j!=wires->end(); j++) {
107  std::cout << "Wire digis from "<< CSCDetId((*j).first) << std::endl;
108  std::vector<CSCWireDigi>::const_iterator digiItr = (*j).second.first;
109  std::vector<CSCWireDigi>::const_iterator last = (*j).second.second;
110  for( ; digiItr != last; ++digiItr) {
111  digiItr->print();
112  }
113  }
114  }
115 
116  if(StripDigiDump){
117  std::cout << std::endl;
118  std::cout << "Event " << iEvent.id() << std::endl;
119  std::cout << std::endl;
120  std::cout << "********STRIPS Digis********" << std::endl;
121  for (CSCStripDigiCollection::DigiRangeIterator j=strips->begin(); j!=strips->end(); j++) {
122  std::cout << "Strip digis from "<< CSCDetId((*j).first) << std::endl;
123  std::vector<CSCStripDigi>::const_iterator digiItr = (*j).second.first;
124  std::vector<CSCStripDigi>::const_iterator last = (*j).second.second;
125  for( ; digiItr != last; ++digiItr) {
126  digiItr->print();
127  }
128  }
129  }
130 
131  if(ComparatorDigiDump){
132  std::cout << std::endl;
133  std::cout << "Event " << iEvent.id() << std::endl;
134  std::cout << std::endl;
135  std::cout << "********COMPARATOR Digis********" << std::endl;
136  for (CSCComparatorDigiCollection::DigiRangeIterator j=comparators->begin(); j!=comparators->end(); j++) {
137  std::cout << "Comparator digis from "<< CSCDetId((*j).first) << std::endl;
138  std::vector<CSCComparatorDigi>::const_iterator digiItr = (*j).second.first;
139  std::vector<CSCComparatorDigi>::const_iterator last = (*j).second.second;
140  for( ; digiItr != last; ++digiItr) {
141  digiItr->print();
142  }
143  }
144  }
145 
146  if(RpcDigiDump){
147  std::cout << std::endl;
148  std::cout << "Event " << iEvent.id() << std::endl;
149  std::cout << std::endl;
150  std::cout << "********RPC Digis********" << std::endl;
151  for (CSCRPCDigiCollection::DigiRangeIterator j=rpcs->begin(); j!=rpcs->end(); j++) {
152  std::cout << "RPC digis from "<< CSCDetId((*j).first) << std::endl;
153  std::vector<CSCRPCDigi>::const_iterator digiItr = (*j).second.first;
154  std::vector<CSCRPCDigi>::const_iterator last = (*j).second.second;
155  for( ; digiItr != last; ++digiItr) {
156  digiItr->print();
157  }
158  }
159  }
160 
161  if(AlctDigiDump){
162  std::cout << std::endl;
163  std::cout << "Event " << iEvent.id() << std::endl;
164  std::cout << std::endl;
165  std::cout << "********ALCT Digis********" << std::endl;
166  for (CSCALCTDigiCollection::DigiRangeIterator j=alcts->begin(); j!=alcts->end(); j++) {
167  std::vector<CSCALCTDigi>::const_iterator digiItr = (*j).second.first;
168  std::vector<CSCALCTDigi>::const_iterator last = (*j).second.second;
169  for( ; digiItr != last; ++digiItr) {
170  digiItr->print();
171  }
172  }
173  }
174 
175  if(ClctDigiDump){
176  std::cout << std::endl;
177  std::cout << "Event " << iEvent.id() << std::endl;
178  std::cout << std::endl;
179  std::cout << "********CLCT Digis********" << std::endl;
180  for (CSCCLCTDigiCollection::DigiRangeIterator j=clcts->begin(); j!=clcts->end(); j++) {
181  std::vector<CSCCLCTDigi>::const_iterator digiItr = (*j).second.first;
182  std::vector<CSCCLCTDigi>::const_iterator last = (*j).second.second;
183  for( ; digiItr != last; ++digiItr) {
184  digiItr->print();
185  }
186  }
187  }
188 
189  if(CorrClctDigiDump){
190  std::cout << std::endl;
191  std::cout << "Event " << iEvent.id() << std::endl;
192  std::cout << std::endl;
193  std::cout << "********CorrelatedCLCT Digis********" << std::endl;
194  for (CSCCorrelatedLCTDigiCollection::DigiRangeIterator j=corrclcts->begin(); j!=corrclcts->end(); j++) {
195  std::vector<CSCCorrelatedLCTDigi>::const_iterator digiItr = (*j).second.first;
196  std::vector<CSCCorrelatedLCTDigi>::const_iterator last = (*j).second.second;
197  for( ; digiItr != last; ++digiItr) {
198  digiItr->print();
199  }
200  }
201  }
202 
203  if(StatusDigiDump){
204  std::cout << std::endl;
205  std::cout << "Event " << iEvent.id() << std::endl;
206  std::cout << std::endl;
207  std::cout << "********STATUS Digis********" << std::endl;
208  for (CSCDCCFormatStatusDigiCollection::DigiRangeIterator j=statusdigis->begin(); j!=statusdigis->end(); j++) {
209  std::vector<CSCDCCFormatStatusDigi>::const_iterator digiItr = (*j).second.first;
210  std::vector<CSCDCCFormatStatusDigi>::const_iterator last = (*j).second.second;
211  for( ; digiItr != last; ++digiItr) {
212  digiItr->print();
213  }
214  }
215  }
216 
217  if(DDUStatusDigiDump){
218  std::cout << std::endl;
219  std::cout << "Event " << iEvent.id() << std::endl;
220  std::cout << std::endl;
221  std::cout << "********DDU STATUS Digis********" << std::endl;
222  for (CSCDDUStatusDigiCollection::DigiRangeIterator j=DDUstatusdigi->begin(); j!=DDUstatusdigi->end(); j++){
223  std::vector<CSCDDUStatusDigi>::const_iterator digiItr = (*j).second.first;
224  std::vector<CSCDDUStatusDigi>::const_iterator last = (*j).second.second;
225  for( ; digiItr != last; ++digiItr) {
226  digiItr->print();
227  }
228  }
229  }
230 
231  if(DCCStatusDigiDump){
232  std::cout << std::endl;
233  std::cout << "Event " << iEvent.id() << std::endl;
234  std::cout << std::endl;
235  std::cout << "********DCC STATUS Digis********" << std::endl;
236  for (CSCDCCStatusDigiCollection::DigiRangeIterator j=DCCstatusdigi->begin(); j!=DCCstatusdigi->end(); j++){
237  std::vector<CSCDCCStatusDigi>::const_iterator digiItr = (*j).second.first;
238  std::vector<CSCDCCStatusDigi>::const_iterator last = (*j).second.second;
239  for( ; digiItr != last; ++digiItr) {
240  digiItr->print();
241  }
242  }
243  }
244 
245 #ifdef THIS_IS_AN_EVENT_EXAMPLE
247  iEvent.getByLabel("example",pIn);
248 #endif
249 
250 #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE
251  ESHandle<SetupData> pSetup;
252  iSetup.get<SetupRecord>().get(pSetup);
253 #endif
254 }
255 
256 
257 // ------------ method called once each job just after ending the event loop ------------
258 void
260 }
261 
262 //define this as a plug-in
263 //DEFINE_FWK_MODULE(CSCViewDigi);
bool DDUStatusDigiDump
Definition: CSCViewDigi.h:74
T getUntrackedParameter(std::string const &, T const &) const
bool CorrClctDigiDump
Definition: CSCViewDigi.h:72
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: CSCViewDigi.cc:68
edm::InputTag rpcDigiTag_
Definition: CSCViewDigi.h:68
bool RpcDigiDump
Definition: CSCViewDigi.h:73
edm::InputTag alctDigiTag_
Definition: CSCViewDigi.h:63
CSCViewDigi(const edm::ParameterSet &)
Definition: CSCViewDigi.cc:28
bool WiresDigiDump
Definition: CSCViewDigi.h:72
edm::InputTag corrclctDigiTag_
Definition: CSCViewDigi.h:65
bool StatusDigiDump
Definition: CSCViewDigi.h:73
bool ClctDigiDump
Definition: CSCViewDigi.h:72
int iEvent
Definition: GenABIO.cc:243
bool DCCStatusDigiDump
Definition: CSCViewDigi.h:74
bool ComparatorDigiDump
Definition: CSCViewDigi.h:73
virtual void endJob()
Definition: CSCViewDigi.cc:259
int j
Definition: DBlmapReader.cc:9
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
tuple conf
Definition: dbtoconf.py:185
edm::InputTag clctDigiTag_
Definition: CSCViewDigi.h:64
edm::InputTag statusDigiTag_
Definition: CSCViewDigi.h:69
const T & get() const
Definition: EventSetup.h:55
edm::InputTag stripDigiTag_
Definition: CSCViewDigi.h:66
edm::EventID id() const
Definition: EventBase.h:56
tuple cout
Definition: gather_cfg.py:121
bool StripDigiDump
Definition: CSCViewDigi.h:73
edm::InputTag DDUstatusDigiTag_
Definition: CSCViewDigi.h:70
edm::InputTag DCCstatusDigiTag_
Definition: CSCViewDigi.h:71
bool AlctDigiDump
Definition: CSCViewDigi.h:72
edm::InputTag comparatorDigiTag_
Definition: CSCViewDigi.h:67
edm::InputTag wireDigiTag_
Definition: CSCViewDigi.h:62