11 LogTrace(
"TkHistoMap") <<
"TkHistoMap::constructor without parameters";
23 LogTrace(
"TkHistoMap") <<
"TkHistoMap::constructor with parameters";
35 LogTrace(
"TkHistoMap") <<
"TkHistoMap::constructor with parameters";
44 "\n------------------------------------------" 45 "\nUnAvailable Service DQMStore: please insert in the configuration file an instance like" 46 "\n\tprocess.load(\"DQMServices.Core.DQMStore_cfg\")" 47 "\n------------------------------------------";
63 #ifdef debug_TkHistoMap 64 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::loadTkHistoMap] folder " << folder <<
" histoName " << fullName <<
" find " << folder.find_last_of(
"/") <<
" length " << folder.length();
66 if(folder.find_last_of(
"/")!=folder.length()-1)
69 #ifdef debug_TkHistoMap 70 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::loadTkHistoMap] folder " << folder <<
" histoName " << fullName <<
" layer " << layer <<
" ptr " <<
tkHistoMap_[layer] <<
" find " << folder.find_last_of(
"/") <<
" length " << folder.length();
93 for(
size_t ix = 1; ix <= (
unsigned int) nchX; ++ix)
94 for(
size_t iy = 1;iy <= (
unsigned int) nchY; ++iy)
96 me->
Fill(1.*(lowX+ix-.5),1.*(lowY+iy-.5),baseline);
100 #ifdef debug_TkHistoMap 101 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::createTkHistoMap] folder " << folder <<
" histoName " << fullName <<
" layer " << layer <<
" ptr " <<
tkHistoMap_[layer];
124 for(
size_t ix = 1; ix <= (
unsigned int) nchX; ++ix)
125 for(
size_t iy = 1;iy <= (
unsigned int) nchY; ++iy)
127 me->
Fill(1.*(lowX+ix-.5),1.*(lowY+iy-.5),baseline);
131 #ifdef debug_TkHistoMap 132 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::createTkHistoMap] folder " << folder <<
" histoName " << fullName <<
" layer " << layer <<
" ptr " <<
tkHistoMap_[layer];
144 std::stringstream ss;
150 uint32_t subdetlayer = 0, side = 0;
164 file.open(filename.c_str());
168 file >> detid >>
value;
177 #ifdef debug_TkHistoMap 178 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::fill] Fill detid " << detid.
rawId() <<
" Layer " << layer <<
" value " << value <<
" ix,iy " << xybin.
ix <<
" " << xybin.
iy <<
" " << xybin.
x <<
" " << xybin.
y <<
" " <<
tkHistoMap_[layer]->getTProfile2D()->GetName();
180 tkHistoMap_[layer]->getTProfile2D()->Fill(xybin.
x,xybin.
y,value);
182 #ifdef debug_TkHistoMap 183 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::fill] " <<
tkHistoMap_[layer]->getTProfile2D()->GetBinContent(xybin.
ix,xybin.
iy);
184 for(
size_t ii=0;
ii<4;
ii++)
185 for(
size_t jj=0;
jj<11;
jj++)
186 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::fill] " <<
ii <<
" " <<
jj <<
" " <<
tkHistoMap_[layer]->getTProfile2D()->GetBinContent(
ii,
jj);
196 #ifdef debug_TkHistoMap 197 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::setbincontent] setBinContent detid " << detid.
rawId() <<
" 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);
199 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::setbincontent] " <<
tkHistoMap_[layer]->getTProfile2D()->GetBinContent(xybin.
ix,xybin.
iy);
200 for(
size_t ii=0;
ii<4;
ii++)
201 for(
size_t jj=0;
jj<11;
jj++){
202 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::setbincontent] " <<
ii <<
" " <<
jj <<
" " <<
tkHistoMap_[layer]->getTProfile2D()->GetBinContent(
ii,
jj);
208 #ifdef debug_TkHistoMap 209 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::add]";
231 for(
size_t i=0;
i<dets.size();++
i){
308 TFile *
f =
new TFile(filename.c_str(),mode.c_str());
void setSiStripFolderName(std::string name)
static std::string getLayerName(int in)
static void getSubDetLayerSide(int in, SiStripDetId::SubDetector &, uint32_t &layer, uint32_t &side)
void setBinContent(DetId detid, float value)
void fillFromAscii(const std::string &filename)
std::vector< DetId > getDetsForLayer(int layer) const
std::vector< MonitorElement * > tkHistoMap_
uint32_t rawId() const
get the raw id
void getSubDetLayerFolderName(std::stringstream &ss, SiStripDetId::SubDetector subDet, uint32_t layer, uint32_t side=0)
void createTkHistoMap(const std::string &path, const std::string &MapName, float baseline, bool mechanicalView)
void save(const std::string &filename)
std::string folderDefinition(std::string path, const std::string &MapName, int layer, bool mechanicalView, std::string &fullName)
MonitorElement * bookProfile2D(Args &&...args)
TkLayerMap::XYbin cached_XYbin
TkHistoMap(const TkDetMap *tkDetMap, DQMStore::IBooker &ibooker, const std::string &path, const std::string &MapName, float baseline=0, bool mechanicalView=false)
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
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 getComponents(int layer, int &nchX, double &lowX, double &highX, int &nchY, double &lowY, double &highY) const
int16_t findLayer(DetId detid, DetId &cached_detid, int16_t &cached_layer, TkLayerMap::XYbin &cached_XYbin) const
void fill(DetId detid, float value)
const TkDetMap * tkdetmap_
void saveAsCanvas(const std::string &filename, const std::string &options="", const std::string &mode="RECREATE")
void loadTkHistoMap(const std::string &path, const std::string &MapName, bool mechanicalView=false)
DetId getDetFromBin(int layer, int ix, int iy) const
void add(DetId detid, float value)
const TkLayerMap::XYbin & getXY(DetId detid, DetId &cached_detid, int16_t &cached_layer, TkLayerMap::XYbin &cached_XYbin) const
float getEntries(DetId detid)
float getValue(DetId detid)
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")