Go to the documentation of this file.00001
00002
00003
00004
00005
00015
00016
00017
00018
00019
00020
00021
00022 #include "EventFilter/CSCRawToDigi/interface/CSCViewDigi.h"
00023
00024
00025
00026
00027
00028 CSCViewDigi::CSCViewDigi(const edm::ParameterSet& conf)
00029 : wireDigiTag_(conf.getParameter<edm::InputTag>("wireDigiTag")),
00030 alctDigiTag_(conf.getParameter<edm::InputTag>("alctDigiTag")),
00031 clctDigiTag_(conf.getParameter<edm::InputTag>("clctDigiTag")),
00032 corrclctDigiTag_(conf.getParameter<edm::InputTag>("corrclctDigiTag")),
00033 stripDigiTag_(conf.getParameter<edm::InputTag>("stripDigiTag")),
00034 comparatorDigiTag_(conf.getParameter<edm::InputTag>("comparatorDigiTag")),
00035 rpcDigiTag_(conf.getParameter<edm::InputTag>("rpcDigiTag")),
00036 statusDigiTag_(conf.getParameter<edm::InputTag>("statusDigiTag")),
00037 DDUstatusDigiTag_(conf.getParameter<edm::InputTag>("DDUstatusDigiTag")),
00038 DCCstatusDigiTag_(conf.getParameter<edm::InputTag>("DCCstatusDigiTag"))
00039 {
00040 WiresDigiDump=conf.getUntrackedParameter<bool>("WiresDigiDump", false);
00041 StripDigiDump=conf.getUntrackedParameter<bool>("StripDigiDump", false);
00042 AlctDigiDump=conf.getUntrackedParameter<bool>("AlctDigiDump", false);
00043 ClctDigiDump=conf.getUntrackedParameter<bool>("ClctDigiDump", false);
00044 CorrClctDigiDump=conf.getUntrackedParameter<bool>("CorrClctDigiDump", false);
00045 ComparatorDigiDump=conf.getUntrackedParameter<bool>("ComparatorDigiDump", false);
00046 RpcDigiDump=conf.getUntrackedParameter<bool>("RpcDigiDump", false);
00047 StatusDigiDump=conf.getUntrackedParameter<bool>("StatusDigiDump", false);
00048 DDUStatusDigiDump=conf.getUntrackedParameter<bool>("DDUStatus",false);
00049 DCCStatusDigiDump=conf.getUntrackedParameter<bool>("DCCStatus",false);
00050 }
00051
00052
00053 CSCViewDigi::~CSCViewDigi()
00054 {
00055
00056
00057
00058
00059 }
00060
00061
00062
00063
00064
00065
00066
00067 void
00068 CSCViewDigi::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup)
00069 {
00070 using namespace edm;
00071
00072 edm::Handle<CSCWireDigiCollection> wires;
00073 edm::Handle<CSCStripDigiCollection> strips;
00074 edm::Handle<CSCComparatorDigiCollection> comparators;
00075 edm::Handle<CSCRPCDigiCollection> rpcs;
00076 edm::Handle<CSCALCTDigiCollection> alcts;
00077 edm::Handle<CSCCLCTDigiCollection> clcts;
00078 edm::Handle<CSCCorrelatedLCTDigiCollection> corrclcts;
00079 edm::Handle<CSCDCCFormatStatusDigiCollection> statusdigis;
00080 edm::Handle<CSCDDUStatusDigiCollection> DDUstatusdigi;
00081 edm::Handle<CSCDCCStatusDigiCollection> DCCstatusdigi;
00082
00083 iEvent.getByLabel(wireDigiTag_,wires);
00084 iEvent.getByLabel(stripDigiTag_,strips);
00085 iEvent.getByLabel(comparatorDigiTag_,comparators);
00086 iEvent.getByLabel(rpcDigiTag_,rpcs);
00087 iEvent.getByLabel(alctDigiTag_,alcts);
00088 iEvent.getByLabel(clctDigiTag_,clcts);
00089 iEvent.getByLabel(corrclctDigiTag_,corrclcts);
00090
00091 if(StatusDigiDump)
00092 iEvent.getByLabel(statusDigiTag_,statusdigis);
00093
00094 if(DDUStatusDigiDump)
00095 iEvent.getByLabel(DDUstatusDigiTag_,DDUstatusdigi);
00096
00097 if(DCCStatusDigiDump)
00098 iEvent.getByLabel(DCCstatusDigiTag_,DCCstatusdigi);
00099
00100
00101 if(WiresDigiDump){
00102 std::cout << std::endl;
00103 std::cout << "Event " << iEvent.id() << std::endl;
00104 std::cout << std::endl;
00105 std::cout << "********WIRES Digis********" << std::endl;
00106 for (CSCWireDigiCollection::DigiRangeIterator j=wires->begin(); j!=wires->end(); j++) {
00107 std::cout << "Wire digis from "<< CSCDetId((*j).first) << std::endl;
00108 std::vector<CSCWireDigi>::const_iterator digiItr = (*j).second.first;
00109 std::vector<CSCWireDigi>::const_iterator last = (*j).second.second;
00110 for( ; digiItr != last; ++digiItr) {
00111 digiItr->print();
00112 }
00113 }
00114 }
00115
00116 if(StripDigiDump){
00117 std::cout << std::endl;
00118 std::cout << "Event " << iEvent.id() << std::endl;
00119 std::cout << std::endl;
00120 std::cout << "********STRIPS Digis********" << std::endl;
00121 for (CSCStripDigiCollection::DigiRangeIterator j=strips->begin(); j!=strips->end(); j++) {
00122 std::cout << "Strip digis from "<< CSCDetId((*j).first) << std::endl;
00123 std::vector<CSCStripDigi>::const_iterator digiItr = (*j).second.first;
00124 std::vector<CSCStripDigi>::const_iterator last = (*j).second.second;
00125 for( ; digiItr != last; ++digiItr) {
00126 digiItr->print();
00127 }
00128 }
00129 }
00130
00131 if(ComparatorDigiDump){
00132 std::cout << std::endl;
00133 std::cout << "Event " << iEvent.id() << std::endl;
00134 std::cout << std::endl;
00135 std::cout << "********COMPARATOR Digis********" << std::endl;
00136 for (CSCComparatorDigiCollection::DigiRangeIterator j=comparators->begin(); j!=comparators->end(); j++) {
00137 std::cout << "Comparator digis from "<< CSCDetId((*j).first) << std::endl;
00138 std::vector<CSCComparatorDigi>::const_iterator digiItr = (*j).second.first;
00139 std::vector<CSCComparatorDigi>::const_iterator last = (*j).second.second;
00140 for( ; digiItr != last; ++digiItr) {
00141 digiItr->print();
00142 }
00143 }
00144 }
00145
00146 if(RpcDigiDump){
00147 std::cout << std::endl;
00148 std::cout << "Event " << iEvent.id() << std::endl;
00149 std::cout << std::endl;
00150 std::cout << "********RPC Digis********" << std::endl;
00151 for (CSCRPCDigiCollection::DigiRangeIterator j=rpcs->begin(); j!=rpcs->end(); j++) {
00152 std::cout << "RPC digis from "<< CSCDetId((*j).first) << std::endl;
00153 std::vector<CSCRPCDigi>::const_iterator digiItr = (*j).second.first;
00154 std::vector<CSCRPCDigi>::const_iterator last = (*j).second.second;
00155 for( ; digiItr != last; ++digiItr) {
00156 digiItr->print();
00157 }
00158 }
00159 }
00160
00161 if(AlctDigiDump){
00162 std::cout << std::endl;
00163 std::cout << "Event " << iEvent.id() << std::endl;
00164 std::cout << std::endl;
00165 std::cout << "********ALCT Digis********" << std::endl;
00166 for (CSCALCTDigiCollection::DigiRangeIterator j=alcts->begin(); j!=alcts->end(); j++) {
00167 std::vector<CSCALCTDigi>::const_iterator digiItr = (*j).second.first;
00168 std::vector<CSCALCTDigi>::const_iterator last = (*j).second.second;
00169 for( ; digiItr != last; ++digiItr) {
00170 digiItr->print();
00171 }
00172 }
00173 }
00174
00175 if(ClctDigiDump){
00176 std::cout << std::endl;
00177 std::cout << "Event " << iEvent.id() << std::endl;
00178 std::cout << std::endl;
00179 std::cout << "********CLCT Digis********" << std::endl;
00180 for (CSCCLCTDigiCollection::DigiRangeIterator j=clcts->begin(); j!=clcts->end(); j++) {
00181 std::vector<CSCCLCTDigi>::const_iterator digiItr = (*j).second.first;
00182 std::vector<CSCCLCTDigi>::const_iterator last = (*j).second.second;
00183 for( ; digiItr != last; ++digiItr) {
00184 digiItr->print();
00185 }
00186 }
00187 }
00188
00189 if(CorrClctDigiDump){
00190 std::cout << std::endl;
00191 std::cout << "Event " << iEvent.id() << std::endl;
00192 std::cout << std::endl;
00193 std::cout << "********CorrelatedCLCT Digis********" << std::endl;
00194 for (CSCCorrelatedLCTDigiCollection::DigiRangeIterator j=corrclcts->begin(); j!=corrclcts->end(); j++) {
00195 std::vector<CSCCorrelatedLCTDigi>::const_iterator digiItr = (*j).second.first;
00196 std::vector<CSCCorrelatedLCTDigi>::const_iterator last = (*j).second.second;
00197 for( ; digiItr != last; ++digiItr) {
00198 digiItr->print();
00199 }
00200 }
00201 }
00202
00203 if(StatusDigiDump){
00204 std::cout << std::endl;
00205 std::cout << "Event " << iEvent.id() << std::endl;
00206 std::cout << std::endl;
00207 std::cout << "********STATUS Digis********" << std::endl;
00208 for (CSCDCCFormatStatusDigiCollection::DigiRangeIterator j=statusdigis->begin(); j!=statusdigis->end(); j++) {
00209 std::vector<CSCDCCFormatStatusDigi>::const_iterator digiItr = (*j).second.first;
00210 std::vector<CSCDCCFormatStatusDigi>::const_iterator last = (*j).second.second;
00211 for( ; digiItr != last; ++digiItr) {
00212 digiItr->print();
00213 }
00214 }
00215 }
00216
00217 if(DDUStatusDigiDump){
00218 std::cout << std::endl;
00219 std::cout << "Event " << iEvent.id() << std::endl;
00220 std::cout << std::endl;
00221 std::cout << "********DDU STATUS Digis********" << std::endl;
00222 for (CSCDDUStatusDigiCollection::DigiRangeIterator j=DDUstatusdigi->begin(); j!=DDUstatusdigi->end(); j++){
00223 std::vector<CSCDDUStatusDigi>::const_iterator digiItr = (*j).second.first;
00224 std::vector<CSCDDUStatusDigi>::const_iterator last = (*j).second.second;
00225 for( ; digiItr != last; ++digiItr) {
00226 digiItr->print();
00227 }
00228 }
00229 }
00230
00231 if(DCCStatusDigiDump){
00232 std::cout << std::endl;
00233 std::cout << "Event " << iEvent.id() << std::endl;
00234 std::cout << std::endl;
00235 std::cout << "********DCC STATUS Digis********" << std::endl;
00236 for (CSCDCCStatusDigiCollection::DigiRangeIterator j=DCCstatusdigi->begin(); j!=DCCstatusdigi->end(); j++){
00237 std::vector<CSCDCCStatusDigi>::const_iterator digiItr = (*j).second.first;
00238 std::vector<CSCDCCStatusDigi>::const_iterator last = (*j).second.second;
00239 for( ; digiItr != last; ++digiItr) {
00240 digiItr->print();
00241 }
00242 }
00243 }
00244
00245 #ifdef THIS_IS_AN_EVENT_EXAMPLE
00246 Handle<ExampleData> pIn;
00247 iEvent.getByLabel("example",pIn);
00248 #endif
00249
00250 #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE
00251 ESHandle<SetupData> pSetup;
00252 iSetup.get<SetupRecord>().get(pSetup);
00253 #endif
00254 }
00255
00256
00257
00258 void
00259 CSCViewDigi::endJob() {
00260 }
00261
00262
00263