]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDrawStreamBase.cxx
leak fix
[u/mrichter/AliRoot.git] / TRD / AliTRDrawStreamBase.cxx
index 2a9708a82b5f88a079ac98e0d3e531831f526489..1e3ddce1489a64c4d37b4cb7e947fef3e29f0160 100644 (file)
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
-#include "AliRawReader.h"
-
-#include "AliTRDrawOldStream.h"
-#include "AliTRDRawStreamV2.h"
+#include "AliTRDrawStreamOld.h"
 #include "AliTRDrawStream.h"
 
 #include "AliTRDrawStreamBase.h"
@@ -39,7 +36,7 @@
 //--------------------------------------------------------
 ClassImp(AliTRDrawStreamBase)
 
-Int_t AliTRDrawStreamBase::fgRawStreamVersion = AliTRDrawStreamBase::kTRDsimStream;
+Int_t AliTRDrawStreamBase::fgRawStreamVersion = AliTRDrawStreamBase::kTRDdefaultStream;
 
 //_____________________________________________________________________________
 AliTRDrawStreamBase::AliTRDrawStreamBase()
@@ -99,19 +96,18 @@ AliTRDrawStreamBase *AliTRDrawStreamBase::GetRawStream()
   // Returns the selected raw stream implementation
   //
 
-  if (fgRawStreamVersion == kTRDoldStream)
-    return new AliTRDrawOldStream();
-
   if (fgRawStreamVersion == kTRDrealStream)
-    return new AliTRDrawStream();
+    return new AliTRDrawStreamOld();
 
   if (fgRawStreamVersion == kTRDsimStream)
-    {
-      AliTRDRawStreamV2 *rstream = new AliTRDRawStreamV2();
-      rstream->Init();
-      return rstream;
-    }
+    return new AliTRDrawStreamOld();
   
+  //if (fgRawStreamVersion == kTRDfastStream)
+  //  return new AliTRDrawFastStream();
+
+  if (fgRawStreamVersion == kTRDdefaultStream)
+    return new AliTRDrawStream();
+
   return new AliTRDrawStreamBase;
 }
 
@@ -122,18 +118,19 @@ AliTRDrawStreamBase *AliTRDrawStreamBase::GetRawStream(AliRawReader *reader)
   // Returns the selected raw stream implementation
   //
 
-  if (fgRawStreamVersion == kTRDoldStream)
-    return new AliTRDrawOldStream(reader);
-
   if (fgRawStreamVersion == kTRDrealStream)
-    return new AliTRDrawStream(reader);
+    return new AliTRDrawStreamOld(reader);
 
   if (fgRawStreamVersion == kTRDsimStream)
-    {
-      AliTRDRawStreamV2 *rstream = new AliTRDRawStreamV2(reader);
-      rstream->Init();
-      return rstream;
-    }
+    return new AliTRDrawStreamOld(reader);
+
+
+  //if (fgRawStreamVersion == kTRDfastStream){
+  //  return new AliTRDrawFastStream(reader);}
+
+  if (fgRawStreamVersion == kTRDdefaultStream)
+    return new AliTRDrawStream(reader);
+
   return new AliTRDrawStreamBase;
 }
 
@@ -155,7 +152,11 @@ void AliTRDrawStreamBase::SetRawStreamVersion(const char *opt)
   if (strstr(opt, "real" ) != 0 || strstr(opt, "REAL") != 0) 
     fgRawStreamVersion = kTRDrealStream; 
 
-  if (strstr(opt, "old" ) != 0 || strstr(opt, "OLD") != 0) 
-    fgRawStreamVersion = kTRDoldStream; 
+  //if (strstr(opt, "fast" ) != 0 || strstr(opt, "FAST") != 0)
+  //  fgRawStreamVersion = kTRDfastStream;
+
+  if (strstr(opt, "default" ) != 0 || strstr(opt, "DEFAULT") != 0)
+    fgRawStreamVersion = kTRDdefaultStream;
       
 }
+