X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITSstatistics2.cxx;h=00391fa52c698e28fcada664a4ecdaf17b2a3a8f;hb=b82b47f906199a3e40bdd771d7637c99d8bd6c13;hp=4dbb867b84b7dbbc706c5d0ae96e7a6fd213551b;hpb=b0f5e3fcf84ecedb50df35ebe629b44bafc15bc0;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITSstatistics2.cxx b/ITS/AliITSstatistics2.cxx index 4dbb867b84b..00391fa52c6 100644 --- a/ITS/AliITSstatistics2.cxx +++ b/ITS/AliITSstatistics2.cxx @@ -18,10 +18,10 @@ AliITSstatistics2::AliITSstatistics2() : TObject(){ // // default constructor // - fx = 0; - fy = 0; - fyx = 0; - fw = 0; + fX = 0; + fY = 0; + fYx = 0; + fW = 0; fN = 0; fOrder = 0; return; @@ -32,14 +32,13 @@ AliITSstatistics2::AliITSstatistics2(Int_t order) : TObject(){ // // constructor to maximum moment/order order // - Int_t i; fOrder = order; - fx = new Double_t[order]; - fy = new Double_t[order]; - fyx = new Double_t[order]; - fw = new Double_t[order]; - for(i=0;ifOrder = source.fOrder; - this->fN = source.fN; - this->fx = new Double_t[this->fOrder]; - this->fw = new Double_t[this->fOrder]; - for(i=0;ifx[i] = source.fx[i]; - this->fw[i] = source.fw[i]; - } // end for i - }else{ - this->fx = 0; - this->fw = 0; - this->fN = 0; - this->fOrder = 0; - }// end if source.fOrder!=0 - return *this; + if(this==&source) return *this; + if(source.fOrder!=0){ + this->fOrder = source.fOrder; + this->fN = source.fN; + this->fX = new Double_t[this->fOrder]; + this->fW = new Double_t[this->fOrder]; + for(Int_t i=0;ifX[i] = source.fX[i]; + this->fW[i] = source.fW[i]; + } // end for i + }else{ + this->fX = 0; + this->fW = 0; + this->fN = 0; + this->fOrder = 0; + }// end if source.fOrder!=0 + return *this; } //_______________________________________________________________ AliITSstatistics2::AliITSstatistics2(AliITSstatistics2 &source){ // Copy constructor - Int_t i; - if(this==&source) return; - if(source.fOrder!=0){ - this->fOrder = source.fOrder; - this->fN = source.fN; - this->fx = new Double_t[this->fOrder]; - this->fw = new Double_t[this->fOrder]; - for(i=0;ifx[i] = source.fx[i]; - this->fw[i] = source.fw[i]; - } // end for i - }else{ - this->fx = 0; - this->fw = 0; - this->fN = 0; - this->fOrder = 0; - }// end if source.fOrder!=0 + if(this==&source) return; + if(source.fOrder!=0){ + this->fOrder = source.fOrder; + this->fN = source.fN; + this->fX = new Double_t[this->fOrder]; + this->fW = new Double_t[this->fOrder]; + for(Int_t i=0;ifX[i] = source.fX[i]; + this->fW[i] = source.fW[i]; + } // end for i + }else{ + this->fX = 0; + this->fW = 0; + this->fN = 0; + this->fOrder = 0; + }// end if source.fOrder!=0 } void AliITSstatistics2::Reset(){ // // Reset/zero statistics // - Int_t i; - for(i=0;ikBig || x>kBig || w>kBig) return; + + fN++; for(i=0;i> fN; - R__b >> fOrder; - R__b.ReadArray(fy); - R__b.ReadArray(fx); - R__b.ReadArray(fyx); - R__b.ReadArray(fw); - } else { - R__b.WriteVersion(AliITSstatistics2::IsA()); - TObject::Streamer(R__b); - R__b << fN; - R__b << fOrder; - R__b.WriteArray(fy,fOrder); - R__b.WriteArray(fx,fOrder); - R__b.WriteArray(fyx,fOrder); - R__b.WriteArray(fw,fOrder); - } -}