#include "style.h" #include "plot_histos.h" #include "Global.h" #include #include #include "TFile.h" #include "TTree.h" #include "TApplication.h" #include "TROOT.h" using namespace std; void draw_multifiles_NToC(int n, int* nsigma, string* files); int main_a(int argc, char* argv[]) { TApplication theApp("Analysis", &argc, argv); GetMyStyle(); // defined in style.h TFile* tf = new TFile("/project/dzero/balm/efficiency/rootfiles/AATrack_b_jpsiX_p1402-p14.04.00_100k.root"); TTree* tt = (TTree*) tf->Get("Global"); cout <<"tree at "<Loop(nsigma[i], files[i].c_str()); draw_multifiles_NToC(n, nsigma, files); } theApp.Run(kTRUE); //sleep(5); return 0; } void draw_multifiles_NToC(int n, int* nsigma, string* files) { cout <<"=== Starting draw_multifiles_NToC in RatioNeutralsToCharged_x.cpp"<IsOpen()) { // Read histograms TH1F* h_tmp_a = new TH1F( *(TH1F*) tf->Get("jpsi_lxy") ); // all TH1F* h_tmp_n = (TH1F*) tf->Get("jpsi_n_lxy"); // neutral TH1F* h_tmp_c = (TH1F*) tf->Get("jpsi_c_lxy"); // charged if(!h_tmp_a || !h_tmp_n || !h_tmp_c) { cout <<"Couldn't get histogram ouf of file "<cd(); h_tmp_a->Draw(); } // if tf->IsOpen else cout <<"Couldn't open file."<Update(); cout <<"=== draw_multifiles_NToC in RatioNeutralsToCharged_x.cpp done."<