X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TPC%2FAliTPCBuffer.cxx;h=25f7615bd87d47471519a5c0145245bd6561d7fd;hb=1e4ec417458b79766a8e47989ae9e9e7e45cd642;hp=1bd01f49bdf502ef16089e2187d1f95de2b029b8;hpb=88cb7938ca21d4a80991d4e7aa564008c29340f7;p=u%2Fmrichter%2FAliRoot.git diff --git a/TPC/AliTPCBuffer.cxx b/TPC/AliTPCBuffer.cxx index 1bd01f49bdf..25f7615bd87 100644 --- a/TPC/AliTPCBuffer.cxx +++ b/TPC/AliTPCBuffer.cxx @@ -12,7 +12,6 @@ * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ - /* $Id$ */ // Storing digits in a binary file @@ -31,17 +30,31 @@ ClassImp(AliTPCBuffer) ////////////////////////////////////////////////////////////////////////////////////////////////////////////// -AliTPCBuffer::AliTPCBuffer(const char* fileName){ +//___________________________________________________________ + AliTPCBuffer::AliTPCBuffer():TObject(), + fVerbose(0), + fNumberOfDigits(0), + f() +{ + // + // default + // +} +//____________________________________________________________ + AliTPCBuffer::AliTPCBuffer(const char* fileName):TObject(), + fVerbose(0), + fNumberOfDigits(0), + f() +{ // Constructor #ifndef __DECCXX - f.open("AliTPCDDL.dat",ios::binary|ios::out); + f.open(fileName,ios::binary|ios::out); #else - f.open("AliTPCDDL.dat",ios::out); + f.open(fileName,ios::out); #endif // fout=new TFile(fileName,"recreate"); // tree=new TTree("tree","Values"); - fNumberOfDigits=0; - fVerbose=0; + remove("TPCdigits.txt"); } @@ -53,7 +66,11 @@ AliTPCBuffer::~AliTPCBuffer(){ //delete fout; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////// -AliTPCBuffer::AliTPCBuffer(const AliTPCBuffer &source){ +AliTPCBuffer::AliTPCBuffer(const AliTPCBuffer &source):TObject(source), + fVerbose(0), + fNumberOfDigits(0), + f() +{ // Copy Constructor this->fVerbose=source.fVerbose; return; @@ -61,7 +78,9 @@ AliTPCBuffer::AliTPCBuffer(const AliTPCBuffer &source){ ////////////////////////////////////////////////////////////////////////////////////////////////////////////// AliTPCBuffer& AliTPCBuffer::operator=(const AliTPCBuffer &source){ //Assigment operator - this->fVerbose=source.fVerbose; + if(this!=&source){ + this->fVerbose=source.fVerbose; + } return *this; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -132,7 +151,7 @@ void AliTPCBuffer::WriteRowBinary(Int_t eth,AliSimDigits *digrow,Int_t minPad,In data.Sec=sec; data.SubSec=SubSec; data.Row=row; - digrow->First(); + if (!digrow->First()) return; Int_t padID=-1; Int_t ddlNumber=0; ofstream ftxt;