7 LogTrace(
"TkHistoMap") <<
"TkHistoMap::constructor without parameters";
8 load(tkDetMap,
"", 0.0
f,
false,
false,
false);
13 : HistoNumber(35), MapName_(MapName) {
14 LogTrace(
"TkHistoMap") <<
"TkHistoMap::constructor with parameters";
15 load(tkDetMap, path, baseline, mechanicalView,
false);
27 : HistoNumber(35), MapName_(MapName) {
28 LogTrace(
"TkHistoMap") <<
"TkHistoMap::constructor with parameters";
29 load(tkDetMap, path, baseline, mechanicalView, isTH2F);
41 : HistoNumber(35), MapName_(MapName) {
42 LogTrace(
"TkHistoMap") <<
"TkHistoMap::constructor with parameters";
43 load(tkDetMap, path, baseline, mechanicalView,
false);
63 <<
"\n------------------------------------------"
64 "\nUnAvailable Service DQMStore: please insert in the configuration file an instance like"
65 "\n\tprocess.load(\"DQMServices.Core.DQMStore_cfg\")"
66 "\n------------------------------------------";
83 #ifdef debug_TkHistoMap
84 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::loadTkHistoMap] folder " << folder <<
" histoName " << fullName
85 <<
" find " << folder.find_last_of(
"/") <<
" length " << folder.length();
87 if (folder.find_last_of(
'/') != folder.length() - 1)
90 #ifdef debug_TkHistoMap
91 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::loadTkHistoMap] folder " << folder <<
" histoName " << fullName
93 << folder.find_last_of(
"/") <<
" length " << folder.length();
104 bool mechanicalView) {
117 if (bookTH2F ==
false) {
118 me = ibooker.
bookProfile2D(fullName.c_str(), fullName.c_str(), nchX, lowX, highX, nchY, lowY, highY, 0.0, 0.0);
120 me = ibooker.
book2D(fullName.c_str(), fullName.c_str(), nchX, lowX, highX, nchY, lowY, highY);
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
147 if (mechanicalView) {
148 std::stringstream
ss;
154 uint32_t subdetlayer = 0, side = 0;
166 file.open(filename.c_str());
169 while (file.good()) {
170 file >> detid >>
value;
179 #ifdef debug_TkHistoMap
180 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::fill] Fill detid " << detid.
rawId() <<
" Layer " << layer <<
" value "
181 << value <<
" ix,iy " << xybin.
ix <<
" " << xybin.
iy <<
" " << xybin.
x <<
" " << xybin.
y <<
" "
189 #ifdef debug_TkHistoMap
190 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::fill] "
192 for (
size_t ii = 0;
ii < 4;
ii++)
193 for (
size_t jj = 0;
jj < 11;
jj++) {
195 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::fill] " <<
ii <<
" " <<
jj <<
" "
198 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::fill] " <<
ii <<
" " <<
jj <<
" "
216 #ifdef debug_TkHistoMap
217 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::setbincontent] setBinContent detid " << detid.
rawId() <<
" Layer " << layer
218 <<
" value " << value <<
" ix,iy " << xybin.
ix <<
" " << xybin.
iy <<
" " << xybin.
x <<
" "
222 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::setbincontent] "
224 for (
size_t ii = 0;
ii < 4;
ii++)
225 for (
size_t jj = 0;
jj < 11;
jj++) {
226 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::setbincontent] " <<
ii <<
" " <<
jj <<
" "
233 #ifdef debug_TkHistoMap
234 LogTrace(
"TkHistoMap") <<
"[TkHistoMap::add]";
240 tkHistoMap_[layer]->getTProfile2D()->GetBinContent(
275 for (
size_t i = 0;
i < dets.size(); ++
i) {
389 TFile*
f =
new TFile(filename.c_str(), mode.c_str());
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, char const *option="s", FUNC onbooking=NOOP())
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)
virtual void setCurrentFolder(std::string const &fullpath)
void fillFromAscii(const std::string &filename)
constexpr uint32_t rawId() const
get the raw id
void load(const TkDetMap *tkDetMap, const std::string &path, float baseline, bool mechanicalView, bool isTH2F, bool createTkMap=true)
Log< level::Error, false > LogError
std::vector< DetId > getDetsForLayer(int layer) const
constexpr std::array< uint8_t, layerIndexSize > layer
std::vector< MonitorElement * > tkHistoMap_
void getSubDetLayerFolderName(std::stringstream &ss, SiStripDetId::SubDetector subDet, uint32_t layer, uint32_t side=0)
void save(const std::string &filename)
void createTkHistoMap(DQMStore::IBooker &ibooker, const std::string &path, const std::string &MapName, float baseline, bool mechanicalView)
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 meBookerGetter(iFunc f)
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
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
void fill(DetId detid, float value)
const TkDetMap * tkdetmap_
void saveAsCanvas(const std::string &filename, const std::string &options="", const std::string &mode="RECREATE")
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
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 fill(int layer, int ring, int nmod, float x)
std::string folderDefinition(DQMStore::IBooker &ibooker, std::string folder, const std::string &MapName, int layer, bool mechanicalView, std::string &fullName)