Created
June 12, 2018 20:10
-
-
Save mmusich/eb908a7f78699e1c5f997bc67413d67e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "TFile.h" | |
#include "TH1F.h" | |
#include "TH2F.h" | |
#include "TStyle.h" | |
#include "TCanvas.h" | |
#include <iostream> | |
#include <vector> | |
void printValues(TString fname=""){ | |
TFile *file = new TFile(fname); | |
TH2F* badAPV = (TH2F*)file->Get("DQMData/Run 305064/SiStrip/Run summary/EventInfo/BadComponentContents/BadAPVMap"); | |
TH2F* badFiber = (TH2F*)file->Get("DQMData/Run 305064/SiStrip/Run summary/EventInfo/BadComponentContents/BadFiberMap"); | |
TH2F* badStrip = (TH2F*)file->Get("DQMData/Run 305064/SiStrip/Run summary/EventInfo/BadComponentContents/BadStripMap"); | |
gStyle->SetOptStat(0); | |
int nXbins=badAPV->GetNbinsX(); | |
int nYbins=badAPV->GetNbinsY(); | |
std::cout<<nXbins<<std::endl; | |
std::vector<std::string> names; | |
names.push_back("TECB"); | |
names.push_back("TECF"); | |
names.push_back("TIB"); | |
names.push_back("TIDB"); | |
names.push_back("TIDF"); | |
names.push_back("TOB"); | |
for(int i=1;i<=nXbins;i++){ | |
for(int j=1;j<=nYbins;j++){ | |
std::cout<<names[i-1]<<" layer:"<<j<< " " <<badFiber->GetBinContent(i,j) <<" "<< badAPV->GetBinContent(i,j) << " " << badStrip->GetBinContent(i,j) << std::endl; | |
} | |
} | |
TCanvas *c1 = new TCanvas(); | |
c1->cd(); | |
badAPV->Draw("text"); | |
c1->SaveAs("BadAPV.png"); | |
TCanvas *c2 = new TCanvas(); | |
c2->cd(); | |
badFiber->Draw("text"); | |
c2->SaveAs("BadFiber.png"); | |
TCanvas *c3 = new TCanvas(); | |
c3->cd(); | |
badStrip->Draw("text"); | |
c3->SaveAs("BadStrip.png"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment