1 /**************************************************************************
\r
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
\r
4 * Author: The ALICE Off-line Project. *
\r
5 * Contributors are mentioned in the code where appropriate. *
\r
7 * Permission to use, copy, modify and distribute this software and its *
\r
8 * documentation strictly for non-commercial purposes is hereby granted *
\r
9 * without fee, provided that the above copyright notice appears in all *
\r
10 * copies and that both the copyright notice and this permission notice *
\r
11 * appear in the supporting documentation. The authors make no claims *
\r
12 * about the suitability of this software for any purpose. It is *
\r
13 * provided "as is" without express or implied warranty. *
\r
14 **************************************************************************/
\r
16 /* $Id: AliTRDrawStreamBase.cxx 23387 2008-01-17 17:25:16Z cblume $ */
\r
18 ///////////////////////////////////////////////////////////////////////////////
\r
20 // This class defines access to TRD digits in raw data. //
\r
22 // It loops over all TRD digits in the raw data given by the AliRawReader. //
\r
23 // The Next method goes to the next digit. If there are no digits left //
\r
24 // it returns kFALSE. //
\r
25 // Several getters provide information about the current digit. //
\r
27 // Author: M. Ploskon (ploskon@ikf.uni-frankfurt.de) //
\r
29 ///////////////////////////////////////////////////////////////////////////////
\r
31 #include "AliTRDrawStream.h"
\r
32 #include "AliTRDrawFastStream.h"
\r
34 #include "AliTRDrawStreamBase.h"
\r
36 //--------------------------------------------------------
\r
37 ClassImp(AliTRDrawStreamBase)
\r
39 Int_t AliTRDrawStreamBase::fgRawStreamVersion = AliTRDrawStreamBase::kTRDrealStream;
\r
40 Int_t AliTRDrawStreamBase::fgCommonAdditive = 0;
\r
42 //_____________________________________________________________________________
\r
43 AliTRDrawStreamBase::AliTRDrawStreamBase()
\r
47 // this is just for API
\r
52 //_____________________________________________________________________________
\r
53 AliTRDrawStreamBase::AliTRDrawStreamBase(AliRawReader */*rawReader*/)
\r
57 // this is just for API
\r
62 //_____________________________________________________________________________
\r
63 AliTRDrawStreamBase::AliTRDrawStreamBase(const AliTRDrawStreamBase& /*st*/)
\r
73 //_____________________________________________________________________________
\r
74 AliTRDrawStreamBase::~AliTRDrawStreamBase()
\r
82 //_____________________________________________________________________________
\r
83 AliTRDrawStreamBase &
\r
84 AliTRDrawStreamBase::operator=(const AliTRDrawStreamBase &)
\r
87 // we are not using this functionality
\r
93 //_____________________________________________________________________________
\r
94 AliTRDrawStreamBase *AliTRDrawStreamBase::GetRawStream()
\r
97 // Returns the selected raw stream implementation
\r
100 if (fgRawStreamVersion == kTRDrealStream)
\r
101 return new AliTRDrawStream();
\r
103 if (fgRawStreamVersion == kTRDsimStream)
\r
104 return new AliTRDrawStream();
\r
106 if (fgRawStreamVersion == kTRDfastStream)
\r
107 return new AliTRDrawFastStream();
\r
109 return new AliTRDrawStreamBase;
\r
112 //_____________________________________________________________________________
\r
113 AliTRDrawStreamBase *AliTRDrawStreamBase::GetRawStream(AliRawReader *reader)
\r
116 // Returns the selected raw stream implementation
\r
119 if (fgRawStreamVersion == kTRDrealStream)
\r
120 return new AliTRDrawStream(reader);
\r
122 if (fgRawStreamVersion == kTRDsimStream)
\r
123 return new AliTRDrawStream(reader);
\r
126 if (fgRawStreamVersion == kTRDfastStream){
\r
127 return new AliTRDrawFastStream(reader);}
\r
129 return new AliTRDrawStreamBase;
\r
132 //_____________________________________________________________________________
\r
133 void AliTRDrawStreamBase::SetRawStreamVersion(const char *opt)
\r
136 // Sets the raw stream version
\r
139 fgRawStreamVersion = 0;
\r
141 if (strstr(opt, "sim" ) != 0 || strstr(opt, "SIM") != 0)
\r
142 fgRawStreamVersion = kTRDsimStream;
\r
144 if (strstr(opt, "tb" ) != 0 || strstr(opt, "TB") != 0)
\r
145 fgRawStreamVersion = kTRDrealStream;
\r
147 if (strstr(opt, "real" ) != 0 || strstr(opt, "REAL") != 0)
\r
148 fgRawStreamVersion = kTRDrealStream;
\r
150 if (strstr(opt, "fast" ) != 0 || strstr(opt, "FAST") != 0)
\r
151 fgRawStreamVersion = kTRDfastStream;
\r