CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/DQM/SiStripMonitorClient/interface/SiStripTrackerMapCreator.h

Go to the documentation of this file.
00001 #ifndef _SiStripTrackerMapCreator_h_
00002 #define _SiStripTrackerMapCreator_h_
00003 
00004 #include "DQMServices/Core/interface/MonitorElement.h"
00005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00006 #include "FWCore/Framework/interface/ESHandle.h"
00007 #include "CalibFormats/SiStripObjects/interface/SiStripDetCabling.h"
00008 //#include "CalibTracker/SiStripDCS/interface/SiStripPsuDetIdMap.h"
00009 
00010 #include <fstream>
00011 #include <map>
00012 #include <vector>
00013 #include <string>
00014 
00015 class DQMStore;
00016 class TkDetMap;
00017 class TrackerMap;
00018 class TrackerTopology;
00019 class MonitorElement;
00020 namespace edm { class EventSetup; }
00021 
00022 class SiStripTrackerMapCreator {
00023 
00024  public:
00025 
00026   //  SiStripTrackerMapCreator();
00027   SiStripTrackerMapCreator(const edm::EventSetup& eSetup);
00028  ~SiStripTrackerMapCreator();
00029   bool readConfiguration();
00030 
00031   void create(const edm::ParameterSet & tkmapPset, 
00032               DQMStore* dqm_store, std::string& htype, const edm::EventSetup& eSetup);
00033   void createForOffline(const edm::ParameterSet & tkmapPset, 
00034                         DQMStore* dqm_store, std::string& htype, const edm::EventSetup& eSetup);
00035 
00036 
00037  private:
00038 
00039   void paintTkMapFromAlarm(uint32_t det_id, const TrackerTopology* tTopo,
00040                            DQMStore* dqm_store, bool isBad=false, std::map<unsigned int,std::string>* badmodmap=0);
00041   void paintTkMapFromHistogram(DQMStore* dqm_store, MonitorElement* me, std::string& map_type);
00042   void setTkMapFromHistogram(DQMStore* dqm_store, std::string& htype);
00043   void setTkMapFromAlarm(DQMStore* dqm_store,  const edm::EventSetup& eSetup);
00044   void setTkMapRange(std::string& map_type);
00045   void setTkMapRangeOffline();
00046   uint16_t getDetectorFlagAndComment(DQMStore* dqm_store, uint32_t det_id, const TrackerTopology* tTopo, std::ostringstream& comment);
00047   void printBadModuleList(std::map<unsigned int,std::string>* badmodmap, const edm::EventSetup& eSetup);
00048 
00049   TrackerMap* trackerMap_;
00050   std::string tkMapName_;
00051   std::string stripTopLevelDir_;
00052 
00053   float tkMapMax_;
00054   float tkMapMin_;
00055   float meanToMaxFactor_;
00056   bool useSSQuality_;
00057   std::string ssqLabel_;
00058   int   nDet;
00059   TkDetMap* tkDetMap_;
00060   const edm::EventSetup& eSetup_;
00061   edm::ESHandle< SiStripDetCabling > detcabling_;
00062   //  SiStripPsuDetIdMap psumap_;
00063 };
00064 #endif