--- calo/flight/FQLOOK/macros/FCaloQLOOK.cxx 2006/08/03 15:25:45 1.13 +++ calo/flight/FQLOOK/macros/FCaloQLOOK.cxx 2006/08/04 15:24:01 1.14 @@ -43,6 +43,7 @@ #include #include #include +#include // #include #include @@ -85,13 +86,15 @@ return file2; } -void FCaloQLOOK(TString filename, Int_t fromevent=0, Int_t toevent=0, TString outDir="", TString saveas = "png"){ +void FCaloQLOOK(TString filename, Int_t fromevent=0, Int_t toevent=0, TString outDir="", TString saveas = "png", Bool_t iactive =false, Bool_t w4i=false){ gStyle->SetPaperSize(19.,25.); const char* startingdir = gSystem->WorkingDirectory(); // printf(" basename is %s \n",gSystem->BaseName(filename.Data())); // printf(" getfilename is %s \n",getFilename(filename).Data()); if ( !strcmp(outDir.Data(),"") ) outDir = startingdir; // + TApplication *app = 0; + if ( iactive ) app = new TApplication("app",0,0); // ifstream myfile; myfile.open(filename.Data()); @@ -1509,5 +1512,11 @@ figsave << format; rapporto->SaveAs(figsave.str().c_str()); }; + if ( iactive && w4i ){ + while ( gROOT->GetListOfCanvases()->FindObject(rapporto) || gROOT->GetListOfCanvases()->FindObject(figura3) || gROOT->GetListOfCanvases()->FindObject(figura2) || gROOT->GetListOfCanvases()->FindObject(figura) ){ + gSystem->ProcessEvents(); + gSystem->Sleep(10); + }; + }; }