]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
The operator[] is replaced by At() or AddAt() in case of TObjArray.
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 30 Aug 2001 09:56:18 +0000 (09:56 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 30 Aug 2001 09:56:18 +0000 (09:56 +0000)
17 files changed:
EVGEN/AliGenCocktailAfterBurner.cxx
ITS/AliITS.cxx
ITS/AliITSclusterSSD.cxx
ITS/AliITSsimulationSDD.cxx
ITS/AliITSsimulationSPD.cxx
ITS/AliITSsimulationSPDdubna.cxx
LHC/AliLHC.cxx
MUON/AliMUON.cxx
MUON/AliMUONChamber.cxx
MUON/AliMUONSegmentationSlat.cxx
MUON/AliMUONSegmentationV01.cxx
MUON/AliMUONTrack.cxx
RICH/AliRICH.cxx
RICH/AliRICHTransientDigit.cxx
RICH/AliRICHv0.cxx
RICH/AliRICHv1.cxx
RICH/AliRICHv1.h

index 98135ed14c953c0841c6acaa694b538098e2db6d..b7eb9bb0f093dd23ecb2f910865f9d631d4c26d5 100644 (file)
@@ -233,7 +233,8 @@ AliStack* AliGenCocktailAfterBurner::GetStack(Int_t n)
        Fatal("AliGenCocktailAfterBurner::GetStack","Asked for non existing stack (%d)",n);
        return 0; 
     }
        Fatal("AliGenCocktailAfterBurner::GetStack","Asked for non existing stack (%d)",n);
        return 0; 
     }
-    return ((AliStack*) ((*fInternalStacks)[n]) );
+    //PH    return ((AliStack*) ((*fInternalStacks)[n]) );
+    return ((AliStack*) fInternalStacks->At(n) );
 }
 
 void AliGenCocktailAfterBurner::SetActiveEventNumber(Int_t actev)
 }
 
 void AliGenCocktailAfterBurner::SetActiveEventNumber(Int_t actev)
index 07732f362696cb0c51e8114fd631abb8bdf0478e..39a2cc834f0c0916b96c614dd8fdf9e5ca83c630 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
 
 /*
 $Log$
+Revision 1.58  2001/07/26 15:05:29  hristov
+Use global gRandom generator (M.Ivanov)
+
 Revision 1.57  2001/07/24 14:26:11  mariana
 Introduce the function Digits2Reco() and write the defaults for simulation and reconstruction
 
 Revision 1.57  2001/07/24 14:26:11  mariana
 Introduce the function Digits2Reco() and write the defaults for simulation and reconstruction
 
@@ -429,14 +432,16 @@ AliITS::~AliITS(){
 AliITSDetType* AliITS::DetType(Int_t id)
 {
   //return pointer to id detector type
 AliITSDetType* AliITS::DetType(Int_t id)
 {
   //return pointer to id detector type
-    return ((AliITSDetType*) (*fDetTypes)[id]);
+  //PH    return ((AliITSDetType*) (*fDetTypes)[id]);
+    return ((AliITSDetType*) fDetTypes->At(id));
 
 }
 //___________________________________________
 void AliITS::SetClasses(Int_t id, const char *digit, const char *cluster)
 {
   //set the digit and cluster classes to be used for the id detector type
 
 }
 //___________________________________________
 void AliITS::SetClasses(Int_t id, const char *digit, const char *cluster)
 {
   //set the digit and cluster classes to be used for the id detector type
-    ((AliITSDetType*) (*fDetTypes)[id])->ClassNames(digit,cluster);
+  //PH    ((AliITSDetType*) (*fDetTypes)[id])->ClassNames(digit,cluster);
+    ((AliITSDetType*) fDetTypes->At(id))->ClassNames(digit,cluster);
 
 }
 //___________________________________________
 
 }
 //___________________________________________
@@ -444,7 +449,8 @@ void AliITS::SetResponseModel(Int_t id, AliITSresponse *response)
 {
   //set the response model for the id detector type
 
 {
   //set the response model for the id detector type
 
-    ((AliITSDetType*) (*fDetTypes)[id])->ResponseModel(response);
+  //PH    ((AliITSDetType*) (*fDetTypes)[id])->ResponseModel(response);
+    ((AliITSDetType*) fDetTypes->At(id))->ResponseModel(response);
 
 }
 
 
 }
 
@@ -453,7 +459,8 @@ void AliITS::SetSegmentationModel(Int_t id, AliITSsegmentation *seg)
 {
   //set the segmentation model for the id detector type
 
 {
   //set the segmentation model for the id detector type
 
-    ((AliITSDetType*) (*fDetTypes)[id])->SegmentationModel(seg);
+  //PH    ((AliITSDetType*) (*fDetTypes)[id])->SegmentationModel(seg);
+    ((AliITSDetType*) fDetTypes->At(id))->SegmentationModel(seg);
 
 }
 
 
 }
 
@@ -462,7 +469,8 @@ void AliITS::SetSimulationModel(Int_t id, AliITSsimulation *sim)
 {
   //set the simulation model for the id detector type
 
 {
   //set the simulation model for the id detector type
 
-   ((AliITSDetType*) (*fDetTypes)[id])->SimulationModel(sim);
+  //PH   ((AliITSDetType*) (*fDetTypes)[id])->SimulationModel(sim);
+   ((AliITSDetType*) fDetTypes->At(id))->SimulationModel(sim);
 
 }
 //___________________________________________
 
 }
 //___________________________________________
@@ -470,7 +478,8 @@ void AliITS::SetReconstructionModel(Int_t id, AliITSClusterFinder *reconst)
 {
   //set the cluster finder model for the id detector type
 
 {
   //set the cluster finder model for the id detector type
 
-   ((AliITSDetType*) (*fDetTypes)[id])->ReconstructionModel(reconst);
+  //PH   ((AliITSDetType*) (*fDetTypes)[id])->ReconstructionModel(reconst);
+   ((AliITSDetType*) fDetTypes->At(id))->ReconstructionModel(reconst);
 
 }
 
 
 }
 
@@ -492,7 +501,8 @@ void AliITS::AddRealDigit(Int_t id, Int_t *digits)
 {
   // add a real digit - as coming from data
 
 {
   // add a real digit - as coming from data
 
-  TClonesArray &ldigits = *((TClonesArray*)(*fDtype)[id]);
+  //PH  TClonesArray &ldigits = *((TClonesArray*)(*fDtype)[id]);
+  TClonesArray &ldigits = *((TClonesArray*)fDtype->At(id));
   new(ldigits[fNdtype[id]++]) AliITSdigit(digits);
 
 }
   new(ldigits[fNdtype[id]++]) AliITSdigit(digits);
 
 }
@@ -502,7 +512,8 @@ void AliITS::AddSimDigit(Int_t id, AliITSdigit *d)
 
   // add a simulated digit
 
 
   // add a simulated digit
 
-  TClonesArray &ldigits = *((TClonesArray*)(*fDtype)[id]);
+  //PH  TClonesArray &ldigits = *((TClonesArray*)(*fDtype)[id]);
+  TClonesArray &ldigits = *((TClonesArray*)fDtype->At(id));
 
   switch(id)
   {
 
   switch(id)
   {
@@ -524,7 +535,8 @@ void AliITS::AddSimDigit(Int_t id,Float_t phys,Int_t *digits,Int_t *tracks,Int_t
 
   // add a simulated digit to the list
 
 
   // add a simulated digit to the list
 
-  TClonesArray &ldigits = *((TClonesArray*)(*fDtype)[id]);
+  //PH  TClonesArray &ldigits = *((TClonesArray*)(*fDtype)[id]);
+  TClonesArray &ldigits = *((TClonesArray*)fDtype->At(id));
   switch(id)
   {
   case 0:
   switch(id)
   {
   case 0:
@@ -546,7 +558,8 @@ void AliITS::AddCluster(Int_t id, AliITSRawCluster *c)
 
   // add a cluster to the list
 
 
   // add a cluster to the list
 
-  TClonesArray &lcl = *((TClonesArray*)(*fCtype)[id]);
+  //PH  TClonesArray &lcl = *((TClonesArray*)(*fCtype)[id]);
+  TClonesArray &lcl = *((TClonesArray*)fCtype->At(id));
 
   switch(id)
   {
 
   switch(id)
   {
@@ -586,7 +599,8 @@ void AliITS::ResetDigits()
 
     Int_t i;
     for (i=0;i<kNTYPES;i++ ) {
 
     Int_t i;
     for (i=0;i<kNTYPES;i++ ) {
-       if ((*fDtype)[i])    ((TClonesArray*)(*fDtype)[i])->Clear();
+      //PH     if ((*fDtype)[i])    ((TClonesArray*)(*fDtype)[i])->Clear();
+       if (fDtype->At(i))    ((TClonesArray*)fDtype->At(i))->Clear();
        if (fNdtype)  fNdtype[i]=0;
     }
 }
        if (fNdtype)  fNdtype[i]=0;
     }
 }
@@ -597,7 +611,8 @@ void AliITS::ResetDigits(Int_t i)
     //
     // Reset number of digits and the digits array for this branch
     //
     //
     // Reset number of digits and the digits array for this branch
     //
-  if ((*fDtype)[i])    ((TClonesArray*)(*fDtype)[i])->Clear();
+  //PH  if ((*fDtype)[i])    ((TClonesArray*)(*fDtype)[i])->Clear();
+  if (fDtype->At(i))    ((TClonesArray*)fDtype->At(i))->Clear();
   if (fNdtype)  fNdtype[i]=0;
 }
 
   if (fNdtype)  fNdtype[i]=0;
 }
 
@@ -611,7 +626,8 @@ void AliITS::ResetClusters()
 
     Int_t i;
     for (i=0;i<kNTYPES;i++ ) {
 
     Int_t i;
     for (i=0;i<kNTYPES;i++ ) {
-       if ((*fCtype)[i])    ((TClonesArray*)(*fCtype)[i])->Clear();
+      //PH     if ((*fCtype)[i])    ((TClonesArray*)(*fCtype)[i])->Clear();
+       if (fCtype->At(i))    ((TClonesArray*)fCtype->At(i))->Clear();
        if (fNctype)  fNctype[i]=0;
     }
 
        if (fNctype)  fNctype[i]=0;
     }
 
@@ -623,7 +639,8 @@ void AliITS::ResetClusters(Int_t i)
     //
     // Reset number of clusters and the clusters array for this branch
     //
     //
     // Reset number of clusters and the clusters array for this branch
     //
-       if ((*fCtype)[i])    ((TClonesArray*)(*fCtype)[i])->Clear();
+  //PH if ((*fCtype)[i])    ((TClonesArray*)(*fCtype)[i])->Clear();
+       if (fCtype->At(i))    ((TClonesArray*)fCtype->At(i))->Clear();
        if (fNctype)  fNctype[i]=0;
 
 }
        if (fNctype)  fNctype[i]=0;
 
 }
@@ -876,7 +893,8 @@ void AliITS::GetTreeC(Int_t event)
           AliITSDetType *iDetType=DetType(i); 
           iDetType->GetClassNames(digclass,clclass);
           // clusters
           AliITSDetType *iDetType=DetType(i); 
           iDetType->GetClassNames(digclass,clclass);
           // clusters
-          if(!(*fCtype)[i]) fCtype->AddAt(new TClonesArray(clclass,1000),i); 
+       //PH       if(!(*fCtype)[i]) fCtype->AddAt(new TClonesArray(clclass,1000),i); 
+          if(!fCtype->At(i)) fCtype->AddAt(new TClonesArray(clclass,1000),i); 
           if (kNTYPES==3) sprintf(branchname,"%sClusters%s",GetName(),det[i]);
           else  sprintf(branchname,"%sClusters%d",GetName(),i+1);
           if (fCtype) {
           if (kNTYPES==3) sprintf(branchname,"%sClusters%s",GetName(),det[i]);
           else  sprintf(branchname,"%sClusters%d",GetName(),i+1);
           if (fCtype) {
@@ -919,7 +937,8 @@ void AliITS::MakeBranch(Option_t* option, const char *file)
    for (i=0; i<kNTYPES ;i++) {
        DetType(i)->GetClassNames(digclass,clclass);
        // digits
    for (i=0; i<kNTYPES ;i++) {
        DetType(i)->GetClassNames(digclass,clclass);
        // digits
-       if(!((*fDtype)[i])) fDtype->AddAt(new TClonesArray(digclass,1000),i);
+       //PH       if(!((*fDtype)[i])) fDtype->AddAt(new TClonesArray(digclass,1000),i);
+       if(!(fDtype->At(i))) fDtype->AddAt(new TClonesArray(digclass,1000),i);
        else ResetDigits(i);
    }
 
        else ResetDigits(i);
    }
 
@@ -976,7 +995,8 @@ void AliITS::SetTreeAddress()
       for (i=0; i<kNTYPES; i++) {
        DetType(i)->GetClassNames(digclass,clclass);
          // digits
       for (i=0; i<kNTYPES; i++) {
        DetType(i)->GetClassNames(digclass,clclass);
          // digits
-        if(!((*fDtype)[i])) fDtype->AddAt(new TClonesArray(digclass,1000),i);
+    //PH        if(!((*fDtype)[i])) fDtype->AddAt(new TClonesArray(digclass,1000),i);
+        if(!(fDtype->At(i))) fDtype->AddAt(new TClonesArray(digclass,1000),i);
        else ResetDigits(i);
 
        if (kNTYPES==3) sprintf(branchname,"%sDigits%s",GetName(),det[i]);
        else ResetDigits(i);
 
        if (kNTYPES==3) sprintf(branchname,"%sDigits%s",GetName(),det[i]);
index 4ef957470cd4cf55706666d64014f4d1ef1102cc..fc054e8309294875ccbd42025a7b395a867b0798 100644 (file)
@@ -134,7 +134,8 @@ Int_t AliITSclusterSSD::GetDigitStripNo(Int_t digit)
   // return strip no of a digit
        if (digit<0) return -1;
        return (digit>(fNDigits-1))?-1 :
   // return strip no of a digit
        if (digit<0) return -1;
        return (digit>(fNDigits-1))?-1 :
-            ((AliITSdigitSSD*)((*fDigits)[(*fDigitsIndex)[digit]]))->GetStripNumber();
+      //PH            ((AliITSdigitSSD*)((*fDigits)[(*fDigitsIndex)[digit]]))->GetStripNumber();
+            ((AliITSdigitSSD*)(fDigits->At((*fDigitsIndex)[digit])))->GetStripNumber();
 }
 /************************************************************/
 Int_t AliITSclusterSSD::GetDigitSignal(Int_t digit)
 }
 /************************************************************/
 Int_t AliITSclusterSSD::GetDigitSignal(Int_t digit)
@@ -143,7 +144,8 @@ Int_t AliITSclusterSSD::GetDigitSignal(Int_t digit)
   Int_t index,signal;
   if (digit<0||digit>=fNDigits) return -1;
   index  = (*fDigitsIndex)[digit];
   Int_t index,signal;
   if (digit<0||digit>=fNDigits) return -1;
   index  = (*fDigitsIndex)[digit];
-  signal = ((AliITSdigitSSD*)((*fDigits)[index]))->GetSignal();
+  //PH  signal = ((AliITSdigitSSD*)((*fDigits)[index]))->GetSignal();
+  signal = ((AliITSdigitSSD*)(fDigits->At(index)))->GetSignal();
   /*
   if(signal>1.e5) printf("GetDigitSignal: digit %d index %d signal %d\n",
                         digit,index, signal);
   /*
   if(signal>1.e5) printf("GetDigitSignal: digit %d index %d signal %d\n",
                         digit,index, signal);
index e56f856df00a0f692f4b7eb2c1f760c28d94142c..806c36e53d4b715970828b394e48a48318ca7b08 100644 (file)
@@ -1475,8 +1475,10 @@ void AliITSsimulationSDD::CreateHistograms(Int_t scale){
           Char_t candNum[4];
           sprintf(candNum,"%d",i+1);
           sddName.Append(candNum);
           Char_t candNum[4];
           sprintf(candNum,"%d",i+1);
           sddName.Append(candNum);
-          (*fHis)[i] = new TH1F(sddName.Data(),"SDD maps",
-                scale*fMaxNofSamples,0.,(Float_t) scale*fMaxNofSamples);
+       //PH       (*fHis)[i] = new TH1F(sddName.Data(),"SDD maps",
+       //PH                scale*fMaxNofSamples,0.,(Float_t) scale*fMaxNofSamples);
+          fHis->AddAt(new TH1F(sddName.Data(),"SDD maps",
+                scale*fMaxNofSamples,0.,(Float_t) scale*fMaxNofSamples), i);
       }
 
 }
       }
 
 }
@@ -1503,7 +1505,8 @@ void AliITSsimulationSDD::ResetHistograms(){
     //
     Int_t i;
     for (i=0;i<fNofMaps;i++ ) {
     //
     Int_t i;
     for (i=0;i<fNofMaps;i++ ) {
-       if ((*fHis)[i])    ((TH1F*)(*fHis)[i])->Reset();
+      //PH     if ((*fHis)[i])    ((TH1F*)(*fHis)[i])->Reset();
+       if (fHis->At(i))    ((TH1F*)fHis->At(i))->Reset();
     }
 
 }
     }
 
 }
@@ -1525,7 +1528,8 @@ TH1F *AliITSsimulationSDD::GetAnode(Int_t wing, Int_t anode) {
   }
 
   Int_t index = (wing-1)*fNofMaps/2 + anode-1;
   }
 
   Int_t index = (wing-1)*fNofMaps/2 + anode-1;
-  return (TH1F*)((*fHis)[index]); 
+  //PH  return (TH1F*)((*fHis)[index]); 
+  return (TH1F*)(fHis->At(index)); 
 }
 
 //____________________________________________
 }
 
 //____________________________________________
@@ -1536,7 +1540,8 @@ void AliITSsimulationSDD::WriteToFile(TFile *hfile) {
 
   hfile->cd();
   Int_t i;
 
   hfile->cd();
   Int_t i;
-  for(i=0; i<fNofMaps; i++)  (*fHis)[i]->Write(); //fAdcs[i]->Write();
+  //PH  for(i=0; i<fNofMaps; i++)  (*fHis)[i]->Write(); //fAdcs[i]->Write();
+  for(i=0; i<fNofMaps; i++)  fHis->At(i)->Write(); //fAdcs[i]->Write();
   return;
 }
 //____________________________________________
   return;
 }
 //____________________________________________
index f478d7376159c3346b997bb8dbe283f7300d597e..357e0bc6071169614c1818dc9bc3d29be0a87bad 100644 (file)
@@ -701,8 +701,10 @@ void AliITSsimulationSPD::CreateHistograms() {
           Char_t candnum[4];
           sprintf(candnum,"%d",i+1);
           spdname.Append(candnum);
           Char_t candnum[4];
           sprintf(candnum,"%d",i+1);
           spdname.Append(candnum);
-          (*fHis)[i] = new TH1F(spdname.Data(),"SPD maps",
-                              fNPixelsX,0.,(Float_t) fNPixelsX);
+       //PH       (*fHis)[i] = new TH1F(spdname.Data(),"SPD maps",
+       //PH                              fNPixelsX,0.,(Float_t) fNPixelsX);
+          fHis->AddAt(new TH1F(spdname.Data(),"SPD maps",
+                              fNPixelsX,0.,(Float_t) fNPixelsX), i);
       }
 
 }
       }
 
 }
@@ -715,7 +717,8 @@ void AliITSsimulationSPD::ResetHistograms() {
     //
     Int_t i;
     for(i=0;i<fNPixelsZ;i++ ) {
     //
     Int_t i;
     for(i=0;i<fNPixelsZ;i++ ) {
-       if ((*fHis)[i])    ((TH1F*)(*fHis)[i])->Reset();
+      //PH     if ((*fHis)[i])    ((TH1F*)(*fHis)[i])->Reset();
+       if (fHis->At(i))    ((TH1F*)fHis->At(i))->Reset();
     }
 
 }
     }
 
 }
index 3326d96b455fa168ebff460b2de6fb069f45c105..9eb6abc1c7579b5bc3c693e502ea8d767aee8809 100644 (file)
@@ -597,8 +597,10 @@ void AliITSsimulationSPDdubna::CreateHistograms()
           Char_t pixelz[4];
           sprintf(pixelz,"%d",i+1);
           spdName.Append(pixelz);
           Char_t pixelz[4];
           sprintf(pixelz,"%d",i+1);
           spdName.Append(pixelz);
-          (*fHis)[i] = new TH1F(spdName.Data(),"SPD maps",
-                              fNPixelsX,0.,(Float_t) fNPixelsX);
+       //PH       (*fHis)[i] = new TH1F(spdName.Data(),"SPD maps",
+       //PH                       fNPixelsX,0.,(Float_t) fNPixelsX);
+          fHis->AddAt(new TH1F(spdName.Data(),"SPD maps",
+                              fNPixelsX,0.,(Float_t) fNPixelsX), i);
       }
 }
 
       }
 }
 
@@ -611,7 +613,8 @@ void AliITSsimulationSPDdubna::ResetHistograms()
     //
 
     for ( int i=0;i<fNPixelsZ;i++ ) {
     //
 
     for ( int i=0;i<fNPixelsZ;i++ ) {
-       if ((*fHis)[i])    ((TH1F*)(*fHis)[i])->Reset();
+      //PH     if ((*fHis)[i])    ((TH1F*)(*fHis)[i])->Reset();
+       if (fHis->At(i))    ((TH1F*)fHis->At(i))->Reset();
     }
 
 }
     }
 
 }
index 9430f6956c690b8dc5999bd90bba59d0a9caac08..e67bb2634bdb670967501ef955e2e62ede4bf70e 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
 
 /*
 $Log$
+Revision 1.1  2001/07/25 17:28:32  morsch
+LHC related code. First commit.
+
 */
 #include "AliLHC.h"
 #include "AliLhcIRegion.h"
 */
 #include "AliLHC.h"
 #include "AliLhcIRegion.h"
@@ -31,8 +34,10 @@ AliLHC::AliLHC()
     fNRegions   = 0;
     fNProcesses = 0;
     fBeams = new TObjArray(2);
     fNRegions   = 0;
     fNProcesses = 0;
     fBeams = new TObjArray(2);
-    (*fBeams)[0] = 0;
-    (*fBeams)[1] = 0;    
+    //PH    (*fBeams)[0] = 0;
+    //PH    (*fBeams)[1] = 0;    
+    fBeams->AddAt(0,0);
+    fBeams->AddAt(0,1);    
     fTime = 0;
     fTimeMax = 0;
 }
     fTime = 0;
     fTimeMax = 0;
 }
index 37628739ba465c2d3b277fc9a6b9c67ff0aec063..445d23a139c538c31437707d1f93b6f279bcf246 100644 (file)
@@ -14,6 +14,9 @@
  **************************************************************************/
 /*
 $Log$
  **************************************************************************/
 /*
 $Log$
+Revision 1.53  2001/07/20 10:03:13  morsch
+Changes needed to work with Root 3.01 (substitute lhs [] operator). (Jiri Chudoba)
+
 Revision 1.52  2001/06/14 13:49:22  hristov
 Write a TreeD in SDigits2Digits method (needed to be compatible with alirun script)
 
 Revision 1.52  2001/06/14 13:49:22  hristov
 Write a TreeD in SDigits2Digits method (needed to be compatible with alirun script)
 
@@ -364,7 +367,8 @@ AliMUON::AliMUON(const char *name, const char *title)
              fChambers->AddAt(new AliMUONChamberTrigger(ch),ch);
            }
            
              fChambers->AddAt(new AliMUONChamberTrigger(ch),ch);
            }
            
-           AliMUONChamber* chamber = (AliMUONChamber*) (*fChambers)[ch];
+        //PH       AliMUONChamber* chamber = (AliMUONChamber*) (*fChambers)[ch];
+           AliMUONChamber* chamber = (AliMUONChamber*) fChambers->At(ch);
            
            chamber->SetGid(0);
            // Default values for Z of chambers
            
            chamber->SetGid(0);
            // Default values for Z of chambers
@@ -503,7 +507,8 @@ void AliMUON::AddDigits(Int_t id, Int_t *tracks, Int_t *charges, Int_t *digits)
     // Add a MUON digit to the list
     //
 
     // Add a MUON digit to the list
     //
 
-    TClonesArray &ldigits = *((TClonesArray*)(*fDchambers)[id]);
+  //PH    TClonesArray &ldigits = *((TClonesArray*)(*fDchambers)[id]);
+    TClonesArray &ldigits = *((TClonesArray*)fDchambers->At(id));
     new(ldigits[fNdch[id]++]) AliMUONDigit(tracks,charges,digits);
 }
 
     new(ldigits[fNdch[id]++]) AliMUONDigit(tracks,charges,digits);
 }
 
@@ -514,7 +519,8 @@ void AliMUON::AddRawCluster(Int_t id, const AliMUONRawCluster& c)
     // Add a MUON digit to the list
     //
 
     // Add a MUON digit to the list
     //
 
-    TClonesArray &lrawcl = *((TClonesArray*)(*fRawClusters)[id]);
+  //PH    TClonesArray &lrawcl = *((TClonesArray*)(*fRawClusters)[id]);
+    TClonesArray &lrawcl = *((TClonesArray*)fRawClusters->At(id));
     new(lrawcl[fNrawch[id]++]) AliMUONRawCluster(c);
 }
 
     new(lrawcl[fNrawch[id]++]) AliMUONRawCluster(c);
 }
 
@@ -695,7 +701,8 @@ void AliMUON::ResetDigits()
     // Reset number of digits and the digits array for this detector
     //
     for ( int i=0;i<AliMUONConstants::NCh();i++ ) {
     // Reset number of digits and the digits array for this detector
     //
     for ( int i=0;i<AliMUONConstants::NCh();i++ ) {
-       if ((*fDchambers)[i])    ((TClonesArray*)(*fDchambers)[i])->Clear();
+      //PH     if ((*fDchambers)[i])    ((TClonesArray*)(*fDchambers)[i])->Clear();
+       if ((*fDchambers)[i])    ((TClonesArray*)fDchambers->At(i))->Clear();
        if (fNdch)  fNdch[i]=0;
     }
 }
        if (fNdch)  fNdch[i]=0;
     }
 }
@@ -706,7 +713,8 @@ void AliMUON::ResetRawClusters()
     // Reset number of raw clusters and the raw clust array for this detector
     //
     for ( int i=0;i<AliMUONConstants::NTrackingCh();i++ ) {
     // Reset number of raw clusters and the raw clust array for this detector
     //
     for ( int i=0;i<AliMUONConstants::NTrackingCh();i++ ) {
-       if ((*fRawClusters)[i])    ((TClonesArray*)(*fRawClusters)[i])->Clear();
+      //PH     if ((*fRawClusters)[i])    ((TClonesArray*)(*fRawClusters)[i])->Clear();
+       if ((*fRawClusters)[i])    ((TClonesArray*)fRawClusters->At(i))->Clear();
        if (fNrawch)  fNrawch[i]=0;
     }
 }
        if (fNrawch)  fNrawch[i]=0;
     }
 }
@@ -726,8 +734,10 @@ void AliMUON::SetPadSize(Int_t id, Int_t isec, Float_t p1, Float_t p2)
 {
 // Set the pad size for chamber id and cathode isec
     Int_t i=2*(id-1);
 {
 // Set the pad size for chamber id and cathode isec
     Int_t i=2*(id-1);
-    ((AliMUONChamber*) (*fChambers)[i])  ->SetPadSize(isec,p1,p2);
-    ((AliMUONChamber*) (*fChambers)[i+1])->SetPadSize(isec,p1,p2);
+    //PH    ((AliMUONChamber*) (*fChambers)[i])  ->SetPadSize(isec,p1,p2);
+    //PH    ((AliMUONChamber*) (*fChambers)[i+1])->SetPadSize(isec,p1,p2);
+    ((AliMUONChamber*) fChambers->At(i))  ->SetPadSize(isec,p1,p2);
+    ((AliMUONChamber*) fChambers->At(i+1))->SetPadSize(isec,p1,p2);
 }
 
 //___________________________________________
 }
 
 //___________________________________________
@@ -736,7 +746,8 @@ void AliMUON::SetChambersZ(const Float_t *Z)
   // Set Z values for all chambers (tracking and trigger)
   // from the array pointed to by "Z"
     for (Int_t ch = 0; ch < AliMUONConstants::NCh(); ch++)
   // Set Z values for all chambers (tracking and trigger)
   // from the array pointed to by "Z"
     for (Int_t ch = 0; ch < AliMUONConstants::NCh(); ch++)
-       ((AliMUONChamber*) ((*fChambers)[ch]))->SetZ(Z[ch]);
+      //PH     ((AliMUONChamber*) ((*fChambers)[ch]))->SetZ(Z[ch]);
+       ((AliMUONChamber*) fChambers->At(ch))->SetZ(Z[ch]);
     return;
 }
 
     return;
 }
 
@@ -754,8 +765,10 @@ void AliMUON::SetChargeSlope(Int_t id, Float_t p1)
 {
 // Set the inverse charge slope for chamber id
     Int_t i=2*(id-1);
 {
 // Set the inverse charge slope for chamber id
     Int_t i=2*(id-1);
-    ((AliMUONChamber*) (*fChambers)[i])->SetChargeSlope(p1);
-    ((AliMUONChamber*) (*fChambers)[i+1])->SetChargeSlope(p1);
+    //PH    ((AliMUONChamber*) (*fChambers)[i])->SetChargeSlope(p1);
+    //PH    ((AliMUONChamber*) (*fChambers)[i+1])->SetChargeSlope(p1);
+    ((AliMUONChamber*) fChambers->At(i))->SetChargeSlope(p1);
+    ((AliMUONChamber*) fChambers->At(i+1))->SetChargeSlope(p1);
 }
 
 //___________________________________________
 }
 
 //___________________________________________
@@ -763,8 +776,10 @@ void AliMUON::SetChargeSpread(Int_t id, Float_t p1, Float_t p2)
 {
 // Set sigma of charge spread for chamber id
     Int_t i=2*(id-1);
 {
 // Set sigma of charge spread for chamber id
     Int_t i=2*(id-1);
-    ((AliMUONChamber*) (*fChambers)[i])->SetChargeSpread(p1,p2);
-    ((AliMUONChamber*) (*fChambers)[i+1])->SetChargeSpread(p1,p2);
+    //PH    ((AliMUONChamber*) fChambers->At(i))->SetChargeSpread(p1,p2);
+    //PH    ((AliMUONChamber*) fChambers->Ati+1])->SetChargeSpread(p1,p2);
+    ((AliMUONChamber*) fChambers->At(i))->SetChargeSpread(p1,p2);
+    ((AliMUONChamber*) fChambers->At(i+1))->SetChargeSpread(p1,p2);
 }
 
 //___________________________________________
 }
 
 //___________________________________________
@@ -772,8 +787,10 @@ void AliMUON::SetSigmaIntegration(Int_t id, Float_t p1)
 {
 // Set integration limits for charge spread
     Int_t i=2*(id-1);
 {
 // Set integration limits for charge spread
     Int_t i=2*(id-1);
-    ((AliMUONChamber*) (*fChambers)[i])->SetSigmaIntegration(p1);
-    ((AliMUONChamber*) (*fChambers)[i+1])->SetSigmaIntegration(p1);
+    //PH    ((AliMUONChamber*) (*fChambers)[i])->SetSigmaIntegration(p1);
+    //PH    ((AliMUONChamber*) (*fChambers)[i+1])->SetSigmaIntegration(p1);
+    ((AliMUONChamber*) fChambers->At(i))->SetSigmaIntegration(p1);
+    ((AliMUONChamber*) fChambers->At(i+1))->SetSigmaIntegration(p1);
 }
 
 //___________________________________________
 }
 
 //___________________________________________
@@ -781,8 +798,10 @@ void AliMUON::SetMaxAdc(Int_t id, Int_t p1)
 {
 // Set maximum number for ADCcounts (saturation)
     Int_t i=2*(id-1);
 {
 // Set maximum number for ADCcounts (saturation)
     Int_t i=2*(id-1);
-    ((AliMUONChamber*) (*fChambers)[i])->SetMaxAdc(p1);
-    ((AliMUONChamber*) (*fChambers)[i+1])->SetMaxAdc(p1);
+    //PH    ((AliMUONChamber*) (*fChambers)[i])->SetMaxAdc(p1);
+    //PH    ((AliMUONChamber*) (*fChambers)[i+1])->SetMaxAdc(p1);
+    ((AliMUONChamber*) fChambers->At(i))->SetMaxAdc(p1);
+    ((AliMUONChamber*) fChambers->At(i+1))->SetMaxAdc(p1);
 }
 
 //___________________________________________
 }
 
 //___________________________________________
@@ -836,26 +855,30 @@ void AliMUON::SetAcceptance(Bool_t acc, Float_t angmin, Float_t angmax)
 void   AliMUON::SetSegmentationModel(Int_t id, Int_t isec, AliSegmentation *segmentation)
 {
 // Set the segmentation for chamber id cathode isec
 void   AliMUON::SetSegmentationModel(Int_t id, Int_t isec, AliSegmentation *segmentation)
 {
 // Set the segmentation for chamber id cathode isec
-    ((AliMUONChamber*) (*fChambers)[id])->SetSegmentationModel(isec, segmentation);
+  //PH    ((AliMUONChamber*) (*fChambers)[id])->SetSegmentationModel(isec, segmentation);
+    ((AliMUONChamber*) fChambers->At(id))->SetSegmentationModel(isec, segmentation);
 
 }
 //___________________________________________
 void   AliMUON::SetResponseModel(Int_t id, AliMUONResponse *response)
 {
 // Set the response for chamber id
 
 }
 //___________________________________________
 void   AliMUON::SetResponseModel(Int_t id, AliMUONResponse *response)
 {
 // Set the response for chamber id
-    ((AliMUONChamber*) (*fChambers)[id])->SetResponseModel(response);
+  //PH    ((AliMUONChamber*) (*fChambers)[id])->SetResponseModel(response);
+    ((AliMUONChamber*) fChambers->At(id))->SetResponseModel(response);
 }
 
 void   AliMUON::SetReconstructionModel(Int_t id, AliMUONClusterFinderVS *reconst)
 {
 // Set ClusterFinder for chamber id
 }
 
 void   AliMUON::SetReconstructionModel(Int_t id, AliMUONClusterFinderVS *reconst)
 {
 // Set ClusterFinder for chamber id
-    ((AliMUONChamber*) (*fChambers)[id])->SetReconstructionModel(reconst);
+  //PH    ((AliMUONChamber*) (*fChambers)[id])->SetReconstructionModel(reconst);
+    ((AliMUONChamber*) fChambers->At(id))->SetReconstructionModel(reconst);
 }
 
 void   AliMUON::SetNsec(Int_t id, Int_t nsec)
 {
 // Set number of segmented cathods for chamber id
 }
 
 void   AliMUON::SetNsec(Int_t id, Int_t nsec)
 {
 // Set number of segmented cathods for chamber id
-    ((AliMUONChamber*) (*fChambers)[id])->SetNsec(nsec);
+  //PH    ((AliMUONChamber*) (*fChambers)[id])->SetNsec(nsec);
+    ((AliMUONChamber*) fChambers->At(id))->SetNsec(nsec);
 }
 
 //___________________________________________
 }
 
 //___________________________________________
@@ -902,7 +925,8 @@ void AliMUON::MakePadHits(Float_t xhit,Float_t yhit, Float_t zhit,
 //    if (idvol == 6) printf("\n ->Disintegration %f %f %f", xhit, yhit, eloss );
     
 
 //    if (idvol == 6) printf("\n ->Disintegration %f %f %f", xhit, yhit, eloss );
     
 
-    ((AliMUONChamber*) (*fChambers)[idvol])
+    //PH    ((AliMUONChamber*) (*fChambers)[idvol])
+    ((AliMUONChamber*) fChambers->At(idvol))
        ->DisIntegration(eloss, tof, xhit, yhit, zhit, nnew, newclust);
     Int_t ic=0;
 //    if (idvol == 6) printf("\n nnew  %d \n", nnew);
        ->DisIntegration(eloss, tof, xhit, yhit, zhit, nnew, newclust);
     Int_t ic=0;
 //    if (idvol == 6) printf("\n nnew  %d \n", nnew);
@@ -1006,7 +1030,8 @@ void AliMUON::FindClusters()
 //
     ResetRawClusters();        
     for (Int_t ich = 0; ich < 10; ich++) {
 //
     ResetRawClusters();        
     for (Int_t ich = 0; ich < 10; ich++) {
-       AliMUONChamber* iChamber = (AliMUONChamber*) (*fChambers)[ich];
+      //PH     AliMUONChamber* iChamber = (AliMUONChamber*) (*fChambers)[ich];
+       AliMUONChamber* iChamber = (AliMUONChamber*) fChambers->At(ich);
        AliMUONClusterFinderVS* rec = iChamber->ReconstructionModel();
     
        gAlice->ResetDigits();
        AliMUONClusterFinderVS* rec = iChamber->ReconstructionModel();
     
        gAlice->ResetDigits();
index d65ac80e013e557a69a7b11417806ef6e273d8bf..70411531d0f22ce6569c62a3247d20a242faa095 100644 (file)
@@ -14,6 +14,9 @@
  **************************************************************************/
 /*
 $Log$
  **************************************************************************/
 /*
 $Log$
+Revision 1.11  2001/07/20 10:03:14  morsch
+Changes needed to work with Root 3.01 (substitute lhs [] operator). (Jiri Chudoba)
+
 Revision 1.10  2001/03/20 13:17:30  egangler
 fChargeCorrel moved from AliMUONChamber to AliMUONResponse as decided by
 January meeting.
 Revision 1.10  2001/03/20 13:17:30  egangler
 fChargeCorrel moved from AliMUONChamber to AliMUONResponse as decided by
 January meeting.
@@ -129,12 +132,16 @@ void AliMUONChamber::Init()
 // Initalisation ..
 //
 // ... for chamber segmentation
 // Initalisation ..
 //
 // ... for chamber segmentation
-    if ((*fSegmentation)[0]) 
-    ((AliSegmentation *) (*fSegmentation)[0])->Init(fId);
+  //PH    if ((*fSegmentation)[0]) 
+  //PH    ((AliSegmentation *) (*fSegmentation)[0])->Init(fId);
+    if (fSegmentation->At(0)) 
+    ((AliSegmentation *) fSegmentation->At(0))->Init(fId);
 
     if (fnsec==2) {
 
     if (fnsec==2) {
-       if ((*fSegmentation)[1])
-       ((AliSegmentation *) (*fSegmentation)[1])->Init(fId);
+      //PH     if ((*fSegmentation)[1])
+      //PH     ((AliSegmentation *) (*fSegmentation)[1])->Init(fId);
+       if (fSegmentation->At(1))
+       ((AliSegmentation *) fSegmentation->At(1))->Init(fId);
     }
 }
 
     }
 }
 
@@ -142,12 +149,15 @@ Int_t   AliMUONChamber::SigGenCond(Float_t x, Float_t y, Float_t z)
 {
 // Ask segmentation if signal should be generated 
     if (fnsec==1) {
 {
 // Ask segmentation if signal should be generated 
     if (fnsec==1) {
-       return ((AliSegmentation*) (*fSegmentation)[0])
+      //PH     return ((AliSegmentation*) (*fSegmentation)[0])
+       return ((AliSegmentation*) fSegmentation->At(0))
            ->SigGenCond(x, y, z) ;
     } else {
            ->SigGenCond(x, y, z) ;
     } else {
-       return (((AliSegmentation*) (*fSegmentation)[0])
+      //PH     return (((AliSegmentation*) (*fSegmentation)[0])
+       return (((AliSegmentation*) fSegmentation->At(0))
                ->SigGenCond(x, y, z)) ||
                ->SigGenCond(x, y, z)) ||
-           (((AliSegmentation*) (*fSegmentation)[1])
+      //PH         (((AliSegmentation*) (*fSegmentation)[1])
+           (((AliSegmentation*) fSegmentation->At(1))
             ->SigGenCond(x, y, z)) ;
     }
 }
             ->SigGenCond(x, y, z)) ;
     }
 }
@@ -159,10 +169,13 @@ void    AliMUONChamber::SigGenInit(Float_t x, Float_t y, Float_t z)
 // Initialisation of segmentation for hit
 //  
     if (fnsec==1) {
 // Initialisation of segmentation for hit
 //  
     if (fnsec==1) {
-       ((AliSegmentation*) (*fSegmentation)[0])->SigGenInit(x, y, z) ;
+      //PH     ((AliSegmentation*) (*fSegmentation)[0])->SigGenInit(x, y, z) ;
+       ((AliSegmentation*) fSegmentation->At(0))->SigGenInit(x, y, z) ;
     } else {
     } else {
-       ((AliSegmentation*) (*fSegmentation)[0])->SigGenInit(x, y, z) ;
-       ((AliSegmentation*) (*fSegmentation)[1])->SigGenInit(x, y, z) ;
+      //PH     ((AliSegmentation*) (*fSegmentation)[0])->SigGenInit(x, y, z) ;
+      //PH     ((AliSegmentation*) (*fSegmentation)[1])->SigGenInit(x, y, z) ;
+       ((AliSegmentation*) fSegmentation->At(0))->SigGenInit(x, y, z) ;
+       ((AliSegmentation*) fSegmentation->At(1))->SigGenInit(x, y, z) ;
     }
 }
 
     }
 }
 
@@ -204,7 +217,8 @@ void AliMUONChamber::DisIntegration(Float_t eloss, Float_t tof,
        qcheck=0;
        Float_t qcath = qtot * (i==1? fCurrentCorrel : 1/fCurrentCorrel);
        AliSegmentation * segmentation=
        qcheck=0;
        Float_t qcath = qtot * (i==1? fCurrentCorrel : 1/fCurrentCorrel);
        AliSegmentation * segmentation=
-           (AliSegmentation *) (*fSegmentation)[i-1];
+      //PH         (AliSegmentation *) (*fSegmentation)[i-1];
+           (AliSegmentation *) fSegmentation->At(i-1);
        for (segmentation->FirstPad(xhit, yhit, zhit, dx, dy); 
             segmentation->MorePads(); 
             segmentation->NextPad()) 
        for (segmentation->FirstPad(xhit, yhit, zhit, dx, dy); 
             segmentation->MorePads(); 
             segmentation->NextPad()) 
index 55aea71d38d4d5f0e20bbb9ab393b1a71fdaeee1..17f522d85534a38503d2dcddd3fb2f0b88f18740 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
 
 /*
 $Log$
+Revision 1.13  2001/07/20 10:03:14  morsch
+Changes needed to work with Root 3.01 (substitute lhs [] operator). (Jiri Chudoba)
+
 Revision 1.12  2001/05/16 14:57:17  alibrary
 New files for folders and Stack
 
 Revision 1.12  2001/05/16 14:57:17  alibrary
 New files for folders and Stack
 
@@ -551,7 +554,8 @@ void  AliMUONSegmentationSlat::SetSlatXPositions(Float_t *xpos)
 }
 
 AliMUONSegmentationSlatModule*  AliMUONSegmentationSlat::Slat(Int_t index) const
 }
 
 AliMUONSegmentationSlatModule*  AliMUONSegmentationSlat::Slat(Int_t index) const
-{ return ((AliMUONSegmentationSlatModule*) (*fSlats)[index]);}
+  //PH { return ((AliMUONSegmentationSlatModule*) (*fSlats)[index]);}
+{ return ((AliMUONSegmentationSlatModule*) fSlats->At(index));}
 
 
 AliMUONSegmentationSlatModule* AliMUONSegmentationSlat::
 
 
 AliMUONSegmentationSlatModule* AliMUONSegmentationSlat::
index 2f0d7dcff8d51f84e413681745761bbc9c150a74..c22dce0fba10ee62a57c66fa11be1d58606534ff 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
 
 /*
 $Log$
+Revision 1.20  2001/07/20 10:03:14  morsch
+Changes needed to work with Root 3.01 (substitute lhs [] operator). (Jiri Chudoba)
+
 Revision 1.19  2001/05/16 14:57:17  alibrary
 New files for folders and Stack
 
 Revision 1.19  2001/05/16 14:57:17  alibrary
 New files for folders and Stack
 
@@ -670,7 +673,8 @@ void AliMUONSegmentationV01::SetCorrFunc(Int_t isec, TF1* func)
 TF1* AliMUONSegmentationV01::CorrFunc(Int_t isec) const
 { 
 // Get correction function
 TF1* AliMUONSegmentationV01::CorrFunc(Int_t isec) const
 { 
 // Get correction function
-    return (TF1*) (*fCorrA)[isec];
+  //PH    return (TF1*) (*fCorrA)[isec];
+    return (TF1*) fCorrA->At(isec);
 }
 
 AliMUONSegmentationV01& AliMUONSegmentationV01::operator 
 }
 
 AliMUONSegmentationV01& AliMUONSegmentationV01::operator 
index 995ab81378d1b4787385ac0206d614d2df7f1689..b2837aa14e1b925c8727c80e5c8dc35e20f0ede7 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
 
 /*
 $Log$
+Revision 1.13  2001/05/03 08:11:31  hristov
+stdlib.h included to define exit()
+
 Revision 1.12  2001/04/25 14:50:42  gosset
 Corrections to violations of coding conventions
 
 Revision 1.12  2001/04/25 14:50:42  gosset
 Corrections to violations of coding conventions
 
@@ -427,7 +430,8 @@ void AliMUONTrack::SetTrackParamAtHit(Int_t indexHit, AliMUONTrackParam *TrackPa
 {
   // Set track parameters at TrackHit with index "indexHit"
   // from the track parameters pointed to by "TrackParam".
 {
   // Set track parameters at TrackHit with index "indexHit"
   // from the track parameters pointed to by "TrackParam".
-  AliMUONTrackHit* trackHit = (AliMUONTrackHit*) ((*fTrackHitsPtr)[indexHit]);
+  //PH  AliMUONTrackHit* trackHit = (AliMUONTrackHit*) ((*fTrackHitsPtr)[indexHit]);
+  AliMUONTrackHit* trackHit = (AliMUONTrackHit*) (fTrackHitsPtr->At(indexHit));
   trackHit->SetTrackParam(TrackParam);
 }
 
   trackHit->SetTrackParam(TrackParam);
 }
 
index b0b6764f94b5a05ccf58a64d5ee9074306d5dff4..7850a2454d12414f8723037fb97e7697343a50e8 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
   $Log$
 
 /*
   $Log$
+  Revision 1.52  2001/05/16 14:57:20  alibrary
+  New files for folders and Stack
+
   Revision 1.51  2001/05/14 10:18:55  hristov
   Default arguments declared once
 
   Revision 1.51  2001/05/14 10:18:55  hristov
   Default arguments declared once
 
@@ -243,7 +246,8 @@ AliRICH::AliRICH(const char *name, const char *title)
     Int_t i;
    
     for (i=0; i<kNCH ;i++) {
     Int_t i;
    
     for (i=0; i<kNCH ;i++) {
-       (*fDchambers)[i] = new TClonesArray("AliRICHDigit",10000); 
+      //PH     (*fDchambers)[i] = new TClonesArray("AliRICHDigit",10000); 
+       fDchambers->AddAt(new TClonesArray("AliRICHDigit",10000), i); 
        fNdch[i]=0;
     }
 
        fNdch[i]=0;
     }
 
@@ -253,17 +257,20 @@ AliRICH::AliRICH(const char *name, const char *title)
     //printf("Created fRwClusters with adress:%p",fRawClusters);
 
     for (i=0; i<kNCH ;i++) {
     //printf("Created fRwClusters with adress:%p",fRawClusters);
 
     for (i=0; i<kNCH ;i++) {
-      (*fRawClusters)[i] = new TClonesArray("AliRICHRawCluster",10000); 
+      //PH      (*fRawClusters)[i] = new TClonesArray("AliRICHRawCluster",10000); 
+      fRawClusters->AddAt(new TClonesArray("AliRICHRawCluster",10000), i); 
       fNrawch[i]=0;
     }
 
     //fNrechits      = new Int_t[kNCH];
     
     for (i=0; i<kNCH ;i++) {
       fNrawch[i]=0;
     }
 
     //fNrechits      = new Int_t[kNCH];
     
     for (i=0; i<kNCH ;i++) {
-      (*fRecHits1D)[i] = new TClonesArray("AliRICHRecHit1D",1000);
+      //PH      (*fRecHits1D)[i] = new TClonesArray("AliRICHRecHit1D",1000);
+      fRecHits1D->AddAt(new TClonesArray("AliRICHRecHit1D",1000), i);
     }
     for (i=0; i<kNCH ;i++) {
     }
     for (i=0; i<kNCH ;i++) {
-      (*fRecHits3D)[i] = new TClonesArray("AliRICHRecHit3D",1000);     
+      //PH      (*fRecHits3D)[i] = new TClonesArray("AliRICHRecHit3D",1000);
+      fRecHits3D->AddAt(new TClonesArray("AliRICHRecHit3D",1000), i);
     }
     //printf("Created fRecHits with adress:%p",fRecHits);
 
     }
     //printf("Created fRecHits with adress:%p",fRecHits);
 
@@ -335,7 +342,8 @@ Int_t AliRICH::Hits2SDigits(Float_t xhit,Float_t yhit,Float_t eloss, Int_t idvol
     
     clhits[0]=fNhits+1;
 
     
     clhits[0]=fNhits+1;
 
-    ((AliRICHChamber*) (*fChambers)[idvol])->DisIntegration(eloss, xhit, yhit, nnew, newclust, res);
+    //PH    ((AliRICHChamber*) (*fChambers)[idvol])->DisIntegration(eloss, xhit, yhit, nnew, newclust, res);
+    ((AliRICHChamber*)fChambers->At(idvol))->DisIntegration(eloss, xhit, yhit, nnew, newclust, res);
     Int_t ic=0;
     
 //
     Int_t ic=0;
     
 //
@@ -490,7 +498,8 @@ void AliRICH::AddDigits(Int_t id, Int_t *tracks, Int_t *charges, Int_t *digits)
   //
 
   //printf("fdigits:%p, data: %d\n",((TClonesArray*)(*fDchambers)[id]),digits[0]);
   //
 
   //printf("fdigits:%p, data: %d\n",((TClonesArray*)(*fDchambers)[id]),digits[0]);
-  TClonesArray &ldigits = *((TClonesArray*)(*fDchambers)[id]);
+  //PH  TClonesArray &ldigits = *((TClonesArray*)(*fDchambers)[id]);
+  TClonesArray &ldigits = *((TClonesArray*)fDchambers->At(id));
   new(ldigits[fNdch[id]++]) AliRICHDigit(tracks,charges,digits);
 }
 
   new(ldigits[fNdch[id]++]) AliRICHDigit(tracks,charges,digits);
 }
 
@@ -501,7 +510,8 @@ void AliRICH::AddRawCluster(Int_t id, const AliRICHRawCluster& c)
     // Add a RICH digit to the list
     //
 
     // Add a RICH digit to the list
     //
 
-    TClonesArray &lrawcl = *((TClonesArray*)(*fRawClusters)[id]);
+  //PH    TClonesArray &lrawcl = *((TClonesArray*)(*fRawClusters)[id]);
+    TClonesArray &lrawcl = *((TClonesArray*)fRawClusters->At(id));
     new(lrawcl[fNrawch[id]++]) AliRICHRawCluster(c);
 }
 
     new(lrawcl[fNrawch[id]++]) AliRICHRawCluster(c);
 }
 
@@ -513,7 +523,8 @@ void AliRICH::AddRecHit1D(Int_t id, Float_t *rechit, Float_t *photons, Int_t *pa
   // Add a RICH reconstructed hit to the list
   //
 
   // Add a RICH reconstructed hit to the list
   //
 
-    TClonesArray &lrec1D = *((TClonesArray*)(*fRecHits1D)[id]);
+  //PH    TClonesArray &lrec1D = *((TClonesArray*)(*fRecHits1D)[id]);
+    TClonesArray &lrec1D = *((TClonesArray*)fRecHits1D->At(id));
     new(lrec1D[fNrechits1D[id]++]) AliRICHRecHit1D(id,rechit,photons,padsx,padsy);
 }
 
     new(lrec1D[fNrechits1D[id]++]) AliRICHRecHit1D(id,rechit,photons,padsx,padsy);
 }
 
@@ -525,7 +536,8 @@ void AliRICH::AddRecHit3D(Int_t id, Float_t *rechit)
   // Add a RICH reconstructed hit to the list
   //
 
   // Add a RICH reconstructed hit to the list
   //
 
-    TClonesArray &lrec3D = *((TClonesArray*)(*fRecHits3D)[id]);
+  //PH    TClonesArray &lrec3D = *((TClonesArray*)(*fRecHits3D)[id]);
+    TClonesArray &lrec3D = *((TClonesArray*)fRecHits3D->At(id));
     new(lrec3D[fNrechits3D[id]++]) AliRICHRecHit3D(id,rechit);
 }
 
     new(lrec3D[fNrechits3D[id]++]) AliRICHRecHit3D(id,rechit);
 }
 
@@ -2017,7 +2029,8 @@ void AliRICH::ResetDigits()
   // Reset number of digits and the digits array for this detector
   //
     for ( int i=0;i<kNCH;i++ ) {
   // Reset number of digits and the digits array for this detector
   //
     for ( int i=0;i<kNCH;i++ ) {
-       if (fDchambers && (*fDchambers)[i])   (*fDchambers)[i]->Clear();
+      //PH     if (fDchambers && (*fDchambers)[i])   (*fDchambers)[i]->Clear();
+       if (fDchambers && fDchambers->At(i))   fDchambers->At(i)->Clear();
        if (fNdch)  fNdch[i]=0;
     }
 }
        if (fNdch)  fNdch[i]=0;
     }
 }
@@ -2029,7 +2042,8 @@ void AliRICH::ResetRawClusters()
   // Reset number of raw clusters and the raw clust array for this detector
   //
     for ( int i=0;i<kNCH;i++ ) {
   // Reset number of raw clusters and the raw clust array for this detector
   //
     for ( int i=0;i<kNCH;i++ ) {
-       if ((*fRawClusters)[i])    ((TClonesArray*)(*fRawClusters)[i])->Clear();
+      //PH     if ((*fRawClusters)[i])    ((TClonesArray*)(*fRawClusters)[i])->Clear();
+       if (fRawClusters->At(i))    ((TClonesArray*)fRawClusters->At(i))->Clear();
        if (fNrawch)  fNrawch[i]=0;
     }
 }
        if (fNrawch)  fNrawch[i]=0;
     }
 }
@@ -2042,7 +2056,8 @@ void AliRICH::ResetRecHits1D()
   //
   
   for ( int i=0;i<kNCH;i++ ) {
   //
   
   for ( int i=0;i<kNCH;i++ ) {
-       if ((*fRecHits1D)[i])    ((TClonesArray*)(*fRecHits1D)[i])->Clear();
+    //PH       if ((*fRecHits1D)[i])    ((TClonesArray*)(*fRecHits1D)[i])->Clear();
+       if (fRecHits1D->At(i))    ((TClonesArray*)fRecHits1D->At(i))->Clear();
        if (fNrechits1D)  fNrechits1D[i]=0;
     }
 }
        if (fNrechits1D)  fNrechits1D[i]=0;
     }
 }
@@ -2055,7 +2070,8 @@ void AliRICH::ResetRecHits3D()
   //
   
   for ( int i=0;i<kNCH;i++ ) {
   //
   
   for ( int i=0;i<kNCH;i++ ) {
-       if ((*fRecHits3D)[i])    ((TClonesArray*)(*fRecHits3D)[i])->Clear();
+    //PH       if ((*fRecHits3D)[i])    ((TClonesArray*)(*fRecHits3D)[i])->Clear();
+       if (fRecHits3D->At(i))    ((TClonesArray*)fRecHits3D->At(i))->Clear();
        if (fNrechits3D)  fNrechits3D[i]=0;
     }
 }
        if (fNrechits3D)  fNrechits3D[i]=0;
     }
 }
@@ -2069,7 +2085,8 @@ void   AliRICH::SetGeometryModel(Int_t id, AliRICHGeometry *geometry)
 //
 
 
 //
 
 
-    ((AliRICHChamber*) (*fChambers)[id])->GeometryModel(geometry);
+  //PH    ((AliRICHChamber*) (*fChambers)[id])->GeometryModel(geometry);
+    ((AliRICHChamber*)fChambers->At(id))->GeometryModel(geometry);
 }
 
 //___________________________________________
 }
 
 //___________________________________________
@@ -2080,7 +2097,8 @@ void   AliRICH::SetSegmentationModel(Int_t id, AliSegmentation *segmentation)
 // Setter for the RICH segmentation model
 //
 
 // Setter for the RICH segmentation model
 //
 
-    ((AliRICHChamber*) (*fChambers)[id])->SetSegmentationModel(segmentation);
+  //PH    ((AliRICHChamber*) (*fChambers)[id])->SetSegmentationModel(segmentation);
+    ((AliRICHChamber*)fChambers->At(id))->SetSegmentationModel(segmentation);
 }
 
 //___________________________________________
 }
 
 //___________________________________________
@@ -2091,7 +2109,8 @@ void   AliRICH::SetResponseModel(Int_t id, AliRICHResponse *response)
 // Setter for the RICH response model
 //
 
 // Setter for the RICH response model
 //
 
-    ((AliRICHChamber*) (*fChambers)[id])->ResponseModel(response);
+  //PH    ((AliRICHChamber*) (*fChambers)[id])->ResponseModel(response);
+    ((AliRICHChamber*)fChambers->At(id))->ResponseModel(response);
 }
 
 void   AliRICH::SetReconstructionModel(Int_t id, AliRICHClusterFinder *reconst)
 }
 
 void   AliRICH::SetReconstructionModel(Int_t id, AliRICHClusterFinder *reconst)
@@ -2101,7 +2120,8 @@ void   AliRICH::SetReconstructionModel(Int_t id, AliRICHClusterFinder *reconst)
 // Setter for the RICH reconstruction model (clusters)
 //
 
 // Setter for the RICH reconstruction model (clusters)
 //
 
-    ((AliRICHChamber*) (*fChambers)[id])->SetReconstructionModel(reconst);
+  //PH    ((AliRICHChamber*) (*fChambers)[id])->SetReconstructionModel(reconst);
+    ((AliRICHChamber*)fChambers->At(id))->SetReconstructionModel(reconst);
 }
 
 //___________________________________________
 }
 
 //___________________________________________
@@ -2370,7 +2390,8 @@ void AliRICH::StepManager()
                  printf("Feedbacks:%d\n",fFeedbacks);
                }*/     
                
                  printf("Feedbacks:%d\n",fFeedbacks);
                }*/     
                
-               ((AliRICHChamber*) (*fChambers)[idvol])
+        //PH           ((AliRICHChamber*) (*fChambers)[idvol])
+               ((AliRICHChamber*)fChambers->At(idvol))
                    ->SigGenInit(localPos[0], localPos[2], localPos[1]);
                if(idvol<kNCH) {        
                    ckovData[0] = gMC->TrackPid();        // particle type
                    ->SigGenInit(localPos[0], localPos[2], localPos[1]);
                if(idvol<kNCH) {        
                    ckovData[0] = gMC->TrackPid();        // particle type
@@ -2538,7 +2559,8 @@ void AliRICH::StepManager()
                if(idvol<kNCH) {
                    //
                    //  Initialize hit position (cursor) in the segmentation model 
                if(idvol<kNCH) {
                    //
                    //  Initialize hit position (cursor) in the segmentation model 
-                   ((AliRICHChamber*) (*fChambers)[idvol])
+          //PH             ((AliRICHChamber*) (*fChambers)[idvol])
+                   ((AliRICHChamber*)fChambers->At(idvol))
                        ->SigGenInit(localPos[0], localPos[2], localPos[1]);
                }
            }
                        ->SigGenInit(localPos[0], localPos[2], localPos[1]);
                }
            }
@@ -2580,10 +2602,12 @@ void AliRICH::StepManager()
                // defined by the segmentation
                // model (boundary crossing conditions) 
            } else if 
                // defined by the segmentation
                // model (boundary crossing conditions) 
            } else if 
-               (((AliRICHChamber*) (*fChambers)[idvol])
+          //PH         (((AliRICHChamber*) (*fChambers)[idvol])
+               (((AliRICHChamber*)fChambers->At(idvol))
                 ->SigGenCond(localPos[0], localPos[2], localPos[1]))
            {
                 ->SigGenCond(localPos[0], localPos[2], localPos[1]))
            {
-               ((AliRICHChamber*) (*fChambers)[idvol])
+          //PH         ((AliRICHChamber*) (*fChambers)[idvol])
+               ((AliRICHChamber*)fChambers->At(idvol))
                    ->SigGenInit(localPos[0], localPos[2], localPos[1]);
                if (eloss > 0) 
                  {
                    ->SigGenInit(localPos[0], localPos[2], localPos[1]);
                if (eloss > 0) 
                  {
@@ -2619,7 +2643,8 @@ void AliRICH::FindClusters(Int_t nev,Int_t lastEntry)
        gAlice->ResetDigits();
        gAlice->TreeD()->GetEvent(0);
        for (Int_t ich=0;ich<kNCH;ich++) {
        gAlice->ResetDigits();
        gAlice->TreeD()->GetEvent(0);
        for (Int_t ich=0;ich<kNCH;ich++) {
-         AliRICHChamber* iChamber=(AliRICHChamber*) (*fChambers)[ich];
+      //PH       AliRICHChamber* iChamber=(AliRICHChamber*) (*fChambers)[ich];
+         AliRICHChamber* iChamber=(AliRICHChamber*)fChambers->At(ich);
          TClonesArray *pRICHdigits  = this->DigitsAddress(ich);
          if (pRICHdigits == 0)       
              continue;
          TClonesArray *pRICHdigits  = this->DigitsAddress(ich);
          if (pRICHdigits == 0)       
              continue;
index cde4a8163b1266292dc05bd9966a44a26bb9b7b1..f79d2ae1b42bd07ba9ed8d8a642abff54f24da17 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
   $Log$
 
 /*
   $Log$
+  Revision 1.2  2000/10/02 15:53:28  jbarbosa
+  Fixed memory leak (delete fTrackList).
+
   Revision 1.1  2000/06/12 15:35:17  jbarbosa
   Cleaned up version.
 
   Revision 1.1  2000/06/12 15:35:17  jbarbosa
   Cleaned up version.
 
@@ -42,5 +45,8 @@ AliRICHTransientDigit::AliRICHTransientDigit(Int_t ich, Int_t *digits):
 
 AliRICHTransientDigit::~AliRICHTransientDigit()
 {
 
 AliRICHTransientDigit::~AliRICHTransientDigit()
 {
-  delete fTrackList;
+  if (fTrackList) {
+    fTrackList->Delete();
+    delete fTrackList;
+  }
 }
 }
index 4fbe63fe3751e09ae69a514387aecb068756409f..29f9293ffd30b02d5aeb9346e717103163cff4e2 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
   $Log$
 
 /*
   $Log$
+  Revision 1.22  2001/05/16 14:57:20  alibrary
+  New files for folders and Stack
+
   Revision 1.21  2001/05/10 12:28:15  jbarbosa
   Repositioned the RICH modules.
 
   Revision 1.21  2001/05/10 12:28:15  jbarbosa
   Repositioned the RICH modules.
 
@@ -159,7 +162,8 @@ AliRICHv0::AliRICHv0(const char *name, const char *title)
     fChambers = new TObjArray(kNCH);
     for (i=0; i<kNCH; i++) {
       
     fChambers = new TObjArray(kNCH);
     for (i=0; i<kNCH; i++) {
       
-      (*fChambers)[i] = new AliRICHChamber();  
+      //PH      (*fChambers)[i] = new AliRICHChamber();  
+      fChambers->AddAt(new AliRICHChamber(), i);  
       
     }
   
       
     }
   
@@ -196,19 +200,28 @@ void AliRICHv0::Init()
     //
     for (Int_t i=0; i<kNCH; i++) {
        //printf ("i:%d",i);
     //
     for (Int_t i=0; i<kNCH; i++) {
        //printf ("i:%d",i);
-       ( (AliRICHChamber*) (*fChambers)[i])->Init(i);  
+      //PH     ( (AliRICHChamber*) (*fChambers)[i])->Init(i);  
+       ( (AliRICHChamber*) fChambers->At(i))->Init(i);  
     }  
     
     //
     // Set the chamber (sensitive region) GEANT identifier
     
     }  
     
     //
     // Set the chamber (sensitive region) GEANT identifier
     
-    ((AliRICHChamber*)(*fChambers)[0])->SetGid(1);  
-    ((AliRICHChamber*)(*fChambers)[1])->SetGid(2);  
-    ((AliRICHChamber*)(*fChambers)[2])->SetGid(3);  
-    ((AliRICHChamber*)(*fChambers)[3])->SetGid(4);  
-    ((AliRICHChamber*)(*fChambers)[4])->SetGid(5);  
-    ((AliRICHChamber*)(*fChambers)[5])->SetGid(6);  
-    ((AliRICHChamber*)(*fChambers)[6])->SetGid(7); 
+    //PH    ((AliRICHChamber*)(*fChambers)[0])->SetGid(1);  
+    //PH    ((AliRICHChamber*)(*fChambers)[1])->SetGid(2);  
+    //PH    ((AliRICHChamber*)(*fChambers)[2])->SetGid(3);  
+    //PH    ((AliRICHChamber*)(*fChambers)[3])->SetGid(4);  
+    //PH    ((AliRICHChamber*)(*fChambers)[4])->SetGid(5);  
+    //PH    ((AliRICHChamber*)(*fChambers)[5])->SetGid(6);  
+    //PH    ((AliRICHChamber*)(*fChambers)[6])->SetGid(7); 
+
+    ((AliRICHChamber*)fChambers->At(0))->SetGid(1);  
+    ((AliRICHChamber*)fChambers->At(1))->SetGid(2);  
+    ((AliRICHChamber*)fChambers->At(2))->SetGid(3);  
+    ((AliRICHChamber*)fChambers->At(3))->SetGid(4);  
+    ((AliRICHChamber*)fChambers->At(4))->SetGid(5);  
+    ((AliRICHChamber*)fChambers->At(5))->SetGid(6);  
+    ((AliRICHChamber*)fChambers->At(6))->SetGid(7);  
 
     segmentation=Chamber(0).GetSegmentationModel(0);
     geometry=Chamber(0).GetGeometryModel();
 
     segmentation=Chamber(0).GetSegmentationModel(0);
     geometry=Chamber(0).GetGeometryModel();
index 11c968fd79cd654a88041ea9980397884f36e1a9..3e050a16e188755301347dbbf732bf6d12da4c47 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
   $Log$
 
 /*
   $Log$
+  Revision 1.14  2001/05/16 14:57:20  alibrary
+  New files for folders and Stack
+
   Revision 1.13  2001/05/10 12:28:04  jbarbosa
   Repositioned the RICH modules.
 
   Revision 1.13  2001/05/10 12:28:04  jbarbosa
   Repositioned the RICH modules.
 
@@ -167,7 +170,8 @@ AliRICHv1::AliRICHv1(const char *name, const char *title)
     fChambers = new TObjArray(kNCH);
     for (i=0; i<kNCH; i++) {
       
     fChambers = new TObjArray(kNCH);
     for (i=0; i<kNCH; i++) {
       
-      (*fChambers)[i] = new AliRICHChamber();  
+      //PH      (*fChambers)[i] = new AliRICHChamber();  
+      fChambers->AddAt(new AliRICHChamber(), i);  
       
     }
   
       
     }
   
@@ -202,19 +206,29 @@ void AliRICHv1::Init()
     //
     for (Int_t i=0; i<kNCH; i++) {
        //printf ("i:%d",i);
     //
     for (Int_t i=0; i<kNCH; i++) {
        //printf ("i:%d",i);
-       ( (AliRICHChamber*) (*fChambers)[i])->Init(i);  
+      //PH     ( (AliRICHChamber*) (*fChambers)[i])->Init(i);  
+       ( (AliRICHChamber*)fChambers->At(i))->Init(i);  
     }  
     
     //
     // Set the chamber (sensitive region) GEANT identifier
     
     }  
     
     //
     // Set the chamber (sensitive region) GEANT identifier
     
-    ((AliRICHChamber*)(*fChambers)[0])->SetGid(1);  
-    ((AliRICHChamber*)(*fChambers)[1])->SetGid(2);  
-    ((AliRICHChamber*)(*fChambers)[2])->SetGid(3);  
-    ((AliRICHChamber*)(*fChambers)[3])->SetGid(4);  
-    ((AliRICHChamber*)(*fChambers)[4])->SetGid(5);  
-    ((AliRICHChamber*)(*fChambers)[5])->SetGid(6);  
-    ((AliRICHChamber*)(*fChambers)[6])->SetGid(7); 
+    //PH    ((AliRICHChamber*)(*fChambers)[0])->SetGid(1);  
+    //PH    ((AliRICHChamber*)(*fChambers)[1])->SetGid(2);  
+    //PH    ((AliRICHChamber*)(*fChambers)[2])->SetGid(3);  
+    //PH    ((AliRICHChamber*)(*fChambers)[3])->SetGid(4);  
+    //PH    ((AliRICHChamber*)(*fChambers)[4])->SetGid(5);  
+    //PH    ((AliRICHChamber*)(*fChambers)[5])->SetGid(6);  
+    //PH    ((AliRICHChamber*)(*fChambers)[6])->SetGid(7); 
+
+    ((AliRICHChamber*)fChambers->At(0))->SetGid(1);  
+    ((AliRICHChamber*)fChambers->At(1))->SetGid(2);  
+    ((AliRICHChamber*)fChambers->At(2))->SetGid(3);  
+    ((AliRICHChamber*)fChambers->At(3))->SetGid(4);  
+    ((AliRICHChamber*)fChambers->At(4))->SetGid(5);  
+    ((AliRICHChamber*)fChambers->At(5))->SetGid(6);  
+    ((AliRICHChamber*)fChambers->At(6))->SetGid(7);  
+
 
     segmentation=Chamber(0).GetSegmentationModel(0);
     geometry=Chamber(0).GetGeometryModel();
 
     segmentation=Chamber(0).GetSegmentationModel(0);
     geometry=Chamber(0).GetGeometryModel();
index 8eaf88a00d3139085f1123e1677f5ace8ec5943d..7cd9968f784a4b641d527a75f2bbb06b7b03b9a5 100644 (file)
@@ -11,7 +11,7 @@
 //  Manager and hits classes for set: RICH full version  //
 ///////////////////////////////////////////////////////////
 
 //  Manager and hits classes for set: RICH full version  //
 ///////////////////////////////////////////////////////////
 
-#include "AliRICHv0.h"
+#include "AliRICH.h"
 
 class AliRICHv1 : public AliRICH {
     
 
 class AliRICHv1 : public AliRICH {