27 #include "TPaveStats.h"
65 void read(
bool aMechView,
67 std::vector<TkHistoMap*> & aTkMapVec,
68 std::vector<bool> & aValidVec);
108 : fileName_(iConfig.getUntrackedParameter<std::string>(
"InputFileName",
"DQMStore.root")),
109 mechanicalView_(iConfig.getUntrackedParameter<bool>(
"MechanicalView",
true)),
110 folderName_(iConfig.getUntrackedParameter<std::string>(
"HistogramFolderName",
"DQMData/")),
111 printDebug_(iConfig.getUntrackedParameter<unsigned int>(
"PrintDebugMessages",1)),
112 doDiff_(iConfig.getUntrackedParameter<bool>(
"DoDifference",
false)),
113 fileNameDiff_(iConfig.getUntrackedParameter<std::string>(
"InputFileNameForDiff",
"DQMStore.root")),
114 tkHistoMapNameVec_(iConfig.getUntrackedParameter<std::vector<std::string> >(
"TkHistoMapNameVec")),
115 minVal_(iConfig.getUntrackedParameter<std::vector<double> >(
"MinValueVec")),
116 maxVal_(iConfig.getUntrackedParameter<std::vector<double> >(
"MaxValueVec")),
117 pset_(iConfig.getParameter<edm::
ParameterSet>(
"TkmapParameters"))
153 std::vector<TkHistoMap*> & aTkMapVec,
154 std::vector<bool> & aValidVec)
158 lDqmStore->
open(aFile);
159 std::vector<TkHistoMap *> tkHistoMap;
162 tkHistoMap.resize(nHists,0);
163 aValidVec.resize(nHists,
true);
168 dirName += aFile.substr(aFile.find_last_of(
"_")+5,6);
169 dirName +=
"/SiStrip/Run summary";
170 std::cout <<
" -- DirName = " << dirName << std::endl;
176 unsigned int nFailTot=0;
177 unsigned int nTotTot = 0;
178 for (
unsigned int i(0);
i<nHists;
i++){
184 std::vector<MonitorElement*>& lMaps = tkHistoMap[
i]->getAllMaps();
186 std::cout <<
" -- map " <<
i <<
", nHistos = " << lMaps.size() << std::endl;
187 unsigned int nFail=0;
190 for (
unsigned int im(0); im<lMaps.size(); im++){
192 std::cout <<
" -- Failed to get element " << im <<
" for map " <<
i << std::endl;
200 if (nFail == nTot) aValidVec[
i] =
false;
201 aTkMapVec.push_back(tkHistoMap[
i]);
204 if (nFailTot < nTotTot)
std::cout <<
" - " << nTotTot-nFailTot <<
"/" << nTotTot
205 <<
" histomaps read with success for file ." << aFile << std::endl;
207 std::cout <<
" - Failed to read any map for file " << aFile <<
". Exiting line ... " << __LINE__ << std::endl;
328 std::cout <<
"End of analyze method: tkmap_ size = " <<
tkmap_.size() << std::endl;
358 std::cout <<
"tkmap_ is NULL for element " <<
i <<
"... continuing ..." << std::endl;
369 std::cout <<
"Warning, tkHistoMap is invalid for element " <<
i <<
"... continuing ..." << std::endl;
394 std::vector<MonitorElement*>& lMaps = aResult->
getAllMaps();
395 std::vector<MonitorElement*>& lMapsDiff = aSubtr->
getAllMaps();
397 assert(lMaps.size() == lMapsDiff.size());
399 for (
unsigned int im(0); im<lMaps.size(); im++){
400 if (!lMaps[im] || !lMapsDiff[im]) {
401 std::cout <<
" -- Failed to get element " << im <<
" for maps." << std::endl;
404 (lMaps[im]->getTProfile2D())->Add(lMapsDiff[im]->
getTProfile2D(),-1);
BuildTrackerMapPlugin(const edm::ParameterSet &)
std::vector< MonitorElement * > & getAllMaps()
#define DEFINE_FWK_MODULE(type)
std::vector< std::string > tkHistoMapNameVec_
std::vector< double > minVal_
std::vector< double > maxVal_
void showPalette(bool printflag1)
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)
std::vector< TkHistoMap * > tkHistoMapVec_
TProfile2D * getTProfile2D(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
std::string fileNameDiff_
std::vector< TrackerMap * > tkmap_
void read(bool aMechView, std::string aFile, std::vector< TkHistoMap * > &aTkMapVec, std::vector< bool > &aValidVec)
std::vector< bool > isValidMapDiff_
std::vector< bool > isValidMap_
void save_as_fedtrackermap(bool print_total=true, float minval=0., float maxval=0., std::string s="fed_svgmap.svg", int width=1500, int height=800)
bool open(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
void subtractMap(TkHistoMap *&aResult, TkHistoMap *&aSubtr)
std::vector< TkHistoMap * > tkHistoMapVecDiff_