Merge with TRD-develop
[u/mrichter/AliRoot.git] / TRD / AliTRDhit.cxx
CommitLineData
6f1e466d 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$
793ff80c 18Revision 1.1.2.2 2000/09/18 13:41:29 cblume
19Changed fDetector to UShort and fQ to Short_t. Use customized streamer
20
21Revision 1.4 2000/06/08 18:32:58 cblume
22Make code compliant to coding conventions
23
8230f242 24Revision 1.3 2000/06/07 16:25:37 cblume
25Try to remove compiler warnings on Sun and HP
26
9d0b222b 27Revision 1.2 2000/05/08 16:17:27 cblume
28Merge TRD-develop
29
6f1e466d 30Revision 1.1.2.1 2000/05/08 14:48:31 cblume
31AliTRDhit class now in separate files
32
33*/
34
35///////////////////////////////////////////////////////////////////////////////
36// //
37// Hit object for the TRD //
38// //
39///////////////////////////////////////////////////////////////////////////////
40
41#include "AliTRDhit.h"
42
43ClassImp(AliTRDhit)
8230f242 44
45//_____________________________________________________________________________
46AliTRDhit::AliTRDhit():AliHit()
47{
48 //
49 // AliTRDhit default constructor
50 //
51
52}
53
6f1e466d 54//_____________________________________________________________________________
793ff80c 55AliTRDhit::AliTRDhit(Int_t shunt, Int_t track, Int_t det
56 , Float_t *hits, Int_t q)
6f1e466d 57 :AliHit(shunt, track)
58{
59 //
60 // Create a TRD hit
61 //
62
793ff80c 63 // Store detector number
64 fDetector = (UShort_t) det;
6f1e466d 65
793ff80c 66 // Store position
6f1e466d 67 fX = hits[0];
68 fY = hits[1];
69 fZ = hits[2];
793ff80c 70
71 // Store the charge
72 fQ = (Short_t) q;
6f1e466d 73
74}
8230f242 75
76//_____________________________________________________________________________
77AliTRDhit::~AliTRDhit()
78{
79 //
80 // AliTRDhit destructor
81 //
82
83}
793ff80c 84
85//_____________________________________________________________________________
86void 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}