]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCBuffer.cxx
Fix histograms
[u/mrichter/AliRoot.git] / TPC / AliTPCBuffer.cxx
index 1bd01f49bdf502ef16089e2187d1f95de2b029b8..25f7615bd87d47471519a5c0145245bd6561d7fd 100644 (file)
@@ -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
 
 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;