| 43 |
#include <TPolyLine.h> |
#include <TPolyLine.h> |
| 44 |
#include <TStyle.h> |
#include <TStyle.h> |
| 45 |
#include <TSystem.h> |
#include <TSystem.h> |
| 46 |
|
#include <TApplication.h> |
| 47 |
// |
// |
| 48 |
#include <PamelaRun.h> |
#include <PamelaRun.h> |
| 49 |
#include <physics/calorimeter/CalorimeterEvent.h> |
#include <physics/calorimeter/CalorimeterEvent.h> |
| 86 |
return file2; |
return file2; |
| 87 |
} |
} |
| 88 |
|
|
| 89 |
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){ |
| 90 |
gStyle->SetPaperSize(19.,25.); |
gStyle->SetPaperSize(19.,25.); |
| 91 |
const char* startingdir = gSystem->WorkingDirectory(); |
const char* startingdir = gSystem->WorkingDirectory(); |
| 92 |
// printf(" basename is %s \n",gSystem->BaseName(filename.Data())); |
// printf(" basename is %s \n",gSystem->BaseName(filename.Data())); |
| 93 |
// printf(" getfilename is %s \n",getFilename(filename).Data()); |
// printf(" getfilename is %s \n",getFilename(filename).Data()); |
| 94 |
if ( !strcmp(outDir.Data(),"") ) outDir = startingdir; |
if ( !strcmp(outDir.Data(),"") ) outDir = startingdir; |
| 95 |
// |
// |
| 96 |
|
TApplication *app = 0; |
| 97 |
|
if ( iactive ) app = new TApplication("app",0,0); |
| 98 |
// |
// |
| 99 |
ifstream myfile; |
ifstream myfile; |
| 100 |
myfile.open(filename.Data()); |
myfile.open(filename.Data()); |
| 1512 |
figsave << format; |
figsave << format; |
| 1513 |
rapporto->SaveAs(figsave.str().c_str()); |
rapporto->SaveAs(figsave.str().c_str()); |
| 1514 |
}; |
}; |
| 1515 |
|
if ( iactive && w4i ){ |
| 1516 |
|
while ( gROOT->GetListOfCanvases()->FindObject(rapporto) || gROOT->GetListOfCanvases()->FindObject(figura3) || gROOT->GetListOfCanvases()->FindObject(figura2) || gROOT->GetListOfCanvases()->FindObject(figura) ){ |
| 1517 |
|
gSystem->ProcessEvents(); |
| 1518 |
|
gSystem->Sleep(10); |
| 1519 |
|
}; |
| 1520 |
|
}; |
| 1521 |
} |
} |
| 1522 |
|
|