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 
7 // Original Author: Alexandre Sakharov
8 // Created: Sun May 10 15:43:28 CEST 2009
10 #include <iostream>
11 
13 {
14 
15  wd_token = consumes<CSCWireDigiCollection>( conf.getParameter<edm::InputTag>("wireDigiTag") );
16  sd_token = consumes<CSCStripDigiCollection>( conf.getParameter<edm::InputTag>("stripDigiTag") );
17  cd_token = consumes<CSCComparatorDigiCollection>( conf.getParameter<edm::InputTag>("comparatorDigiTag") );
18  rd_token = consumes<CSCRPCDigiCollection>( conf.getParameter<edm::InputTag>("rpcDigiTag") );
19  al_token = consumes<CSCALCTDigiCollection>( conf.getParameter<edm::InputTag>("alctDigiTag") );
20  cl_token = consumes<CSCCLCTDigiCollection>( conf.getParameter<edm::InputTag>("clctDigiTag") );
21  co_token = consumes<CSCCorrelatedLCTDigiCollection>( conf.getParameter<edm::InputTag>("corrclctDigiTag") );
22  st_token = consumes<CSCDCCFormatStatusDigiCollection>( conf.getParameter<edm::InputTag>("statusDigiTag") );
23  dd_token = consumes<CSCDDUStatusDigiCollection>( conf.getParameter<edm::InputTag>("DDUstatusDigiTag") );
24  dc_token = consumes<CSCDCCStatusDigiCollection>( conf.getParameter<edm::InputTag>("DCCstatusDigiTag") );
25 
26  WiresDigiDump=conf.getUntrackedParameter<bool>("WiresDigiDump", false);
27  StripDigiDump=conf.getUntrackedParameter<bool>("StripDigiDump", false);
28  ComparatorDigiDump=conf.getUntrackedParameter<bool>("ComparatorDigiDump", false);
29  RpcDigiDump=conf.getUntrackedParameter<bool>("RpcDigiDump", false);
30  AlctDigiDump=conf.getUntrackedParameter<bool>("AlctDigiDump", false);
31  ClctDigiDump=conf.getUntrackedParameter<bool>("ClctDigiDump", false);
32  CorrClctDigiDump=conf.getUntrackedParameter<bool>("CorrClctDigiDump", false);
33  StatusDigiDump=conf.getUntrackedParameter<bool>("StatusDigiDump", false);
34  DDUStatusDigiDump=conf.getUntrackedParameter<bool>("DDUStatus",false);
35  DCCStatusDigiDump=conf.getUntrackedParameter<bool>("DCCStatus",false);
36 }
37 
38 
40 {
41 }
42 
43 void
45 {
46  using namespace edm;
47 
58 
59  iEvent.getByToken( wd_token, wires );
60  iEvent.getByToken( sd_token, strips );
61  iEvent.getByToken( cd_token, comparators );
62  iEvent.getByToken( rd_token, rpcs );
63  iEvent.getByToken( al_token, alcts );
64  iEvent.getByToken( cl_token, clcts );
65  iEvent.getByToken( co_token, correlatedlcts );
66 
67  if(StatusDigiDump)
68  iEvent.getByToken( st_token, statusdigis );
69 
71  iEvent.getByToken( dd_token, DDUstatusdigi );
72 
74  iEvent.getByToken( dc_token, DCCstatusdigi );
75 
76  if(WiresDigiDump){
77  std::cout << std::endl;
78  std::cout << "Event " << iEvent.id() << std::endl;
79  std::cout << std::endl;
80  std::cout << "********WIRES Digis********" << std::endl;
81  for (CSCWireDigiCollection::DigiRangeIterator j=wires->begin(); j!=wires->end(); j++) {
82  std::cout << "Wire digis from "<< CSCDetId((*j).first) << std::endl;
83  std::vector<CSCWireDigi>::const_iterator digiItr = (*j).second.first;
84  std::vector<CSCWireDigi>::const_iterator last = (*j).second.second;
85  for( ; digiItr != last; ++digiItr) {
86  digiItr->print();
87  }
88  }
89  }
90 
91  if(StripDigiDump){
92  std::cout << std::endl;
93  std::cout << "Event " << iEvent.id() << std::endl;
94  std::cout << std::endl;
95  std::cout << "********STRIPS Digis********" << std::endl;
96  for (CSCStripDigiCollection::DigiRangeIterator j=strips->begin(); j!=strips->end(); j++) {
97  std::cout << "Strip digis from "<< CSCDetId((*j).first) << std::endl;
98  std::vector<CSCStripDigi>::const_iterator digiItr = (*j).second.first;
99  std::vector<CSCStripDigi>::const_iterator last = (*j).second.second;
100  for( ; digiItr != last; ++digiItr) {
101  digiItr->print();
102  }
103  }
104  }
105 
106  if(ComparatorDigiDump){
107  std::cout << std::endl;
108  std::cout << "Event " << iEvent.id() << std::endl;
109  std::cout << std::endl;
110  std::cout << "********COMPARATOR Digis********" << std::endl;
111  for (CSCComparatorDigiCollection::DigiRangeIterator j=comparators->begin(); j!=comparators->end(); j++) {
112  std::cout << "Comparator digis from "<< CSCDetId((*j).first) << std::endl;
113  std::vector<CSCComparatorDigi>::const_iterator digiItr = (*j).second.first;
114  std::vector<CSCComparatorDigi>::const_iterator last = (*j).second.second;
115  for( ; digiItr != last; ++digiItr) {
116  digiItr->print();
117  }
118  }
119  }
120 
121  if(RpcDigiDump){
122  std::cout << std::endl;
123  std::cout << "Event " << iEvent.id() << std::endl;
124  std::cout << std::endl;
125  std::cout << "********RPC Digis********" << std::endl;
126  for (CSCRPCDigiCollection::DigiRangeIterator j=rpcs->begin(); j!=rpcs->end(); j++) {
127  std::cout << "RPC digis from "<< CSCDetId((*j).first) << std::endl;
128  std::vector<CSCRPCDigi>::const_iterator digiItr = (*j).second.first;
129  std::vector<CSCRPCDigi>::const_iterator last = (*j).second.second;
130  for( ; digiItr != last; ++digiItr) {
131  digiItr->print();
132  }
133  }
134  }
135 
136  if(AlctDigiDump){
137  std::cout << std::endl;
138  std::cout << "Event " << iEvent.id() << std::endl;
139  std::cout << std::endl;
140  std::cout << "********ALCT Digis********" << std::endl;
141  for (CSCALCTDigiCollection::DigiRangeIterator j=alcts->begin(); j!=alcts->end(); j++) {
142  std::vector<CSCALCTDigi>::const_iterator digiItr = (*j).second.first;
143  std::vector<CSCALCTDigi>::const_iterator last = (*j).second.second;
144  for( ; digiItr != last; ++digiItr) {
145  digiItr->print();
146  }
147  }
148  }
149 
150  if(ClctDigiDump){
151  std::cout << std::endl;
152  std::cout << "Event " << iEvent.id() << std::endl;
153  std::cout << std::endl;
154  std::cout << "********CLCT Digis********" << std::endl;
155  for (CSCCLCTDigiCollection::DigiRangeIterator j=clcts->begin(); j!=clcts->end(); j++) {
156  std::vector<CSCCLCTDigi>::const_iterator digiItr = (*j).second.first;
157  std::vector<CSCCLCTDigi>::const_iterator last = (*j).second.second;
158  for( ; digiItr != last; ++digiItr) {
159  digiItr->print();
160  }
161  }
162  }
163 
164  if(CorrClctDigiDump){
165  std::cout << std::endl;
166  std::cout << "Event " << iEvent.id() << std::endl;
167  std::cout << std::endl;
168  std::cout << "********CorrelatedLCT Digis********" << std::endl;
169  for (CSCCorrelatedLCTDigiCollection::DigiRangeIterator j=correlatedlcts->begin(); j!=correlatedlcts->end(); j++) {
170  std::vector<CSCCorrelatedLCTDigi>::const_iterator digiItr = (*j).second.first;
171  std::vector<CSCCorrelatedLCTDigi>::const_iterator last = (*j).second.second;
172  for( ; digiItr != last; ++digiItr) {
173  digiItr->print();
174  }
175  }
176  }
177 
178  if(StatusDigiDump){
179  std::cout << std::endl;
180  std::cout << "Event " << iEvent.id() << std::endl;
181  std::cout << std::endl;
182  std::cout << "********STATUS Digis********" << std::endl;
183  for (CSCDCCFormatStatusDigiCollection::DigiRangeIterator j=statusdigis->begin(); j!=statusdigis->end(); j++) {
184  std::vector<CSCDCCFormatStatusDigi>::const_iterator digiItr = (*j).second.first;
185  std::vector<CSCDCCFormatStatusDigi>::const_iterator last = (*j).second.second;
186  for( ; digiItr != last; ++digiItr) {
187  digiItr->print();
188  }
189  }
190  }
191 
192  if(DDUStatusDigiDump){
193  std::cout << std::endl;
194  std::cout << "Event " << iEvent.id() << std::endl;
195  std::cout << std::endl;
196  std::cout << "********DDU STATUS Digis********" << std::endl;
197  for (CSCDDUStatusDigiCollection::DigiRangeIterator j=DDUstatusdigi->begin(); j!=DDUstatusdigi->end(); j++){
198  std::vector<CSCDDUStatusDigi>::const_iterator digiItr = (*j).second.first;
199  std::vector<CSCDDUStatusDigi>::const_iterator last = (*j).second.second;
200  for( ; digiItr != last; ++digiItr) {
201  digiItr->print();
202  }
203  }
204  }
205 
206  if(DCCStatusDigiDump){
207  std::cout << std::endl;
208  std::cout << "Event " << iEvent.id() << std::endl;
209  std::cout << std::endl;
210  std::cout << "********DCC STATUS Digis********" << std::endl;
211  for (CSCDCCStatusDigiCollection::DigiRangeIterator j=DCCstatusdigi->begin(); j!=DCCstatusdigi->end(); j++){
212  std::vector<CSCDCCStatusDigi>::const_iterator digiItr = (*j).second.first;
213  std::vector<CSCDCCStatusDigi>::const_iterator last = (*j).second.second;
214  for( ; digiItr != last; ++digiItr) {
215  digiItr->print();
216  }
217  }
218  }
219 
220 #ifdef THIS_IS_AN_EVENT_EXAMPLE
222  iEvent.getByLabel("example",pIn);
223 #endif
224 
225 #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE
226  ESHandle<SetupData> pSetup;
227  iSetup.get<SetupRecord>().get(pSetup);
228 #endif
229 }
230 
231 
232 // ------------ method called once each job just after ending the event loop ------------
233 void
235 }
236 
237 //define this as a plug-in
238 //DEFINE_FWK_MODULE(CSCViewDigi);
bool DDUStatusDigiDump
Definition: CSCViewDigi.h:49
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
bool CorrClctDigiDump
Definition: CSCViewDigi.h:47
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: CSCViewDigi.cc:44
bool RpcDigiDump
Definition: CSCViewDigi.h:48
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > co_token
Definition: CSCViewDigi.h:57
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
CSCViewDigi(const edm::ParameterSet &)
Definition: CSCViewDigi.cc:12
edm::EDGetTokenT< CSCRPCDigiCollection > rd_token
Definition: CSCViewDigi.h:54
bool WiresDigiDump
Definition: CSCViewDigi.h:47
bool StatusDigiDump
Definition: CSCViewDigi.h:48
bool ClctDigiDump
Definition: CSCViewDigi.h:47
edm::EDGetTokenT< CSCComparatorDigiCollection > cd_token
Definition: CSCViewDigi.h:53
int iEvent
Definition: GenABIO.cc:230
edm::EDGetTokenT< CSCDCCFormatStatusDigiCollection > st_token
Definition: CSCViewDigi.h:58
bool DCCStatusDigiDump
Definition: CSCViewDigi.h:49
bool ComparatorDigiDump
Definition: CSCViewDigi.h:48
virtual void endJob()
Definition: CSCViewDigi.cc:234
int j
Definition: DBlmapReader.cc:9
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:420
tuple conf
Definition: dbtoconf.py:185
edm::EDGetTokenT< CSCCLCTDigiCollection > cl_token
Definition: CSCViewDigi.h:56
edm::EDGetTokenT< CSCDCCStatusDigiCollection > dc_token
Definition: CSCViewDigi.h:60
const T & get() const
Definition: EventSetup.h:56
edm::EventID id() const
Definition: EventBase.h:60
edm::EDGetTokenT< CSCDDUStatusDigiCollection > dd_token
Definition: CSCViewDigi.h:59
edm::EDGetTokenT< CSCWireDigiCollection > wd_token
Definition: CSCViewDigi.h:51
tuple cout
Definition: gather_cfg.py:121
bool StripDigiDump
Definition: CSCViewDigi.h:48
edm::EDGetTokenT< CSCALCTDigiCollection > al_token
Definition: CSCViewDigi.h:55
edm::EDGetTokenT< CSCStripDigiCollection > sd_token
Definition: CSCViewDigi.h:52
bool AlctDigiDump
Definition: CSCViewDigi.h:47