]>
Commit | Line | Data |
---|---|---|
a2fbb6ec | 1 | /**************************************************************************\r |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r | |
3 | * *\r | |
4 | * Author: The ALICE Off-line Project. *\r | |
5 | * Contributors are mentioned in the code where appropriate. *\r | |
6 | * *\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 | |
15 | \r | |
16 | /* $Id: AliTRDrawStreamBase.cxx 23387 2008-01-17 17:25:16Z cblume $ */\r | |
17 | \r | |
18 | ///////////////////////////////////////////////////////////////////////////////\r | |
19 | // //\r | |
20 | // This class defines access to TRD digits in raw data. //\r | |
21 | // //\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 | |
26 | // //\r | |
27 | // Author: M. Ploskon (ploskon@ikf.uni-frankfurt.de) //\r | |
28 | // //\r | |
29 | ///////////////////////////////////////////////////////////////////////////////\r | |
30 | \r | |
31 | #include "AliTRDrawStream.h"\r | |
32 | #include "AliTRDrawFastStream.h"\r | |
33 | \r | |
34 | #include "AliTRDrawStreamBase.h"\r | |
35 | \r | |
36 | //--------------------------------------------------------\r | |
37 | ClassImp(AliTRDrawStreamBase)\r | |
38 | \r | |
39 | Int_t AliTRDrawStreamBase::fgRawStreamVersion = AliTRDrawStreamBase::kTRDrealStream;\r | |
40 | Int_t AliTRDrawStreamBase::fgCommonAdditive = 0;\r | |
41 | \r | |
42 | //_____________________________________________________________________________\r | |
43 | AliTRDrawStreamBase::AliTRDrawStreamBase()\r | |
44 | : TObject()\r | |
45 | {\r | |
46 | //\r | |
47 | // this is just for API\r | |
48 | //\r | |
49 | ;\r | |
50 | }\r | |
51 | \r | |
52 | //_____________________________________________________________________________\r | |
53 | AliTRDrawStreamBase::AliTRDrawStreamBase(AliRawReader */*rawReader*/)\r | |
54 | : TObject()\r | |
55 | {\r | |
56 | //\r | |
57 | // this is just for API\r | |
58 | //\r | |
59 | ;\r | |
60 | }\r | |
61 | \r | |
62 | //_____________________________________________________________________________\r | |
63 | AliTRDrawStreamBase::AliTRDrawStreamBase(const AliTRDrawStreamBase& /*st*/)\r | |
64 | : TObject()\r | |
65 | {\r | |
66 | //\r | |
67 | // copy\r | |
68 | //\r | |
69 | TRD_NOIMP();\r | |
70 | ;\r | |
71 | }\r | |
72 | \r | |
73 | //_____________________________________________________________________________\r | |
74 | AliTRDrawStreamBase::~AliTRDrawStreamBase()\r | |
75 | {\r | |
76 | //\r | |
77 | // destructor\r | |
78 | //\r | |
79 | ;\r | |
80 | }\r | |
81 | \r | |
82 | //_____________________________________________________________________________\r | |
83 | AliTRDrawStreamBase &\r | |
84 | AliTRDrawStreamBase::operator=(const AliTRDrawStreamBase &)\r | |
85 | {\r | |
86 | //\r | |
87 | // we are not using this functionality\r | |
88 | //\r | |
89 | TRD_NOIMP();\r | |
90 | return *this;\r | |
91 | }\r | |
92 | \r | |
93 | //_____________________________________________________________________________\r | |
94 | AliTRDrawStreamBase *AliTRDrawStreamBase::GetRawStream()\r | |
95 | {\r | |
96 | //\r | |
97 | // Returns the selected raw stream implementation\r | |
98 | //\r | |
99 | \r | |
100 | if (fgRawStreamVersion == kTRDrealStream)\r | |
101 | return new AliTRDrawStream();\r | |
102 | \r | |
103 | if (fgRawStreamVersion == kTRDsimStream)\r | |
104 | return new AliTRDrawStream();\r | |
105 | \r | |
106 | if (fgRawStreamVersion == kTRDfastStream)\r | |
107 | return new AliTRDrawFastStream();\r | |
108 | \r | |
109 | return new AliTRDrawStreamBase;\r | |
110 | }\r | |
111 | \r | |
112 | //_____________________________________________________________________________\r | |
113 | AliTRDrawStreamBase *AliTRDrawStreamBase::GetRawStream(AliRawReader *reader)\r | |
114 | {\r | |
115 | //\r | |
116 | // Returns the selected raw stream implementation\r | |
117 | //\r | |
118 | \r | |
119 | if (fgRawStreamVersion == kTRDrealStream)\r | |
120 | return new AliTRDrawStream(reader);\r | |
121 | \r | |
122 | if (fgRawStreamVersion == kTRDsimStream)\r | |
123 | return new AliTRDrawStream(reader);\r | |
124 | \r | |
125 | \r | |
126 | if (fgRawStreamVersion == kTRDfastStream){\r | |
127 | return new AliTRDrawFastStream(reader);}\r | |
128 | \r | |
129 | return new AliTRDrawStreamBase;\r | |
130 | }\r | |
131 | \r | |
132 | //_____________________________________________________________________________\r | |
133 | void AliTRDrawStreamBase::SetRawStreamVersion(const char *opt) \r | |
134 | { \r | |
135 | //\r | |
136 | // Sets the raw stream version\r | |
137 | //\r | |
138 | \r | |
139 | fgRawStreamVersion = 0; \r | |
140 | \r | |
141 | if (strstr(opt, "sim" ) != 0 || strstr(opt, "SIM") != 0) \r | |
142 | fgRawStreamVersion = kTRDsimStream; \r | |
143 | \r | |
144 | if (strstr(opt, "tb" ) != 0 || strstr(opt, "TB") != 0) \r | |
145 | fgRawStreamVersion = kTRDrealStream; \r | |
146 | \r | |
147 | if (strstr(opt, "real" ) != 0 || strstr(opt, "REAL") != 0) \r | |
148 | fgRawStreamVersion = kTRDrealStream; \r | |
149 | \r | |
150 | if (strstr(opt, "fast" ) != 0 || strstr(opt, "FAST") != 0)\r | |
151 | fgRawStreamVersion = kTRDfastStream;\r | |
152 | \r | |
153 | }\r | |
154 | \r |