CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/CondTools/SiStrip/plugins/SiStripCablingTrackerMap.cc

Go to the documentation of this file.
00001 #include "CondTools/SiStrip/plugins/SiStripCablingTrackerMap.h"
00002 #include "CommonTools/TrackerMap/interface/TrackerMap.h"
00003 
00004 #include "sstream"
00005 
00006 SiStripCablingTrackerMap::SiStripCablingTrackerMap(edm::ParameterSet const& conf): 
00007   conf_(conf)
00008 {
00009 }
00010 
00011 SiStripCablingTrackerMap::~SiStripCablingTrackerMap(){}
00012   
00013 void SiStripCablingTrackerMap::beginRun(const edm::Run& run, const edm::EventSetup& es ) {
00014 
00015   es.get<SiStripDetCablingRcd>().get( SiStripDetCabling_ ); 
00016   tkMap_detCab=new TrackerMap( "DetCabling" );   
00017 }
00018 
00019 //------------------------------------------------------------------------------------------
00020 
00021 void SiStripCablingTrackerMap::endJob() {  
00022   tkMap_detCab->save(true,0,0,"DetCabling.png");
00023   tkMap_detCab->print(true,0,0,"DetCabling");
00024   
00025 }
00026 //------------------------------------------------------------------------------------------
00027 
00028 void SiStripCablingTrackerMap::analyze(const edm::Event& e, const edm::EventSetup& es) {
00029   
00030     es.get<SiStripDetCablingRcd>().get( SiStripDetCabling_ );
00031     //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
00032     // get list of active detectors from SiStripDetCabling 
00033     //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&   
00034     std::vector<uint32_t> vdetId_;
00035     SiStripDetCabling_->addActiveDetectorsRawIds(vdetId_);   
00036     for (std::vector<uint32_t>::const_iterator detid_iter=vdetId_.begin();detid_iter!=vdetId_.end();detid_iter++){  
00037       uint32_t detid = *detid_iter;
00038       tkMap_detCab->fill(detid,1);
00039     }
00040 }
00041 
00042