Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TPOL_hit.C
Go to the documentation of this file.
1 // The following are special comments used by RootSpy to know
2 // which histograms to fetch for the macro.
3 //
4 
5 // hnamepath: /TPOL/Hit/Hit_NHits
6 
7 {
8  TDirectory *dir = (TDirectory*)gDirectory->FindObjectAny("TPOL");
9  if(dir) dir->cd();
10 
11  TH1I* tpol_num_events = (TH1I*)gDirectory->FindObjectAny("tpol_num_events");
12  TH1I* hHit_NHits = (TH1I*)gDirectory->FindObjectAny("hHit_NHits");
13 
14  if(gPad == NULL){
15  TCanvas *c1 = new TCanvas("c1","TPOL Hit Monitor",150,10,990,660);
16  c1->cd(0);
17  c1->Draw();
18  c1->Update();
19  }
20  if(!gPad) return;
21  TCanvas* c1 = gPad->GetCanvas();
22  c1->Divide(1,2);
23  double tsize = 0.0475;
24  gStyle->SetOptStat("emr");
25  if(tpol_num_events){
26  tpol_num_events->SetFillColor(kBlue);
27  c1->cd(1);
28  tpol_num_events->SetTitleSize(tsize,"xy");
29  tpol_num_events->Draw();
30  }
31  if(hHit_NHits){
32  hHit_NHits->SetFillColor(kBlue);
33  c1->cd(2);
34  hHit_NHits->SetTitleSize(tsize,"xy");
35  hHit_NHits->GetXaxis()->SetRange(1,hHit_NHits->FindLastBinAbove(1.0));
36  hHit_NHits->Draw();
37  }
38 
39 }
double tsize
Definition: DIRC_digihit.C:36
Double_t c1[2][NMODULES]
Definition: tw_corr.C:68
static TH1I * hHit_NHits[2]
TDirectory * dir
Definition: bcal_hist_eff.C:31
static TH1I * tpol_num_events