////////////////////////////////////////////////////////////////////////// // Alice ITS class to help keep statistical information // // // // version: 0.0.0 Draft. // // Date: April 18 1999 // // By: Bjorn S. Nilsen // // // ////////////////////////////////////////////////////////////////////////// #include #include #include #include "AliITSstatistics.h" ClassImp(AliITSstatistics) // AliITSstatistics::AliITSstatistics() : TObject(){ // // default contructor // fX = 0; fW = 0; fN = 0; fOrder = 0; return; } AliITSstatistics::AliITSstatistics(Int_t order) : TObject(){ // // contructor to a specific order in the moments // fOrder = order; fX = new Double_t[order]; fW = new Double_t[order]; for(Int_t i=0;ifOrder = 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; } //_______________________________________________________________ AliITSstatistics::AliITSstatistics(AliITSstatistics &source){ // Copy constructor 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 AliITSstatistics::Reset(){ // // reset all values to zero // for(Int_t i=0;ikBig || x>kBig || w>kBig) return; fN++; for(i=0;i