00001 #include <iostream> 00002 #include <vector> 00003 #include "FWCore/Framework/interface/EDAnalyzer.h" 00004 #include "FWCore/Framework/interface/Event.h" 00005 #include "DataFormats/Common/interface/Handle.h" 00006 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00007 #include "FWCore/Framework/interface/EventSetup.h" 00008 #include "FWCore/Framework/interface/ESHandle.h" 00009 00010 #include "OnlineDB/CSCCondDB/interface/CSCAFEBAnalyzer.h" 00011 00012 CSCAFEBAnalyzer::CSCAFEBAnalyzer(edm::ParameterSet const& conf) { 00013 00017 00018 testname=conf.getParameter<std::string>("TestName"); 00019 00020 if(testname=="AFEBThresholdScan") 00021 analysisthr_.setup(conf.getParameter<std::string>("HistogramFile")); 00022 if(testname=="AFEBConnectivity") 00023 analysiscnt_.setup(conf.getParameter<std::string>("HistogramFile")); 00024 00026 00027 CSCSrc_ = conf.getParameter<edm::InputTag>("CSCSrc"); 00028 00029 } 00030 00031 void CSCAFEBAnalyzer::analyze(edm::Event const& e,edm::EventSetup const& iSetup) { 00032 00033 edm::Handle<CSCWireDigiCollection> wire_digis; 00034 00036 00037 // const char* modtag="cscunpacker"; 00038 // e.getByLabel(modtag,"MuonCSCWireDigi",wire_digis); 00039 e.getByLabel(CSCSrc_,wire_digis); 00040 00041 if(testname=="AFEBThresholdScan") analysisthr_.analyze(*wire_digis); 00042 if(testname=="AFEBConnectivity") analysiscnt_.analyze(*wire_digis); 00043 } 00044 00045 void CSCAFEBAnalyzer::endJob() { 00046 if(testname=="AFEBThresholdScan") analysisthr_.done(); 00047 if(testname=="AFEBConnectivity") analysiscnt_.done(); 00048 }