Effective C++ changes
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 10 Oct 2006 15:52:55 +0000 (15:52 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 10 Oct 2006 15:52:55 +0000 (15:52 +0000)
ANALYSIS/AliAODPair.cxx
ANALYSIS/AliAODPairBaseCut.h
ANALYSIS/AliAODPairCut.cxx
ANALYSIS/AliAODParticleBaseCut.h
ANALYSIS/AliAODParticleCut.cxx
ANALYSIS/AliAODRun.cxx
ANALYSIS/AliEventBaseCut.h
ANALYSIS/AliRunAnalysis.h
ANALYSIS/AliTrackPoints.h
ANALYSIS/TGliteXmlEventlist.cxx
ANALYSIS/TGliteXmlEventlist.h

index 7771e34..a6ed0fa 100644 (file)
@@ -89,6 +89,8 @@ AliAODPair::AliAODPair(AliVAODParticle* part1, AliVAODParticle* part2, Bool_t re
  fQLongLCMSNotCalc(kTRUE),
  fQtLCMS(0.0),
  fQtLCMSNotCalc(kTRUE),
+ fQt(0.0),
+ fQtNotCalc(kTRUE),
  fQInv(0.0),
  fQInvNotCalc(kTRUE),
  fInvMass(0.0),
@@ -148,6 +150,8 @@ AliAODPair::AliAODPair(const AliAODPair& in):
  fQLongLCMSNotCalc(kTRUE),
  fQtLCMS(0.0),
  fQtLCMSNotCalc(kTRUE),
+ fQt(0.0),
+ fQtNotCalc(kTRUE),
  fQInv(0.0),
  fQInvNotCalc(kTRUE),
  fInvMass(0.0),
index 4953c96..262604b 100644 (file)
@@ -379,6 +379,8 @@ class AliAODLogicalOperPairCut:  public AliAODPairBaseCut
      AliAODPairBaseCut* fFirst;   //second cut
      AliAODPairBaseCut* fSecond;  //first cut
    private:
+     AliAODLogicalOperPairCut(const AliAODLogicalOperPairCut & src);
+     AliAODLogicalOperPairCut & operator=(const AliAODLogicalOperPairCut & src);
     class  AliAODDummyBasePairCut: public AliAODPairBaseCut
      {
        Double_t  GetValue(AliAODPair* /*pair*/) const {return 0.0;}
index 08aa0e6..258cf9c 100644 (file)
@@ -19,13 +19,13 @@ const Int_t AliAODPairCut::fgkMaxCuts = 50;
 /**********************************************************/
 
 AliAODPairCut::AliAODPairCut():
+  fFirstPartCut(new AliAODParticleEmptyCut()), //empty cuts
+  fSecondPartCut(new AliAODParticleEmptyCut()), //empty cuts
+  fCuts(new AliAODPairBaseCut*[fgkMaxCuts]),
   fNCuts(0)
 {
   //constructor
-  fFirstPartCut = new AliAODParticleEmptyCut(); //empty cuts
-  fSecondPartCut= new AliAODParticleEmptyCut(); //empty cuts
     
-  fCuts = new AliAODPairBaseCut*[fgkMaxCuts];
   for (Int_t i = 0;i<fNCuts;i++)
    {
      fCuts[i] = 0x0;
@@ -34,14 +34,14 @@ AliAODPairCut::AliAODPairCut():
 /**********************************************************/
 
 AliAODPairCut::AliAODPairCut(const AliAODPairCut& in):
- TNamed(in)
+  TNamed(in),
+  fFirstPartCut((AliAODParticleCut*)in.fFirstPartCut->Clone()),
+  fSecondPartCut((AliAODParticleCut*)in.fSecondPartCut->Clone()),
+  fCuts(new AliAODPairBaseCut*[fgkMaxCuts]),
+  fNCuts(in.fNCuts)
 {
   //copy constructor
-  fCuts = new AliAODPairBaseCut*[fgkMaxCuts];
-  fNCuts = in.fNCuts;
 
-  fFirstPartCut = (AliAODParticleCut*)in.fFirstPartCut->Clone();
-  fSecondPartCut = (AliAODParticleCut*)in.fSecondPartCut->Clone();
  
   for (Int_t i = 0;i<fNCuts;i++)
     {
index 549846d..22e7bce 100644 (file)
@@ -277,6 +277,8 @@ class AliAODLogicalOperCut:  public AliAODParticleBaseCut
      AliAODParticleBaseCut* fFirst;   //second cut
      AliAODParticleBaseCut* fSecond;  //first cut
    private:  
+     AliAODLogicalOperCut(const AliAODLogicalOperCut & src);
+     AliAODLogicalOperCut & operator=(const AliAODLogicalOperCut & src);
     class  AliAODDummyBaseCut: public AliAODParticleBaseCut 
      {
        Double_t  GetValue(AliVAODParticle * /*part*/) const {return 0.0;}
index deef58d..7fbba49 100644 (file)
@@ -49,13 +49,13 @@ AliAODParticleCut::AliAODParticleCut():
 /******************************************************************/
 
 AliAODParticleCut::AliAODParticleCut(const AliAODParticleCut& in):
- TObject(in)
+  TObject(in),
+  fCuts(new AliAODParticleBaseCut* [fgkMaxCuts]),//last property in the property
+                                                 //property enum => defines number of properties
+  fNCuts(in.fNCuts),
+  fPID(in.fPID)
 {
   //cpy ctor
-  fCuts = new AliAODParticleBaseCut* [fgkMaxCuts];//last property in the property
-                                         //property enum => defines number of properties
-  fNCuts = in.fNCuts;
-  fPID  = in.fPID;
   for (Int_t i = 0;i<fNCuts;i++)
    {
      fCuts[i] = (AliAODParticleBaseCut*)in.fCuts[i]->Clone();//create new object (clone) and rember pointer to it
index 69b205b..d13eb2a 100644 (file)
 ClassImp(AliAODRun)
 /**************************************************************************/ 
 
-AliAODRun::AliAODRun()
+AliAODRun::AliAODRun():
+  fEvents(new TObjArray())
 { 
  //contructor
-  fEvents = new TObjArray();//create array for AliAODs
   if(!fEvents) Fatal("AliAODRun::AliAODRun","Can not allocate memory");
   fEvents->SetOwner(); //array is an owner: when is deleted or cleared it deletes objects that it contains
 }
index 2faed28..03c0e2b 100644 (file)
@@ -92,7 +92,7 @@ class AliPrimVertexZCut: public AliEventBaseCut
 class AliNChargedCut: public AliEventBaseCut
 {
  public: 
-   AliNChargedCut():AliEventBaseCut(0,0,kNChargedCut){}
+   AliNChargedCut():AliEventBaseCut(0,0,kNChargedCut),fEtaMin(-10.0),fEtaMax(10.0){}
    AliNChargedCut(Int_t min, Int_t max, Double_t etamin = -10.0, Double_t etamax = 10.0):
        AliEventBaseCut(min,max,kNChargedCut),fEtaMin(etamin),fEtaMax(etamax){}
    virtual ~AliNChargedCut(){}
index 6ec41a2..d241921 100644 (file)
@@ -46,6 +46,9 @@ class AliRunAnalysis: public TTask
     Bool_t        Rejected(AliAOD* recevent, AliAOD* simevent);
     
   private:
+    AliRunAnalysis(const AliRunAnalysis & src);
+    AliRunAnalysis & operator=(const AliRunAnalysis & src);
+
     void SetName(const char *){}//change SetName to be private
     
     ClassDef(AliRunAnalysis,1)
index 36a19f9..95a903d 100644 (file)
@@ -32,10 +32,8 @@ class AliTrackPoints: public TObject
     AliTrackPoints(AliTrackPoints::ETypes type, AliESDtrack* track, Float_t mf);
     AliTrackPoints(Int_t n, AliESDtrack* track, Float_t mf, Float_t dr=30,Float_t r0 = 84.1); //min TPC R  = 84.1; max TPC R =  246.6cm, 
     AliTrackPoints(Int_t n, AliTPCtrack* track, Float_t dr=30, Float_t r0 = 84.1); //min TPC R  = 84.1; max TPC R =  246.6cm, 
-//    AliTrackPoints(const AliTrackPoints& in);
     
     virtual ~AliTrackPoints();
-//    AliTrackPoints& operator=(const AliTrackPoints& in);
     
     Double_t AvarageDistance(const AliTrackPoints& tr);
     void PositionAt(Int_t n, Float_t &x, Float_t &y, Float_t &z);
@@ -54,6 +52,9 @@ class AliTrackPoints: public TObject
     void MakeITSPointsInnerFromVertexOuterFromTPC(AliESDtrack* track,Float_t mf);
     
   private:
+    AliTrackPoints(const AliTrackPoints& in);
+    AliTrackPoints& operator=(const AliTrackPoints& in);
+
     Int_t    fN;//number of points
     Float_t* fX;//[fN]positions at x
     Float_t* fY;//[fN]positions at y
index 57ae2da..28f9ef0 100644 (file)
 ClassImp(TGliteXmlEventlist)
 
 
-TGliteXmlEventlist::TGliteXmlEventlist(const char* localfilename) {
+TGliteXmlEventlist::TGliteXmlEventlist(const char* localfilename):
+  TObject(),
+  fXmlFile(localfilename),
+  fEventList(new TList()),
+  fEventListIter(new TIter(fEventList)),
+  fCurrent(0)
+{
 //Andi - please put a comment
-  fXmlFile = localfilename;
-  fEventList = new TList();
   fEventList->SetOwner(kTRUE);
-  fEventListIter = new TIter(fEventList);
-  fCurrent = 0;
   ReadXML();
 }
 
index c49bd97..2fc19af 100644 (file)
@@ -33,6 +33,9 @@ public:
   const char* GetURL(const char* name) const ;
   void        Print(Option_t* opt) const;
 private:
+  TGliteXmlEventlist(const TGliteXmlEventlist & src);
+  TGliteXmlEventlist & operator=(const TGliteXmlEventlist & src);
+
   TString     fXmlFile;//Andi - please put a comment
   TList*      fEventList;//Andi - please put a comment
   TIter*      fEventListIter;//Andi - please put a comment