]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDhit.cxx
Double defined data members corrected.
[u/mrichter/AliRoot.git] / TRD / AliTRDhit.cxx
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 /*
17 $Log$
18 Revision 1.1.2.2  2000/09/18 13:41:29  cblume
19 Changed fDetector to UShort and fQ to Short_t. Use customized streamer
20
21 Revision 1.4  2000/06/08 18:32:58  cblume
22 Make code compliant to coding conventions
23
24 Revision 1.3  2000/06/07 16:25:37  cblume
25 Try to remove compiler warnings on Sun and HP
26
27 Revision 1.2  2000/05/08 16:17:27  cblume
28 Merge TRD-develop
29
30 Revision 1.1.2.1  2000/05/08 14:48:31  cblume
31 AliTRDhit class now in separate files
32
33 */
34
35 ///////////////////////////////////////////////////////////////////////////////
36 //                                                                           //
37 //  Hit object for the TRD                                                   //
38 //                                                                           //
39 ///////////////////////////////////////////////////////////////////////////////
40
41 #include "AliTRDhit.h"
42
43 ClassImp(AliTRDhit)
44
45 //_____________________________________________________________________________
46 AliTRDhit::AliTRDhit():AliHit()
47 {
48   //
49   // AliTRDhit default constructor
50   //
51
52 }
53
54 //_____________________________________________________________________________
55 AliTRDhit::AliTRDhit(Int_t shunt, Int_t track, Int_t det
56                    , Float_t *hits, Int_t q)
57           :AliHit(shunt, track)
58 {
59   //
60   // Create a TRD hit
61   //
62
63   // Store detector number
64   fDetector = (UShort_t) det;
65
66   // Store position 
67   fX        = hits[0];
68   fY        = hits[1];
69   fZ        = hits[2];
70
71   // Store the charge
72   fQ        = (Short_t) q;
73
74 }
75
76 //_____________________________________________________________________________
77 AliTRDhit::~AliTRDhit()
78 {
79   //
80   // AliTRDhit destructor
81   //
82
83 }
84
85 //_____________________________________________________________________________
86 void AliTRDhit::Streamer(TBuffer &R__b)
87 {
88   //
89   // Stream an object of class AliTRDhit.
90   //
91
92   if (R__b.IsReading()) {
93     Version_t R__v = R__b.ReadVersion(); if (R__v) { }
94     AliHit::Streamer(R__b);
95     R__b >> fDetector;
96     R__b >> fQ;
97   } 
98   else {
99     R__b.WriteVersion(AliTRDhit::IsA());
100     AliHit::Streamer(R__b);
101     R__b << fDetector;
102     R__b << fQ;
103   }
104
105 }