8 LogTrace(
"TkHistoMap") <<
"TkHistoMap::constructor without parameters";
17 LogTrace(
"TkHistoMap") <<
"TkHistoMap::constructor with parameters";
25 "\n------------------------------------------"
26 "\nUnAvailable Service DQMStore: please insert in the configuration file an instance like"
27 "\n\tprocess.load(\"DQMServices.Core.DQMStore_cfg\")"
28 "\n------------------------------------------";
33 "\n------------------------------------------"
34 "\nUnAvailable Service TkHistoMap: please insert in the configuration file an instance like"
35 "\n\tprocess.TkDetMap = cms.Service(\"TkDetMap\")"
36 "\n------------------------------------------";
52 #ifdef debug_TkHistoMap
53 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::loadTkHistoMap] folder " << folder <<
" histoName " << fullName <<
" find " << folder.find_last_of(
"/") <<
" length " << folder.length();
55 if(folder.find_last_of(
"/")!=folder.length()-1)
58 #ifdef debug_TkHistoMap
59 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::loadTkHistoMap] folder " << folder <<
" histoName " << fullName <<
" layer " << layer <<
" ptr " <<
tkHistoMap_[layer] <<
" find " << folder.find_last_of(
"/") <<
" length " << folder.length();
82 for(
size_t ix = 1; ix <= (
unsigned int) nchX; ++ix)
83 for(
size_t iy = 1;iy <= (
unsigned int) nchY; ++iy)
85 me->
Fill(1.*(lowX+ix-.5),1.*(lowY+iy-.5),baseline);
89 #ifdef debug_TkHistoMap
90 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::createTkHistoMap] folder " << folder <<
" histoName " << fullName <<
" layer " << layer <<
" ptr " <<
tkHistoMap_[layer];
103 std::stringstream ss;
109 uint32_t subdetlayer, side;
123 file.open(filename.c_str());
127 file >> detid >>
value;
136 #ifdef debug_TkHistoMap
137 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::fill] Fill detid " << detid <<
" Layer " << layer <<
" value " << value <<
" ix,iy " << xybin.
ix <<
" " << xybin.
iy <<
" " << xybin.
x <<
" " << xybin.
y <<
" " <<
tkHistoMap_[layer]->getTProfile2D()->GetName();
139 tkHistoMap_[layer]->getTProfile2D()->Fill(xybin.
x,xybin.
y,value);
141 #ifdef debug_TkHistoMap
142 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::fill] " <<
tkHistoMap_[layer]->getTProfile2D()->GetBinContent(xybin.
ix,xybin.
iy);
143 for(
size_t ii=0;
ii<4;
ii++)
144 for(
size_t jj=0;
jj<11;
jj++)
145 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::fill] " <<
ii <<
" " <<
jj <<
" " <<
tkHistoMap_[layer]->getTProfile2D()->GetBinContent(
ii,
jj);
155 #ifdef debug_TkHistoMap
156 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::setbincontent] setBinContent detid " << detid <<
" Layer " << layer <<
" value " << value <<
" ix,iy " << xybin.
ix <<
" " << xybin.
iy <<
" " << xybin.
x <<
" " << xybin.
y <<
" " <<
tkHistoMap_[layer]->getTProfile2D()->GetName() <<
" bin " <<
tkHistoMap_[layer]->getTProfile2D()->GetBin(xybin.
ix,xybin.
iy);
158 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::setbincontent] " <<
tkHistoMap_[layer]->getTProfile2D()->GetBinContent(xybin.
ix,xybin.
iy);
159 for(
size_t ii=0;
ii<4;
ii++)
160 for(
size_t jj=0;
jj<11;
jj++){
161 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::setbincontent] " <<
ii <<
" " <<
jj <<
" " <<
tkHistoMap_[layer]->getTProfile2D()->GetBinContent(
ii,
jj);
167 #ifdef debug_TkHistoMap
168 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::add]";
189 std::vector<uint32_t> dets;
191 for(
size_t i=0;
i<dets.size();++
i){
268 TFile *
f =
new TFile(filename.c_str(),mode.c_str());
uint32_t getDetFromBin(int layer, int ix, int iy)
void setSiStripFolderName(std::string name)
std::vector< MonitorElement * > tkHistoMap_
void saveAsCanvas(std::string filename, std::string options="", std::string mode="RECREATE")
void getSubDetLayerFolderName(std::stringstream &ss, SiStripDetId::SubDetector subDet, uint32_t layer, uint32_t side=0)
float getEntries(uint32_t &detid)
void loadTkHistoMap(std::string path, std::string MapName, bool mechanicalView=false)
void save(std::string filename)
void getDetsForLayer(int layer, std::vector< uint32_t > &output)
void fill(uint32_t &detid, float value)
float getValue(uint32_t &detid)
void createTkHistoMap(std::string &path, std::string &MapName, float &baseline, bool mechanicalView)
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
TProfile2D * getTProfile2D(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
void dumpInTkMap(TrackerMap *tkmap, bool dumpEntries=false)
void setBinContent(uint32_t &detid, float value)
void fillFromAscii(std::string filename)
int16_t FindLayer(uint32_t &detid)
void getSubDetLayerSide(int &in, SiStripDetId::SubDetector &, uint32_t &layer, uint32_t &side)
void getComponents(int &layer, int &nchX, double &lowX, double &highX, int &nchY, double &lowY, double &highY)
const TkLayerMap::XYbin & getXY(uint32_t &)
std::string getLayerName(int &in)
std::string folderDefinition(std::string &path, std::string &MapName, int layer, bool mechanicalView, std::string &fullName)
void add(uint32_t &detid, float value)
void setCurrentFolder(const std::string &fullpath)
void fill(int layer, int ring, int nmod, float x)
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")