////////////////////////////////////////////////////////////////////////// // Alice ITS class to help keep statistical information // // // // version: 0.0.0 Draft. // // Date: April 18 1999 // // By: Bjorn S. Nilsen // // // ////////////////////////////////////////////////////////////////////////// #include #include #include "TMath.h" #include "AliITSstatistics2.h" ClassImp(AliITSstatistics2) // AliITSstatistics2::AliITSstatistics2() : TObject(){ // // default constructor // fx = 0; fy = 0; fyx = 0; fw = 0; fN = 0; fOrder = 0; return; } 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; } //_______________________________________________________________ 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 } void AliITSstatistics2::Reset(){ // // Reset/zero statistics // Int_t i; 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); } }