]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
AddHitList also added to SetTreeAddress
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 30 Jan 2004 10:22:00 +0000 (10:22 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 30 Jan 2004 10:22:00 +0000 (10:22 +0000)
MUON/AliMUONData.cxx

index eda640e5dbe8f89d06522ce2ef79af0b599a5247..19b84d817d70e0fb7c321c07a860b04d7754aff8 100644 (file)
@@ -179,7 +179,6 @@ void AliMUONData::AddHit(Int_t fIshunt, Int_t track, Int_t iChamber,
                         Float_t phi, Float_t length, Float_t destep)
 {
   // Add new hit to the hit list
-    
   TClonesArray &lhits = *fHits;
   new(lhits[fNhits++]) AliMUONHit(fIshunt, track, iChamber, 
                                  idpart, X, Y, Z, 
@@ -668,7 +667,10 @@ void AliMUONData::SetTreeAddress(Option_t* option)
   //
   // Branch address for hit tree
   if ( TreeH() && cH ) {
-    if (fHits == 0x0) fHits     = new TClonesArray("AliMUONHit",1000);
+      if (fHits == 0x0) {
+       fHits     = new TClonesArray("AliMUONHit",1000);
+       gAlice->GetMCApp()->AddHitList (fHits);
+    }
     fNhits =0;
   } 
   if (TreeH() && fHits && cH) {