]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSRawData.cxx
Increased size of collection in Merge and protected SaveHistograms
[u/mrichter/AliRoot.git] / ITS / AliITSRawData.cxx
index 54ae9aeaedcfea443f612eda4871995335912355..c50f28a692d941efdf9c6bb441f68afcb6c42acf 100644 (file)
@@ -2,7 +2,7 @@
 //  RawData classes for set:ITS               //
 ////////////////////////////////////////////////
 
-
+#include <cstring>
 #include "AliITSRawData.h"
 
 ClassImp(AliITSRawData)
@@ -11,23 +11,21 @@ ClassImp(AliITSInStream)
 
 //_____________________________________________________________________________
 
-AliITSInStream::AliITSInStream()
-{
+AliITSInStream::AliITSInStream():
+fStreamLen(0),
+fInStream(0){
   //default constructor
-  fStreamLen=0;
-  fInStream=0;
 }
 //_____________________________________________________________________________
 
-AliITSInStream::AliITSInStream(ULong_t length)
-{
+AliITSInStream::AliITSInStream(UInt_t length):
+fStreamLen(length),
+fInStream(0){
   //
   // Creates a stream of unsigned chars
   //
   
-  fStreamLen = length;
-  fInStream = new UChar_t[length]; 
-  
+  fInStream = new UChar_t[length];   
   ClearStream(); 
   
 }
@@ -40,12 +38,11 @@ AliITSInStream::~AliITSInStream()
 }
 
 //__________________________________________________________________________
-AliITSInStream::AliITSInStream(const AliITSInStream &source){
+AliITSInStream::AliITSInStream(const AliITSInStream &source) : TObject(source),
+fStreamLen(source.fStreamLen),
+fInStream(source.fInStream){
   //     Copy Constructor 
-  if(&source == this) return;
-  this->fStreamLen = source.fStreamLen;
-  this->fInStream = source.fInStream;
-  return;
+
 }
 
 //_________________________________________________________________________
@@ -67,58 +64,37 @@ void AliITSInStream::ClearStream()
 
 
 //_____________________________________________________________________________
-Bool_t AliITSInStream::CheckCount(ULong_t count) {
+Bool_t AliITSInStream::CheckCount(UInt_t count) {
   //check boundaries
-  if (count <= (ULong_t)fStreamLen) return kTRUE;
+  if (count <= (UInt_t)fStreamLen) return kTRUE;
   else {
     Error("CheckCount", "actual size is %d, the necessary size is %d",fStreamLen,count);
     return kFALSE;
   }
 }
 
-//____________________________________________________________________________
-void AliITSInStream::Streamer(TBuffer &R__b){
-  // Stream an object of class AliITSInStream.
-  
-  static unsigned char *array;
-  static Bool_t make=kTRUE;
-  
-  if (R__b.IsReading()) {
-         R__b >> fStreamLen;
-         //printf("Streamer: fStreamLen %d\n",fStreamLen);
-          if (make) array=new unsigned char[fStreamLen];
-          make=kFALSE;
-          memset(array,0,sizeof(UChar_t)*fStreamLen);
-          fInStream=array;
-         R__b.ReadFastArray(fInStream,fStreamLen);
-         
-  } else {
-    R__b << fStreamLen;
-    R__b.WriteFastArray(fInStream,fStreamLen);
-  }
-}
-
-
 
 ClassImp(AliITSOutStream)
   
   //_______________________________________________________________________
   
-  AliITSOutStream::AliITSOutStream() {
+AliITSOutStream::AliITSOutStream():
+fStreamLen(0),
+fOutStream(0){
   //default constructor
-  fStreamLen=0;
-  fOutStream=0;
+
 }
 
 //__________________________________________________________________________
 
-AliITSOutStream::AliITSOutStream(ULong_t length) {
+AliITSOutStream::AliITSOutStream(UInt_t length):
+fStreamLen(length),
+fOutStream(0){
   //
   // Creates a stream of unsigned chars
   //
   
-  fStreamLen = length;
-  fOutStream = new ULong_t[length];  
+  fOutStream = new UInt_t[length];  
   ClearStream(); 
   
 }
@@ -131,12 +107,11 @@ AliITSOutStream::~AliITSOutStream()
 }
 
 //__________________________________________________________________________
-AliITSOutStream::AliITSOutStream(const AliITSOutStream &source){
+AliITSOutStream::AliITSOutStream(const AliITSOutStream &source):TObject(source),
+fStreamLen(source.fStreamLen),
+fOutStream(source.fOutStream){
   //     Copy Constructor 
-  if(&source == this) return;
-  this->fStreamLen = source.fStreamLen;
-  this->fOutStream = source.fOutStream;
-  return;
+
 }
 
 //_________________________________________________________________________
@@ -153,11 +128,11 @@ AliITSOutStream&
 void AliITSOutStream::ClearStream()
 {
   // clear stream
-  memset(fOutStream,0,sizeof(ULong_t)*fStreamLen);
+  memset(fOutStream,0,sizeof(UInt_t)*fStreamLen);
 }
 
 //_____________________________________________________________________________
-Bool_t AliITSOutStream::CheckCount(ULong_t count)
+Bool_t AliITSOutStream::CheckCount(UInt_t count)
 {
   //check boundaries
   if (count < fStreamLen) return kTRUE;
@@ -166,27 +141,3 @@ Bool_t AliITSOutStream::CheckCount(ULong_t count)
     return kFALSE;
   }
 }
-
-//____________________________________________________________________________
-void AliITSOutStream::Streamer(TBuffer &R__b){
-  
-  // Stream an object of class AliITSOutStream.
-  
-  static unsigned long *array;
-  static Bool_t make=kTRUE;
-  
-  if (R__b.IsReading()) {
-         R__b >> fStreamLen;
-         //printf("Streamer: fStreamLen %d\n",fStreamLen);
-          if (make) array=new unsigned long[fStreamLen];
-          make=kFALSE;
-          memset(array,0,sizeof(ULong_t)*fStreamLen);
-          fOutStream=array;
-         R__b.ReadFastArray(fOutStream,fStreamLen);
-         
-  } else {
-    R__b << fStreamLen;
-    R__b.WriteFastArray(fOutStream,fStreamLen);
-  }
-}
-