{ ////////////////////////////////////////////////// // NOTE: for Go4 Version > 2.8 and ROOT >= 4.00/06, // Go4 uses the root library mapping, so it is not // necessary to use gSystem->Load of required libraries in any // macro. If you work with older versions of root, // please uncomment the following lines: //gSystem->Load("libThread.so"); //gSystem->Load("libMinuit.so"); //gSystem->Load("$GO4SYS/lib/libGo4Base.so"); //gSystem->Load("$GO4SYS/lib/libGo4Fit.so"); //gSystem->Load("$GO4SYS/lib/libGo4ThreadManager.so"); //gSystem->Load("$GO4SYS/lib/libGo4TaskHandler.so"); //gSystem->Load("$GO4SYS/lib/libGo4Version.so"); //gSystem->Load("$GO4SYS/lib/libGo4AnalBase.so"); //gSystem->Load("$GO4SYS/lib/libGo4Analysis.so"); //gSystem->Load("libGo4UserAnalysis.so"); #include #include #include TString filename="MyAnalysis_ASF.root"; TString histoname="Cr1Ch02"; TString outname=histoname+".dat"; TFile myfile(filename.Data(),"READ"); TFolder *topfold=(TFolder *) myfile.Get("Go4"); if(topfold) { std::cout <<"Got go4 folder of file "<FindObjectAny(histoname.Data()); if(myobject) { std::ofstream outfile(outname.Data()); if(!outfile) { std::cout <<"Error opening outputfile "<InheritsFrom("TH1")) { TH1 *histo = (TH1 *) myobject; std::cout <<"Found histogram "<< histo->GetName() << std::endl; Int_t maxbinX=histo->GetNbinsX(); Int_t maxbinY=histo->GetNbinsY(); Int_t maxbinZ=histo->GetNbinsZ(); Int_t globalbin = 0; Stat_t cont = 0; outfile <<"# Histogram "<ClassName() <<": "<GetName()<< std::endl; outfile <<"# Xbin \tYbin \tZbin \tContent"<< std::endl; for(Int_t x = 0; x < maxbinX; ++x) { for(Int_t y = 0; y < maxbinY; ++y) { for(Int_t z = 0; z < maxbinZ; ++z) { globalbin=histo->GetBin(x,y,z); cont=histo->GetBinContent(globalbin); outfile <InheritsFrom("TGraph")) { TGraph *graph= (TGraph *) myobject; std::cout <<"Found graph "<< graph->GetName() << std::endl; Int_t maxpoints=graph->GetN(); outfile <<"# Graph "<ClassName() <<": "<GetName()<< std::endl; outfile <<"# Point \tX \tY"<< std::endl; for(Int_t point = 0; pointGetPoint(point,xg,yg); outfile <