ROOT logo
void hlt_plot() {
  
  gStyle->SetPalette(1);
  gStyle->SetOptStat("nemruo");

  TFile *f = new TFile("histofile_local.root");  
  TProfile2D *h[4];
  TH2F *g[4];

  TCanvas *c[3];

  Char_t outname[256];

  for (int i=0; i<4; i++) {
    sprintf(outname, "can%d",i);
    c[i]= new TCanvas(outname,"",0,0,600,400);
    c[i]->Divide(2,2);    
 }
 
  // TCanvas *c1 = new TCanvas("c1","",0,0,600,400);
  // c1->Divide(2,2);

  // TCanvas *c2 = new TCanvas("c2","",0,0,600,400);
  // c2->Divide(2,2);

  // TCanvas *c3 = new TCanvas("c3","",0,0,600,400);
  // c3->Divide(2,2);
  
  
  for (int i=0; i<4; i++) {

    c[0]->cd(i+1);
    h[i] = (TProfile2D*)f->Get(Form("fAmp%d", i));
    h[i]->SetMaximum(1023);
    cout << "fAmp" << i << "entries: " << h[i]->GetEntries()<<endl; 
    h[i]->Draw("colz");

    c[1]->cd(i+1);
    h[i] = (TProfile2D*)f->Get(Form("fTime%d", i));
    h[i]->SetMaximum(15);
    cout << "fTime" << i << "entries: " << h[i]->GetEntries()<<endl;
    h[i]->Draw("colz");
    
    c[2]->cd(i+1);
    g[i] = (TH2F*)f->Get(Form("fAT%d", i));
    cout << "fAT" << i << "entries: " << g[i]->GetEntries()<<endl;
    g[i]->Draw("colz");


    c[3]->cd(i+1);
    g[i] = (TH2F*)f->Get(Form("fCellVsEne%d", i));
    cout << "fCellVsEne" << i << "entries: " << g[i]->GetEntries()<<endl;
    g[i]->Draw("colz");


  }
  
  sprintf(outname, "fAmp.gif");
  c[0]->SaveAs(outname);
  
  sprintf(outname, "fTime.gif");
  c[1]->SaveAs(outname);

  sprintf(outname, "fAT.gif");
  c[2]->SaveAs(outname);

  sprintf(outname, "fCellVsEne.gif");
  c[3]->SaveAs(outname);



 TCanvas *c4 = new TCanvas("c4","",0,0,600,400);
 fCellEne->Draw();
 fClusCellEne->SetLineColor(kRed);
 fClusCellEne->Draw("same");
 sprintf(outname, "ClusCellEne.gif");
 c4->SaveAs(outname);

}
 hlt_plot.C:1
 hlt_plot.C:2
 hlt_plot.C:3
 hlt_plot.C:4
 hlt_plot.C:5
 hlt_plot.C:6
 hlt_plot.C:7
 hlt_plot.C:8
 hlt_plot.C:9
 hlt_plot.C:10
 hlt_plot.C:11
 hlt_plot.C:12
 hlt_plot.C:13
 hlt_plot.C:14
 hlt_plot.C:15
 hlt_plot.C:16
 hlt_plot.C:17
 hlt_plot.C:18
 hlt_plot.C:19
 hlt_plot.C:20
 hlt_plot.C:21
 hlt_plot.C:22
 hlt_plot.C:23
 hlt_plot.C:24
 hlt_plot.C:25
 hlt_plot.C:26
 hlt_plot.C:27
 hlt_plot.C:28
 hlt_plot.C:29
 hlt_plot.C:30
 hlt_plot.C:31
 hlt_plot.C:32
 hlt_plot.C:33
 hlt_plot.C:34
 hlt_plot.C:35
 hlt_plot.C:36
 hlt_plot.C:37
 hlt_plot.C:38
 hlt_plot.C:39
 hlt_plot.C:40
 hlt_plot.C:41
 hlt_plot.C:42
 hlt_plot.C:43
 hlt_plot.C:44
 hlt_plot.C:45
 hlt_plot.C:46
 hlt_plot.C:47
 hlt_plot.C:48
 hlt_plot.C:49
 hlt_plot.C:50
 hlt_plot.C:51
 hlt_plot.C:52
 hlt_plot.C:53
 hlt_plot.C:54
 hlt_plot.C:55
 hlt_plot.C:56
 hlt_plot.C:57
 hlt_plot.C:58
 hlt_plot.C:59
 hlt_plot.C:60
 hlt_plot.C:61
 hlt_plot.C:62
 hlt_plot.C:63
 hlt_plot.C:64
 hlt_plot.C:65
 hlt_plot.C:66
 hlt_plot.C:67
 hlt_plot.C:68
 hlt_plot.C:69
 hlt_plot.C:70
 hlt_plot.C:71
 hlt_plot.C:72
 hlt_plot.C:73
 hlt_plot.C:74
 hlt_plot.C:75
 hlt_plot.C:76
 hlt_plot.C:77
 hlt_plot.C:78
 hlt_plot.C:79
 hlt_plot.C:80