]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
changes to be compliant with Eff C++ rules
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 27 Oct 2006 08:18:41 +0000 (08:18 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 27 Oct 2006 08:18:41 +0000 (08:18 +0000)
ITS/AliITSBeamTestDig.cxx
ITS/AliITSBeamTestDigSDD.cxx
ITS/AliITSBeamTestDigSPD.cxx
ITS/AliITSBeamTestDigSSD.cxx
ITS/AliITSRawClusterSDD.cxx
ITS/AliITSRawClusterSPD.cxx
ITS/AliITSRawClusterSSD.cxx

index 4cd85f02e0601b24ee5c6a9daf4f532df5654008..bba8d75486ddfec9fdf29bd36f7b9f911ac58563 100644 (file)
@@ -12,48 +12,45 @@ ClassImp(AliITSBeamTestDig)
 
 
 //_____________________________________________________________
-  AliITSBeamTestDig::AliITSBeamTestDig(): TTask()
+  AliITSBeamTestDig::AliITSBeamTestDig(): TTask(),
+fITSHeader(0),
+fReader(0),
+fTreeD(0),
+fITSgeom(0)
 {
   //
   // Default constructor
   //
-  fReader=0;
-  fTreeD=0;
-  fITSHeader=0;
-  fITSgeom=0;
 }
 
 //_____________________________________________________________
-  AliITSBeamTestDig::AliITSBeamTestDig(const Text_t* name, const Text_t* title): TTask(name,title)
+AliITSBeamTestDig::AliITSBeamTestDig(const Text_t* name, const Text_t* title): TTask(name,title),
+fITSHeader(0),
+fReader(0),
+fTreeD(0),
+fITSgeom(0)
 {
   //
   // Standard constructor
   //
 
-  fReader=0;
-  fTreeD=0;
-  fITSHeader=0;
-  fITSgeom = 0;
 }
 
 //______________________________________________________________________
-AliITSBeamTestDig::AliITSBeamTestDig(const AliITSBeamTestDig &bt):TTask(bt){
+AliITSBeamTestDig::AliITSBeamTestDig(const AliITSBeamTestDig &bt):TTask(bt),
+fITSHeader(bt.fITSHeader),
+fReader(bt.fReader),
+fTreeD(bt.fTreeD),
+fITSgeom(bt.fITSgeom){
     // Copy constructor. 
 
-  fReader=bt.fReader;
-  fTreeD=bt.fTreeD;
-  fITSHeader=bt.fITSHeader;
-  fITSgeom = bt.fITSgeom;
 }
 //______________________________________________________________________
 AliITSBeamTestDig& AliITSBeamTestDig::operator=(const AliITSBeamTestDig &source){
-    // Assignment operator. This is a function which is not allowed to be
-    // done to the ITS beam test dig. It exits with an error.
-    // Inputs:
-    if(this==&source) return *this;
-    Error("operator=","You are not allowed to make a copy of the AliITSBeamTestDig");
-    exit(1);
-    return *this; //fake return
+    // Assignment operator
+  this->~AliITSBeamTestDig();
+  new(this) AliITSBeamTestDig(source);
+  return *this;
 }
 
 
index 4bd8c180b7a1601d6f5b6f64e4d72788a84d2653..2e41b18ac52a6b399586e1ef93d2eb9f42004f78 100644 (file)
 ClassImp(AliITSBeamTestDigSDD)
 
 //_____________________________________________________________
-  AliITSBeamTestDigSDD::AliITSBeamTestDigSDD(): AliITSBeamTestDig()
-{
+  AliITSBeamTestDigSDD::AliITSBeamTestDigSDD(): AliITSBeamTestDig(),
+fSDDEvType(0),
+fSubEventAttributes(0),
+fBtPer(),
+fThreshold(0),
+fStreamer(0){
   //
   // Constructor
   //
   SetBtPeriod();
-  fSubEventAttributes=0;
-  fThreshold=0;
-  fStreamer=0;
 }
 
 //_____________________________________________________________
-AliITSBeamTestDigSDD::AliITSBeamTestDigSDD(const Text_t* name, const Text_t* title): AliITSBeamTestDig(name,title)
+AliITSBeamTestDigSDD::AliITSBeamTestDigSDD(const Text_t* name, const Text_t* title): AliITSBeamTestDig(name,title),
+fSDDEvType(0),
+fSubEventAttributes(0),
+fBtPer(),
+fThreshold(0),
+fStreamer(0)
 {
   //
   // Constructor
   //
   SetBtPeriod();
-  fSubEventAttributes=0;
-  fThreshold=0;
-  fStreamer=0;
 }
 
 //__________________________________________________________________
@@ -184,24 +187,21 @@ Int_t AliITSBeamTestDigSDD::GetEventType(){
 }
 
 //______________________________________________________________________
-AliITSBeamTestDigSDD::AliITSBeamTestDigSDD(const AliITSBeamTestDigSDD &bt):AliITSBeamTestDig(bt){
+AliITSBeamTestDigSDD::AliITSBeamTestDigSDD(const AliITSBeamTestDigSDD &bt):AliITSBeamTestDig(bt),
+fSDDEvType(bt.fSDDEvType),
+fSubEventAttributes(bt.fSubEventAttributes),
+fBtPer(bt.fBtPer),
+fThreshold(bt.fThreshold),
+fStreamer(bt.fStreamer){
     // Copy constructor. 
 
-  fSDDEvType = bt.fSDDEvType;
-  fSubEventAttributes = bt.fSubEventAttributes;
-  fBtPer = bt.fBtPer;
-  fThreshold = bt.fThreshold;
-  fStreamer = bt.fStreamer;
 }
 //______________________________________________________________________
 AliITSBeamTestDigSDD& AliITSBeamTestDigSDD::operator=(const AliITSBeamTestDigSDD &source){
-    // Assignment operator. This is a function which is not allowed to be
-    // done to the ITS beam test dig. It exits with an error.
-    // Inputs:
-    if(this==&source) return *this;
-    Error("operator=","You are not allowed to make a copy of the AliITSBeamTestDig");
-    exit(1);
-    return *this; //fake return
+    // Assignment operator. 
+  this->~AliITSBeamTestDigSDD();
+  new(this) AliITSBeamTestDigSDD(source);
+  return *this;
 }
 
 
index d0da3f9a4722b8ceac1b88c5962152fc3828889f..e303073938692871f48da26755b3c72200a619bc 100644 (file)
@@ -21,23 +21,19 @@ ClassImp(AliITSBeamTestDigSPD)
 
 
 //_____________________________________________________________
-  AliITSBeamTestDigSPD::AliITSBeamTestDigSPD(): AliITSBeamTestDig()
-{
+  AliITSBeamTestDigSPD::AliITSBeamTestDigSPD(): AliITSBeamTestDig(),
+fFlagHeader(0){
   //
   // Constructor
   //
-
-  
 }
 
 //_____________________________________________________________
-  AliITSBeamTestDigSPD::AliITSBeamTestDigSPD(const Text_t* name, const Text_t* title): AliITSBeamTestDig(name,title)
-{
+AliITSBeamTestDigSPD::AliITSBeamTestDigSPD(const Text_t* name, const Text_t* title): AliITSBeamTestDig(name,title),
+fFlagHeader(0){
   //
   // Constructor
   //
-
 }
 
 //__________________________________________________________________
index b2fcd87a6ae934851dec9494cdbd57c07059db02..9c347534fcca056e121792df24b7e0b018785a73 100644 (file)
 ClassImp(AliITSBeamTestDigSSD)
 
 //_____________________________________________________________
-AliITSBeamTestDigSSD::AliITSBeamTestDigSSD(): AliITSBeamTestDig() {
+AliITSBeamTestDigSSD::AliITSBeamTestDigSSD(): AliITSBeamTestDig(),
+fFlagHeader(0) 
+{
   //
   // Constructor
   //  
 }
 
 //_____________________________________________________________
-AliITSBeamTestDigSSD::AliITSBeamTestDigSSD(const Text_t* name, const Text_t* title): AliITSBeamTestDig(name,title) {
+AliITSBeamTestDigSSD::AliITSBeamTestDigSSD(const Text_t* name, const Text_t* title): AliITSBeamTestDig(name,title),
+fFlagHeader(0){
   //
   // Constructor
   //
index 61b518e58860333e1bc531a99d028bd13090bdc1..294f1c83a93929856f4776bb90fbfa31a5560174 100644 (file)
 
 ClassImp(AliITSRawClusterSDD)
 //______________________________________________________________________
-AliITSRawClusterSDD::AliITSRawClusterSDD(){
+AliITSRawClusterSDD::AliITSRawClusterSDD():
+fX(0),
+fZ(0),
+fQ(0),
+fWing(0),
+fAnode(0),
+fTime(0),
+fAsigma(0),
+fTsigma(0),
+fPeakAmplitude(0),
+fSumAmplitude(0),
+fPeakPosition(-1),
+fNanodes(1),
+fTstart(0),
+fTstop(0),
+fTstartf(0),
+fTstopf(0),
+fAstart(0),
+fAstop(0)
+{
        // default constructor
-       fX=fZ=fQ=0;
-       fWing=0;
-       fNanodes=1;
-       fAnode=fTime=fPeakAmplitude=0;
-       fPeakPosition=-1;
-       fMultiplicity=0;
-       fTstart=fTstop=fTstartf=fTstopf=0;
-       fAstart=fAstop=0;
+  fMultiplicity = 0;
 }
 
 //______________________________________________________________________
@@ -48,57 +60,57 @@ AliITSRawClusterSDD::AliITSRawClusterSDD(Int_t wing,
                                         Int_t Samples,Int_t Tstart,
                                         Int_t Tstop,Int_t Tstartf,
                                         Int_t Tstopf,Int_t Anodes, 
-                                        Int_t Astart, Int_t Astop){
+                                        Int_t Astart, Int_t Astop):
+fX(0),
+fZ(0),
+fQ(Charge),
+fWing(wing),
+fAnode(Anode),
+fTime(Time),
+fAsigma(Asigma),
+fTsigma(Tsigma),
+fPeakAmplitude(PeakAmplitude),
+fSumAmplitude(0),
+fPeakPosition(PeakPosition),
+fNanodes(Anodes),
+fTstart(Tstart),
+fTstop(Tstop),
+fTstartf(Tstartf),
+fTstopf(Tstopf),
+fAstart(Astart),
+fAstop(Astop){
     // constructor
 
-    fWing          = wing;
-    fAnode         = Anode;
-    fTime          = Time;
-    fQ             = Charge;
-    fPeakAmplitude = PeakAmplitude;
-    fPeakPosition  = PeakPosition;
-    fAsigma        = Asigma;
-    fTsigma        = Tsigma;
-    fNanodes       = Anodes;
-    fTstart        = Tstart;
-    fTstop         = Tstop;
-    fTstartf       = Tstartf;
-    fTstopf        = Tstopf;
-    fAstart        = Astart;
-    fAstop         = Astop;
-    fMultiplicity  = Samples;
-    fSumAmplitude  = 0;
-
     Int_t sign = 1;
     for(Int_t i=0;i<fWing; i++) sign *= (-1);
     fX = DriftPath*sign/10000.;
     fZ = AnodeOffset/10000.;
+    fMultiplicity = Samples;
 }
 //______________________________________________________________________
 AliITSRawClusterSDD::AliITSRawClusterSDD(const AliITSRawClusterSDD & source):
-    AliITSRawCluster(source){
+    AliITSRawCluster(source),
+fX(source.fX),
+fZ(source.fZ),
+fQ(source.fQ),
+fWing(source.fWing),
+fAnode(source.fAnode),
+fTime(source.fTime),
+fAsigma(source.fAsigma),
+fTsigma(source.fTsigma),
+fPeakAmplitude(source.fPeakAmplitude),
+fSumAmplitude(source.fSumAmplitude),
+fPeakPosition(source.fPeakPosition),
+fNanodes(source.fNanodes),
+fTstart(source.fTstart),
+fTstop(source.fTstop),
+fTstartf(source.fTstartf),
+fTstopf(source.fTstopf),
+fAstart(source.fAstart),
+fAstop(source.fAstop){
     // copy constructor
 
-    fWing          = source.fWing;
-    fAnode         = source.fAnode;
-    fTime          = source.fTime;
-    fQ             = source.fQ;
-    fPeakAmplitude = source.fPeakAmplitude;
-    fPeakPosition  = source.fPeakPosition;
-    fAsigma        = source.fAsigma;
-    fTsigma        = source.fTsigma;
-    fNanodes       = source.fNanodes;
-    fTstart        = source.fTstart;
-    fTstop         = source.fTstop;
-    fTstartf       = source.fTstartf;
-    fTstopf        = source.fTstopf;
-    fAstart        = source.fAstart;
-    fAstop         = source.fAstop;
-
     fMultiplicity  = source.fMultiplicity;
-    fSumAmplitude  = source.fSumAmplitude;
-    fX             = source.fX;
-    fZ             = source.fZ;
 }
 //______________________________________________________________________
 void AliITSRawClusterSDD::Add(AliITSRawClusterSDD* clJ) {
index 6d9a02b78d3b1a8c97ec99012b2a0cde619e8f9c..7a48d84b71d994e52a1f6dcdac7c24c34971ed29 100644 (file)
 ClassImp(AliITSRawClusterSPD)
 
 //______________________________________________________________________
-AliITSRawClusterSPD::AliITSRawClusterSPD(){
+AliITSRawClusterSPD::AliITSRawClusterSPD():
+fX(0.0),
+fZ(0.0),
+fQ(0.0),
+fNClZ(0),
+fNClX(0),
+fXStart(0),
+fXStop(0),
+fZStart(0.0),
+fZStop(0.0),
+fZend(0),
+fNTracks(0),
+fModule(0)
+{
   // Default constructor
-  fX=fZ=fQ=0.0;
-  fZStart=fZStop=0.0;
-  fNClZ=fNClX=fXStart=fXStop=fZend=fNTracks=0;
-  fTracks[0]=fTracks[1]=fTracks[2]=-3,fModule=0;
+  fTracks[0]=fTracks[1]=fTracks[2]=-3;
 }
 
 //______________________________________________________________________
@@ -39,20 +49,21 @@ AliITSRawClusterSPD::AliITSRawClusterSPD(Float_t clz,Float_t clx,
                                         Int_t ClusterSizeX,Int_t xstart,
                                         Int_t xstop,
                                         Float_t zstart,Float_t zstop,
-                                        Int_t zend,Int_t module) {
+                                        Int_t zend,Int_t module):
+fX(clx),
+fZ(clz),
+fQ(Charge),
+fNClZ(ClusterSizeZ),
+fNClX(ClusterSizeX),
+fXStart(xstart),
+fXStop(xstop),
+fZStart(zstart),
+fZStop(zstop),
+fZend(zend),
+fNTracks(0),
+fModule(module) {
     // constructor
 
-    fZ       = clz;
-    fX       = clx;
-    fQ       = Charge;
-    fNClZ    = ClusterSizeZ;
-    fNClX    = ClusterSizeX;
-    fXStart  = xstart;
-    fXStop   = xstop;
-    fZStart  = zstart;
-    fZStop   = zstop;
-    fZend    = zend;
-    fModule  = module;
 }
 //______________________________________________________________________
 void AliITSRawClusterSPD::Add(AliITSRawClusterSPD* clJ) {
index a72dff0da6869f6caaf2084fe32ba3e657b8bcb0..73d54311842ecbca5cbe68ac704949d34ed3dd1b 100644 (file)
 ClassImp(AliITSRawClusterSSD)
 
 //______________________________________________________________________
-AliITSRawClusterSSD::AliITSRawClusterSSD(){
+AliITSRawClusterSSD::AliITSRawClusterSSD():
+fMultiplicityN(0),
+fQErr(0),
+fSignalP(0),
+fSignalN(0),
+fStatus(-1),
+fNtracks(0)
+{
   // Default constructor
-  fMultiplicityN=0;
-  fQErr=0; 
-  fSignalP=0;
-  fSignalN=0;
-  fStatus=-1;
-  fNtracks=0;
 }
 //______________________________________________________________________
-AliITSRawClusterSSD::AliITSRawClusterSSD(Float_t Prob,Int_t Sp,Int_t Sn) {  
+AliITSRawClusterSSD::AliITSRawClusterSSD(Float_t Prob,Int_t Sp,Int_t Sn):
+fMultiplicityN(Sn),
+fQErr(0),
+fSignalP(0),
+fSignalN(0),
+fStatus(-1),
+fNtracks(0) {  
     // constructor
 
     Prob = 0.0; // added to remove unused variable warning.
     //fProbability   = Prob;
     fMultiplicity  = Sp;
-    fMultiplicityN = Sn;
 }