]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Patch for recent TRefArray->TObjArray usage
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 19 Jul 2011 09:58:05 +0000 (09:58 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 19 Jul 2011 09:58:05 +0000 (09:58 +0000)
C. Loizides

STEER/STEERBase/AliMCEvent.cxx
STEER/STEERBase/AliMCEvent.h
STEER/STEERBase/AliMCParticle.cxx
STEER/STEERBase/AliMCParticle.h

index 20794f6537e33eeb37750f9e4329498c1f4c3ab8..e77ef874fdef56f38f2522d9a318eb7364752fc0 100644 (file)
@@ -496,7 +496,7 @@ AliVParticle* AliMCEvent::GetTrack(Int_t i) const
     TParticle     *particle   = 0;
     TClonesArray  *trefs      = 0;
     Int_t          ntref      = 0;
-    TRefArray     *rarray     = 0;
+    TObjArray     *rarray     = 0;
 
 
 
@@ -524,7 +524,7 @@ AliVParticle* AliMCEvent::GetTrack(Int_t i) const
            fTreeTR->GetEntry(fStack->TreeKEntry(i));
            trefs     = fTRBuffer;
            ntref     = trefs->GetEntriesFast();
-           rarray    = new TRefArray(ntref);
+           rarray    = new TObjArray(ntref);
            Int_t nen = fTrackReferences->GetEntriesFast();
            for (Int_t j = 0; j < ntref; j++) {
                // Save the track references in a TClonesArray
@@ -636,7 +636,7 @@ Int_t AliMCEvent::BgLabelToIndex(Int_t label)
 }
 
 
-Bool_t AliMCEvent::IsPhysicalPrimary(Int_t i) 
+Bool_t AliMCEvent::IsPhysicalPrimary(Int_t i) const
 {
 //
 // Delegate to subevent if necesarry 
index 3e4aa2a511d2943d7e96c0312b0472abd2497f87..de14ac70ca08322680d939a6f8069acefd4fd1a4 100644 (file)
@@ -122,7 +122,7 @@ public:
     virtual Int_t     GetSecondaryOffset()  const {return fSecondaryOffset;}    
     virtual void      SetPrimaryOffset(Int_t ioff)    {fPrimaryOffset = ioff;}
     virtual void      SetSecondaryOffset(Int_t ioff)  {fSecondaryOffset = ioff;}    
-    virtual Bool_t    IsPhysicalPrimary(Int_t i);
+    virtual Bool_t    IsPhysicalPrimary(Int_t i) const;
     virtual Int_t     BgLabelToIndex(Int_t label);
     static  Int_t     BgLabelOffset() {return fgkBgLabelOffset;}
     virtual Bool_t    IsFromBGEvent(Int_t index);
index c4b66304cdc047502f942a4a226ff966394999d1..938920c32d33251e3eaafe6535dccdae18e38cac 100644 (file)
@@ -21,7 +21,7 @@
 //     Author: Andreas Morsch, CERN
 //-------------------------------------------------------------------------
 
-#include <TRefArray.h>
+#include <TObjArray.h>
 
 #include "AliMCParticle.h"
 #include "AliExternalTrackParam.h" 
@@ -43,7 +43,7 @@ AliMCParticle::AliMCParticle():
 }
 
     
-AliMCParticle::AliMCParticle(TParticle* part, TRefArray* rarray, Int_t index):
+AliMCParticle::AliMCParticle(TParticle* part, TObjArray* rarray, Int_t index):
     AliVParticle(),
     fParticle(part),
     fTrackReferences(rarray),
@@ -89,7 +89,7 @@ AliMCParticle::~AliMCParticle()
   // fParticle should be handled by the user
   // AliStack in case of AliMCEventHandler
   if(fTrackReferences){
-      fTrackReferences->Delete();
+    fTrackReferences->Clear();
       delete fTrackReferences;
       fTrackReferences = 0;
   }
index b8f45bb55a34b3841f3e14790250b65ebbb4e9db..13db7c23c52ffe6c434303080d97df2e1cbd04f0 100644 (file)
@@ -13,7 +13,7 @@
 #include <Rtypes.h>
 #include <TParticle.h>
 #include <TParticlePDG.h>
-#include <TRefArray.h>
+#include <TObjArray.h>
 
 #include "AliTrackReference.h"
 #include "AliVParticle.h"
@@ -21,7 +21,7 @@
 class AliMCParticle: public AliVParticle {
 public:
     AliMCParticle();
-    AliMCParticle(TParticle* part, TRefArray* rarray = 0, Int_t label=-1);
+    AliMCParticle(TParticle* part, TObjArray* rarray = 0, Int_t label=-1);
     virtual ~AliMCParticle();
     AliMCParticle(const AliMCParticle& mcPart); 
     AliMCParticle& operator=(const AliMCParticle& mcPart);
@@ -78,7 +78,7 @@ public:
            
  private:
     TParticle *fParticle;             // The wrapped TParticle
-    TRefArray *fTrackReferences;      // Reference array to track references
+    TObjArray *fTrackReferences;      // Array to track references
     Int_t      fNTrackRef;            // Number of track references
     Int_t      fLabel;                // fParticle Label in the Stack
     Int_t      fMother;               // Mother particles