{
// ctor
//We do not create objects, because these pointers will be overwritten durin reading from file.
+ fSDigits = 0 ;
fDigits = 0 ;
fEmcRecPoints = 0 ;
fPpsdRecPoints = 0 ;
{
// ctor
+ fSDigits = 0 ;
fDigits = 0 ;
fEmcRecPoints = 0 ;
fPpsdRecPoints = 0 ;
delete fRecParticles ;
delete fHits ;
delete fDigits ;
+ delete fSDigits ;
}
//____________________________________________________________________________
TTree *treeD = gAlice->TreeD();
if(fDigits)
- fDigits->Clear();
- else
- fDigits = new TClonesArray("AliPHOSDigit",1000);
+ fDigits->Clear();
+ else{
+ cout << "AliPHOS:SetTree() fDigits " << fDigits << endl ;
+ cout << "AliPHOS:SetTree() creating new fDigits "<< endl ;
+ fDigits = new TClonesArray("AliPHOSDigit",1000);
+ }
if (treeD && fDigits) {
branch = treeD->GetBranch(branchname);
if(fSDigits)
fSDigits->Clear();
- else
- fSDigits = new TClonesArray("AliPHOSDigit",1000);
+ else{
+ cout << "AliPHOS:SetTree() fSDigits " << fSDigits << endl ;
+ cout << "AliPHOS:SetTree() creating new fSDigits "<< endl ;
+ fSDigits = new TClonesArray("AliPHOSDigit",1000);
+ }
if (gAlice->TreeS() && fSDigits ) {
branch = gAlice->TreeS()->GetBranch("PHOS");
TTree *treeR = gAlice->TreeR();
//Branch address for TreeR: EmcRecPoint
-
+
+ if(fEmcRecPoints)
+ fEmcRecPoints->Delete();
+ else{
+ cout << "AliPHOS:SetTree() fEmcRecPoints " << fEmcRecPoints << endl ;
+ cout << "AliPHOS:SetTree() creating new fEmcRecPoints "<< endl ;
+ fEmcRecPoints = new TObjArray(100);
+ }
+
+
if ( treeR && fEmcRecPoints ) {
branch = treeR->GetBranch("PHOSEmcRP");
if (branch) branch->SetAddress(&fEmcRecPoints) ;
//Branch address for TreeR: PPSDRecPoint
+ if(fPpsdRecPoints)
+ fPpsdRecPoints->Delete();
+ else{
+ cout << "AliPHOS:SetTree() fPpsdRecPoints " << fPpsdRecPoints << endl ;
+ cout << "AliPHOS:SetTree() creating new fPpsdRecPoints "<< endl ;
+ fPpsdRecPoints = new TObjArray(100);
+ }
+
if ( treeR && fPpsdRecPoints ) {
branch = treeR->GetBranch("PHOSPpsdRP");
if (branch) branch->SetAddress(&fPpsdRecPoints) ;
}
//Branch address for TreeR: TrackSegments
+
+ if(fTrackSegments)
+ fTrackSegments->Clear() ;
+ else{
+ cout << "AliPHOS:SetTree() fTrackSegments " << fTrackSegments << endl ;
+ cout << "AliPHOS:SetTree() creating new fTrackSegments "<< endl ;
+ fTrackSegments = new TClonesArray("AliPHOSTrackSegment",100);
+ }
+
if ( treeR && fTrackSegments ) {
branch = treeR->GetBranch("PHOSTS");
//Branch address for TreeR: RecParticles
+ if(fRecParticles)
+ fRecParticles->Clear() ;
+ else{
+ cout << "AliPHOS:SetTree() fRecParticles " << fRecParticles << endl ;
+ cout << "AliPHOS:SetTree() creating new fRecParticles "<< endl ;
+ fRecParticles = new TClonesArray("AliPHOSRecParticle",100);
+ }
+
+
if ( treeR && fRecParticles ) {
branch = treeR->GetBranch("PHOSRP");
if (branch) branch->SetAddress(&fRecParticles) ;