30 TColor::CreateColorWheel();
35 string source =
"<unknown>";
41 TFile *
f =
new TFile(fname.c_str());
42 if(fname.find(
"hdmon_online") == 0){
43 gDirectory->cd(
"rootspy");
44 gDirectory->cd(
"highlevel");
45 h = (TH1I*)gDirectory->Get(
"BeamEnergy");
46 source =
"BeamEnergy histogram from the online monitoring root file";
48 TTree *t = (TTree*)gDirectory->Get(
"DBeamPhoton");
50 h =
new TH1I(
"EbeamPhoton",
"" , 240, 0.0, 12.0);
51 t->Project(
"EbeamPhoton",
"E");
53 source =
"DBeamPhoton::E of a janaroot file";
57 cout <<
"Problem getting histogram!" << endl;
62 cout <<
"Please cut and paste the following into:" << endl;
64 cout <<
"$HALLD_RECON_HOME/src/plugins/monitoring/highlevel_online/HistMacro_Beam.C" << endl;
66 cout <<
"//--------------------------------------------------------------------" << endl;
67 cout <<
"// This taken from the bin contents of: " << source << endl;
68 cout <<
"// for run " <<
run <<
", an amorphous target run." << endl;
69 cout <<
"// The data in the table below was created with a macro in:" << endl;
70 cout <<
"// $HALLD_RECON_HOME/src/plugins/monitoring/highlevel_online/AmorphousNormalization" << endl;
72 cout <<
"// The working directory used was:" << endl;
73 cout <<
"// ~hdops/2018.10.05.amorphous_normalization" << endl;
75 cout <<
"string amorphous_label = \"Normalized to Amorphous run " <<
run <<
"\";" << endl;
77 cout <<
" Double_t amorphous_data[] = {" << endl;
78 for(
int ibin=1; ibin<=h->GetNbinsX(); ibin++){
80 Int_t v = h->GetBinContent(ibin);
85 if(ibin%10 == 1) cout <<
"\t\t" ;
88 if(ibin%10 == 0) cout << endl;
90 cout <<
" 0.0};" << endl;
91 cout <<
"//--------------------------------------------------------------------" << endl;
sprintf(text,"Post KinFit Cut")