]>
Commit | Line | Data |
---|---|---|
dfbb4bb9 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | /* $Id: AliTRDrawStreamBase.cxx 23387 2008-01-17 17:25:16Z cblume $ */ | |
17 | ||
18 | /////////////////////////////////////////////////////////////////////////////// | |
19 | // // | |
20 | // This class defines access to TRD digits in raw data. // | |
21 | // // | |
22 | // It loops over all TRD digits in the raw data given by the AliRawReader. // | |
23 | // The Next method goes to the next digit. If there are no digits left // | |
24 | // it returns kFALSE. // | |
25 | // Several getters provide information about the current digit. // | |
26 | // // | |
27 | // Author: M. Ploskon (ploskon@ikf.uni-frankfurt.de) // | |
28 | // // | |
29 | /////////////////////////////////////////////////////////////////////////////// | |
30 | ||
31 | #include "AliRawReader.h" | |
32 | ||
987ba9a3 | 33 | #include "AliTRDrawOldStream.h" |
987ba9a3 | 34 | #include "AliTRDrawStream.h" |
dfbb4bb9 | 35 | |
36 | #include "AliTRDrawStreamBase.h" | |
37 | ||
38 | //-------------------------------------------------------- | |
39 | ClassImp(AliTRDrawStreamBase) | |
40 | ||
6a04e92b | 41 | Int_t AliTRDrawStreamBase::fgRawStreamVersion = AliTRDrawStreamBase::kTRDrealStream; |
dfbb4bb9 | 42 | |
43 | //_____________________________________________________________________________ | |
44 | AliTRDrawStreamBase::AliTRDrawStreamBase() | |
45 | : TObject() | |
46 | { | |
47 | // | |
48 | // this is just for API | |
49 | // | |
50 | ; | |
51 | } | |
52 | ||
53 | //_____________________________________________________________________________ | |
54 | AliTRDrawStreamBase::AliTRDrawStreamBase(AliRawReader */*rawReader*/) | |
55 | : TObject() | |
56 | { | |
57 | // | |
58 | // this is just for API | |
59 | // | |
60 | ; | |
61 | } | |
62 | ||
63 | //_____________________________________________________________________________ | |
64 | AliTRDrawStreamBase::AliTRDrawStreamBase(const AliTRDrawStreamBase& /*st*/) | |
65 | : TObject() | |
66 | { | |
67 | // | |
68 | // copy | |
69 | // | |
70 | TRD_NOIMP(); | |
71 | ; | |
72 | } | |
73 | ||
74 | //_____________________________________________________________________________ | |
75 | AliTRDrawStreamBase::~AliTRDrawStreamBase() | |
76 | { | |
77 | // | |
78 | // destructor | |
79 | // | |
80 | ; | |
81 | } | |
82 | ||
83 | //_____________________________________________________________________________ | |
84 | AliTRDrawStreamBase & | |
85 | AliTRDrawStreamBase::operator=(const AliTRDrawStreamBase &) | |
86 | { | |
87 | // | |
88 | // we are not using this functionality | |
89 | // | |
90 | TRD_NOIMP(); | |
91 | return *this; | |
92 | } | |
93 | ||
94 | //_____________________________________________________________________________ | |
95 | AliTRDrawStreamBase *AliTRDrawStreamBase::GetRawStream() | |
96 | { | |
97 | // | |
98 | // Returns the selected raw stream implementation | |
99 | // | |
100 | ||
101 | if (fgRawStreamVersion == kTRDoldStream) | |
987ba9a3 | 102 | return new AliTRDrawOldStream(); |
dfbb4bb9 | 103 | |
104 | if (fgRawStreamVersion == kTRDrealStream) | |
987ba9a3 | 105 | return new AliTRDrawStream(); |
dfbb4bb9 | 106 | |
107 | if (fgRawStreamVersion == kTRDsimStream) | |
f3667dfd | 108 | return new AliTRDrawStream(); |
dfbb4bb9 | 109 | |
110 | return new AliTRDrawStreamBase; | |
111 | } | |
112 | ||
113 | //_____________________________________________________________________________ | |
114 | AliTRDrawStreamBase *AliTRDrawStreamBase::GetRawStream(AliRawReader *reader) | |
115 | { | |
116 | // | |
117 | // Returns the selected raw stream implementation | |
118 | // | |
119 | ||
120 | if (fgRawStreamVersion == kTRDoldStream) | |
987ba9a3 | 121 | return new AliTRDrawOldStream(reader); |
dfbb4bb9 | 122 | |
123 | if (fgRawStreamVersion == kTRDrealStream) | |
987ba9a3 | 124 | return new AliTRDrawStream(reader); |
dfbb4bb9 | 125 | |
126 | if (fgRawStreamVersion == kTRDsimStream) | |
f3667dfd | 127 | return new AliTRDrawStream(reader); |
128 | ||
dfbb4bb9 | 129 | return new AliTRDrawStreamBase; |
130 | } | |
131 | ||
132 | //_____________________________________________________________________________ | |
133 | void AliTRDrawStreamBase::SetRawStreamVersion(const char *opt) | |
134 | { | |
135 | // | |
136 | // Sets the raw stream version | |
137 | // | |
138 | ||
139 | fgRawStreamVersion = 0; | |
140 | ||
141 | if (strstr(opt, "sim" ) != 0 || strstr(opt, "SIM") != 0) | |
142 | fgRawStreamVersion = kTRDsimStream; | |
143 | ||
144 | if (strstr(opt, "tb" ) != 0 || strstr(opt, "TB") != 0) | |
145 | fgRawStreamVersion = kTRDrealStream; | |
146 | ||
147 | if (strstr(opt, "real" ) != 0 || strstr(opt, "REAL") != 0) | |
148 | fgRawStreamVersion = kTRDrealStream; | |
149 | ||
150 | if (strstr(opt, "old" ) != 0 || strstr(opt, "OLD") != 0) | |
151 | fgRawStreamVersion = kTRDoldStream; | |
152 | ||
153 | } |