fDebug = 0 ;
- fAlice = 0 ;
-
-
-
fToSplit = toSplit ;
fHeaderFile = headerFile ;
gAlice = 0 ;
- delete fAlice ;
-
- fAlice = 0 ;
-
}
file = static_cast<TFile*>(gROOT->GetFile(filename.Data() ) ) ;
- if (file && (filename != fHeaderFile) ) { // file already open
-
- file->Close() ;
+ if (!file) { // file not yet open
- delete fAlice ;
+ file = TFile::Open(filename.Data(), "read") ;
}
- file = TFile::Open(filename.Data(), "read") ;
-
- fAlice = static_cast<AliRun *>(file->Get("gAlice")) ;
TString treeName("TreeK") ;
TParticle * p = 0 ;
- if (fAlice)
-
- p = fAlice->Particle(index) ;
-
- else
-
- p = gAlice->Particle(index) ;
-
+ p = gAlice->Particle(index) ;
return p ;
fNPrimaries = gAlice->GetNtrack() ;
- fAlice = 0 ;
- if( strstr(opt,"P") || (strcmp(opt,"")==0) )
+ if( strstr(opt,"P") )
ReadPrimaries() ;
Int_t fDebug ; // Debug level
- AliRun * fAlice ; //! needed to read TreeK if in an other file than fHeaderFile
-
Int_t fNPrimaries ; //! # of primaries
TObjArray * fPrimaries ; //! list of lists of primaries-for the case of mixing
fFailed = kFALSE ;
fDebug = 0 ;
- fAlice = 0 ;
fToSplit = toSplit ;
fHeaderFile = headerFile ;
{
delete gAlice ;
gAlice = 0 ;
- delete fAlice ;
- fAlice = 0 ;
}
//____________________________________________________________________________
TFile * file = 0 ;
file = static_cast<TFile*>(gROOT->GetFile(filename.Data() ) ) ;
- if (file && (filename != fHeaderFile) ) { // file already open
- file->Close() ;
- delete fAlice ;
+ if (!file) { // file not yet open
+ file = TFile::Open(filename.Data(), "read") ;
}
- file = TFile::Open(filename.Data(), "read") ;
- fAlice = static_cast<AliRun *>(file->Get("gAlice")) ;
TString treeName("TreeK") ;
treeName += EventNumber() ;
TTree * tree = static_cast<TTree *>(file->Get(treeName.Data())) ;
if(index < 0)
return 0 ;
TParticle * p = 0 ;
- if (fAlice)
- p = fAlice->Particle(index) ;
- else
- p = gAlice->Particle(index) ;
+
+ p = gAlice->Particle(index) ;
return p ;
if (fDebug)
cout << "INFO: AliPHOSGetter::ReadPrimaries -> TreeK found in " << fHeaderFile.Data() << endl ;
fNPrimaries = gAlice->GetNtrack() ;
- fAlice = 0 ;
} else { // treeK not found in header file
if( strstr(opt,"Q") )
ReadTreeQA() ;
- if( strstr(opt,"P") || (strcmp(opt,"")==0) )
+ if( strstr(opt,"P"))
ReadPrimaries() ;
}
TString fSDigitsFileName ; //!
Bool_t fFailed ; //! set if file not opend or galice not found
Int_t fDebug ; //! Debug level
- AliRun * fAlice ; //! needed to read TreeK if in an other file than fHeaderFile
Int_t fNPrimaries ; //! # of primaries
TObjArray * fPrimaries ; //! list of lists of primaries-for the case of mixing
TFolder * fModuleFolder ; //!Folder that contains the modules