Fix in AliITS::MakeBranchR since fRecPoints is no longer persistent
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Jul 2003 14:26:50 +0000 (14:26 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Jul 2003 14:26:50 +0000 (14:26 +0000)
ITS/AliITS.cxx

index 612d69c307aeae997f2571be89f9d707dd7c51dc..5704522f2417dc9fb94c073732e8dfccfd8f8adc 100644 (file)
@@ -1520,8 +1520,8 @@ void AliITS::MakeBranchR(const char *file, Option_t *opt){
     }
     
     
     }
     
     
-
-    if (fRecPoints && fLoader->TreeR()) {
+    if(!fRecPoints)fRecPoints = new TClonesArray("AliITSRecPoint",1000);
+    if (fLoader->TreeR()) {
         if (fRecPoints == 0x0) fRecPoints = new TClonesArray("AliITSRecPoint",1000);
         MakeBranchInTree(fLoader->TreeR(),branchname,&fRecPoints,buffsz,file);
     } // end if
         if (fRecPoints == 0x0) fRecPoints = new TClonesArray("AliITSRecPoint",1000);
         MakeBranchInTree(fLoader->TreeR(),branchname,&fRecPoints,buffsz,file);
     } // end if
@@ -1589,6 +1589,7 @@ void AliITS::HitsToFastRecPoints(Int_t evNumber,Int_t bgrev,Int_t size,
     //      none.
 
     if(!GetITSgeom()) return;
     //      none.
 
     if(!GetITSgeom()) return;
+    AliITSLoader *pITSloader = (AliITSLoader*)fLoader;
     AliITSgeom *geom = GetITSgeom();
 
     const char *all = strstr(opt1,"All");
     AliITSgeom *geom = GetITSgeom();
 
     const char *all = strstr(opt1,"All");
@@ -1622,8 +1623,9 @@ void AliITS::HitsToFastRecPoints(Int_t evNumber,Int_t bgrev,Int_t size,
         mod      = (AliITSmodule *)fITSmodules->At(module);
         sim->CreateFastRecPoints(mod,module,gRandom);
         cout<<module<<"\r";fflush(0);
         mod      = (AliITSmodule *)fITSmodules->At(module);
         sim->CreateFastRecPoints(mod,module,gRandom);
         cout<<module<<"\r";fflush(0);
-        //gAlice->TreeR()->Fill(); 
-        TBranch *br=fLoader->TreeR()->GetBranch("ITSRecPointsF");
+        //gAlice->TreeR()->Fill();
+       TTree *TR = pITSloader->TreeR();
+        TBranch *br=TR->GetBranch("ITSRecPointsF");
         br->Fill();
         ResetRecPoints();
     } // end for module
         br->Fill();
         ResetRecPoints();
     } // end for module