64 _lvfile(iConfig.getParameter<std::string>(
"LVStatusFile")),
65 _lvtkmapname(iConfig.getParameter<std::string>(
"LVTkMapName")),
66 _hvfile(iConfig.getParameter<std::string>(
"HVStatusFile")),
67 _hvtkmapname(iConfig.getParameter<std::string>(
"HVTkMapName"))
100 TkHistoMap lvhisto(
"LV_Status",
"LV_Status",-1);
101 TkHistoMap hvhisto(
"HV_Status",
"HV_Status",-1);
103 ifstream lvdata(
_lvfile.c_str());
104 ifstream hvdata(
_hvfile.c_str());
109 std::string lvstatus;
111 while(lvdata >> detid >> lvstatus) {
113 if(lvstatus==
"ON") cha = 0.5;
114 if(lvstatus==
"OFF") cha = 1.;
115 lvhisto.
fill(detid,cha);
118 std::string hvstatus;
120 while(hvdata >> detid >> hvstatus) {
122 if(hvstatus==
"ON") cha = 0.5;
123 if(hvstatus==
"OFF") cha = 1.;
124 hvhisto.
fill(detid,cha);
137 std::string rootmapname =
"VoltageStatus.root";
138 lvhisto.
save(rootmapname);
139 hvhisto.
save(rootmapname);
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
const std::string _hvfile
virtual void endRun(const edm::Run &, const edm::EventSetup &)
#define DEFINE_FWK_MODULE(type)
TkVoltageMapCreator(const edm::ParameterSet &)
const std::string _lvtkmapname
const std::string _hvtkmapname
void save(std::string filename)
void fill(uint32_t &detid, float value)
void setPalette(int numpalette)
void save(bool print_total=true, float minval=0., float maxval=0., std::string s="svgmap.svg", int width=1500, int height=800)
void dumpInTkMap(TrackerMap *tkmap, bool dumpEntries=false)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
const std::string _lvfile