]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDdigit.cxx
Merge with TRD-develop
[u/mrichter/AliRoot.git] / TRD / AliTRDdigit.cxx
1
2
3 /**************************************************************************
4  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  *                                                                        *
6  * Author: The ALICE Off-line Project.                                    *
7  * Contributors are mentioned in the code where appropriate.              *
8  *                                                                        *
9  * Permission to use, copy, modify and distribute this software and its   *
10  * documentation strictly for non-commercial purposes is hereby granted   *
11  * without fee, provided that the above copyright notice appears in all   *
12  * copies and that both the copyright notice and this permission notice   *
13  * appear in the supporting documentation. The authors make no claims     *
14  * about the suitability of this software for any purpose. It is          *
15  * provided "as is" without express or implied warranty.                  *
16  **************************************************************************/
17
18 /*
19 $Log$
20 Revision 1.1.2.4  2000/10/17 02:27:34  cblume
21 Get rid of global constants
22
23 Revision 1.1.2.3  2000/10/06 16:49:46  cblume
24 Made Getters const
25
26 Revision 1.1.2.2  2000/09/22 14:42:05  cblume
27 Changed data members to UShort_t
28
29 Revision 1.4  2000/06/08 18:32:58  cblume
30 Make code compliant to coding conventions
31
32 Revision 1.3  2000/06/07 16:25:37  cblume
33 Try to remove compiler warnings on Sun and HP
34
35 Revision 1.2  2000/05/08 16:17:27  cblume
36 Merge TRD-develop
37
38 Revision 1.1.2.1  2000/05/08 14:40:29  cblume
39 Introduce raw digit bit flag and DecodeAmp()
40
41 */
42
43 ///////////////////////////////////////////////////////////////////////////////
44 //                                                                           //
45 //  The TRD digit                                                            //
46 //                                                                           //
47 ///////////////////////////////////////////////////////////////////////////////
48
49 #include "AliTRDdigit.h"
50
51 ClassImp(AliTRDdigit)
52
53 //_____________________________________________________________________________
54   
55   // Marks a raw digit
56   const UInt_t AliTRDdigit::fgkRawDigit = 0x00000001; 
57
58 //_____________________________________________________________________________
59 AliTRDdigit::AliTRDdigit():AliDigitNew()
60 {
61   //
62   // Default constructor
63   //
64
65   fRow  = 0;
66   fCol  = 0;
67   fTime = 0;
68
69 }
70
71 //_____________________________________________________________________________
72 AliTRDdigit::AliTRDdigit(Bool_t isRaw, Int_t *digits, Int_t *amp):AliDigitNew()
73 {
74   //
75   // Create a TRD digit
76   //
77
78   // Store the volume hierarchy
79   fId   = digits[0];
80
81   // Store the row, pad, and time bucket number
82   fRow  = digits[1];
83   fCol  = digits[2];
84   fTime = digits[3];
85
86   // Store the signal amplitude
87   fAmp  = amp[0];
88
89   if (isRaw) SetBit(fgkRawDigit);
90
91 }
92
93 //_____________________________________________________________________________
94 AliTRDdigit::~AliTRDdigit()
95 {
96   //
97   // AliTRDdigit destructor
98   //
99
100 }
101
102 //_____________________________________________________________________________
103 Int_t AliTRDdigit::DecodeAmp() const
104 {
105   //
106   // Decodes the digit amplitude
107   //
108
109   return 0;
110
111 }
112
113 //______________________________________________________________________________
114 void AliTRDdigit::Streamer(TBuffer &R__b)
115 {
116   //
117   // Stream an object of class AliTRDdigit.
118   //
119
120   if (R__b.IsReading()) {
121     Version_t R__v = R__b.ReadVersion(); if (R__v) { }
122     AliDigitNew::Streamer(R__b);
123     R__b >> fRow;
124     R__b >> fCol;
125     R__b >> fTime;
126   } 
127   else {
128     R__b.WriteVersion(AliTRDdigit::IsA());
129     AliDigitNew::Streamer(R__b);
130     R__b << fRow;
131     R__b << fCol;
132     R__b << fTime;
133   }
134
135 }