26 #include "TPaveStats.h"
68 void read(
bool aMechView,
71 std::vector<std::unique_ptr<TkHistoMap>>& aTkMapVec,
72 std::vector<bool>& aValidVec);
107 : fileName_(iConfig.getUntrackedParameter<
std::
string>(
"InputFileName",
"DQMStore.root")),
108 mechanicalView_(iConfig.getUntrackedParameter<
bool>(
"MechanicalView",
true)),
109 folderName_(iConfig.getUntrackedParameter<
std::
string>(
"HistogramFolderName",
"DQMData/")),
110 printDebug_(iConfig.getUntrackedParameter<unsigned
int>(
"PrintDebugMessages", 1)),
111 doDiff_(iConfig.getUntrackedParameter<
bool>(
"DoDifference",
false)),
112 fileNameDiff_(iConfig.getUntrackedParameter<
std::
string>(
"InputFileNameForDiff",
"DQMStore.root")),
113 tkHistoMapNameVec_(iConfig.getUntrackedParameter<
std::vector<
std::
string>>(
"TkHistoMapNameVec")),
114 minVal_(iConfig.getUntrackedParameter<
std::vector<double>>(
"MinValueVec")),
115 maxVal_(iConfig.getUntrackedParameter<
std::vector<double>>(
"MaxValueVec")),
138 std::vector<std::unique_ptr<TkHistoMap>>& aTkMapVec,
139 std::vector<bool>& aValidVec) {
141 lDqmStore->
open(aFile);
144 aTkMapVec.reserve(nHists);
145 aValidVec.reserve(nHists);
150 dirName += aFile.substr(aFile.find_last_of(
"_") + 5, 6);
151 dirName +=
"/SiStrip/Run summary";
157 unsigned int nFailTot = 0;
158 unsigned int nTotTot = 0;
159 for (
unsigned int i(0);
i < nHists;
i++) {
160 std::unique_ptr<TkHistoMap> tkHistoMap{
new TkHistoMap(tkDetMap)};
164 std::vector<MonitorElement*>& lMaps = tkHistoMap->getAllMaps();
166 std::cout <<
" -- map " <<
i <<
", nHistos = " << lMaps.size() << std::endl;
167 unsigned int nFail = 0;
168 unsigned int nTot = 0;
170 for (
unsigned int im(0); im < lMaps.size(); im++) {
172 std::cout <<
" -- Failed to get element " << im <<
" for map " <<
i << std::endl;
181 aValidVec[
i] =
false;
182 aTkMapVec.emplace_back(
std::move(tkHistoMap));
185 if (nFailTot < nTotTot)
186 std::cout <<
" - " << nTotTot - nFailTot <<
"/" << nTotTot <<
" histomaps read with success for file ." << aFile
189 std::cout <<
" - Failed to read any map for file " << aFile <<
". Exiting line ... " << __LINE__ << std::endl;
313 std::cout <<
"End of analyze method: tkmap_ size = " <<
tkmap_.size() << std::endl;
336 std::cout <<
"tkmap_ is NULL for element " <<
i <<
"... continuing ..." << std::endl;
346 std::cout <<
"Warning, tkHistoMap is invalid for element " <<
i <<
"... continuing ..." << std::endl;
360 std::vector<MonitorElement*>& lMaps = aResult->
getAllMaps();
361 const std::vector<MonitorElement*>& lMapsDiff = aSubtr->
getAllMaps();
363 assert(lMaps.size() == lMapsDiff.size());
365 for (
unsigned int im(0); im < lMaps.size(); im++) {
366 if (!lMaps[im] || !lMapsDiff[im]) {
367 std::cout <<
" -- Failed to get element " << im <<
" for maps." << std::endl;
369 (lMaps[im]->getTProfile2D())->Add(lMapsDiff[im]->getTProfile2D(), -1);