void showHistOutput() { //channel units //TString fName = "histOutput.root"; // TString fName = "histOutput680.root"; TString fName = "histOutput47.root"; const Double_t xmin = 100.; const Double_t xmax = 2000.; //1e units // TString fName = "histOutput1e_HV1000.root"; //TString fName = "histOutput1e_HV950.root"; // const Double_t xmin = 0.5; // const Double_t xmax = 12.; TFile *fr = new TFile(fName.Data()); if (fr->IsZombie()) { Error("showHistOutput.cxx", "Files %s was not open.", fName.Data()); return; } TH1D *hch[64]; TString histName; for (Int_t i = 0; i<64; i++) { histName.Form("ch%d", i); hch[i] = (TH1D*)fr->Get(histName.Data()); } //canvases to show 1D histograms TString cName; TString cTitle; const Int_t pads = 9; const Int_t noCanvas = 64/pads+1; TCanvas *cWork[noCanvas]; for (Int_t i = 0; i < noCanvas; i++) { cName.Form("can%d", i); cTitle.Form("canvas %d", i); cWork[i] = new TCanvas(cName.Data(), cTitle.Data(), 0, 0, 960, 700); // cWork[i]->SetName(cName.Data()); // cWork[i]->SetTitle(cTitle.Data()); if (pads == 6) cWork[i]->Divide(2, 3); if (pads == 9) cWork[i]->Divide(3, 3); cWork[i]->cd(1); } for (Int_t i = 0; i < 64; i++) { histName.Form("ch%d", i); // hTitle.Form("channel %d", i); // hTemp = h2->ProjectionY(hName.Data(), i+1, i+1); // hTemp->SetTitle(hTitle.Data()); // hTemp->GetXaxis()->SetRangeUser(0, 2000); Int_t cNumber = i/pads; cWork[cNumber]->cd(i-pads*cNumber+1); hch[i]->Draw(); hch[i]->GetXaxis()->SetRangeUser(xmin, xmax); } }