{ /* This program is a ROOT Macro that creates */ /* 1D Histograms for TAC1,2,3,ADC1,2,and 2D */ /* Histograms for TAC1vsADC1,TAC1vsADC2 */ /* */ /* This version is known to work on July31,2008, */ /* A control version of this program exists at */ /* /home/cdf/tnatoli/Programs */ #include "TFile.h" #include string file_path; /*Begins the declaration of where to look for the run*/ string run_number; string output_file="MinHisto_"; /*Initializes the name of the output file*/ string Min="Min_"; cout<<"Enter run number and channel as 'run.ch#':"; /*reads in the user defined run number to be plotted, input is a 3 digit run number*/ cin>>run_number; /*assigns the user input run number to the variable "run_number"*/ file_path = run_number +"_min.txt"; /*These lines append the run number onto the input and output files*/ cout<>evntNum>>min; Min +=run_number;/*These lines append the run number onto the Histogram title*/ TH1F *Min_Hist = new TH1F("Min_Hist",Min.c_str(),1000,-0.5,0); /*Actually creates the Histograms*/ for(;;){ /*reads in all of the data from the file to the Histogram */ if(fin.eof() == 1){ cout<<"Found end of file"<>evntNum_data>>min_data;; Min_Hist->Fill(min_data);/*Fills the histos with the appropriate data*/ } /* gStyle->SetOptFit();*/ /*Min_Hist.Draw();*/ Min_Hist->Write();/*writes all of the histos to the output files*/ file.Close(); /*simply closes the file that has been written to*/ }