]>
Commit | Line | Data |
---|---|---|
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.5 2002/10/14 14:57:00 hristov | |
19 | Merging the VirtualMC branch to the main development branch (HEAD) | |
20 | ||
21 | Revision 1.3.12.1 2002/10/14 13:14:08 hristov | |
22 | Updating VirtualMC to v3-09-02 | |
23 | ||
24 | Revision 1.4 2002/09/09 17:28:02 nilsen | |
25 | Added class iostreamer funcionality and Print and Read functions. cleaned | |
26 | up files. | |
27 | ||
28 | */ | |
29 | //////////////////////////////////////////////// | |
30 | // Reconstructed point class for set:ITS // | |
31 | //////////////////////////////////////////////// | |
32 | ||
33 | ||
34 | #include "AliITSRecPoint.h" | |
35 | ClassImp(AliITSRecPoint) | |
36 | ||
37 | AliITSRecPoint::AliITSRecPoint() { | |
38 | // default creator | |
39 | fTracks[0]=fTracks[1]=fTracks[2]=-3; | |
40 | fX=fZ=fQ=fdEdX=0.; | |
41 | fSigmaX2=fSigmaZ2=0.; | |
42 | } | |
43 | //---------------------------------------------------------------------- | |
44 | void AliITSRecPoint::Print(ostream *os){ | |
45 | //////////////////////////////////////////////////////////////////////// | |
46 | // Standard output format for this class. | |
47 | //////////////////////////////////////////////////////////////////////// | |
48 | #if defined __GNUC__ | |
49 | #if __GNUC__ > 2 | |
50 | ios::fmtflags fmt; | |
51 | #else | |
52 | Int_t fmt; | |
53 | #endif | |
54 | #else | |
55 | #if defined __ICC || defined __ECC | |
56 | ios::fmtflags fmt; | |
57 | #else | |
58 | Int_t fmt; | |
59 | #endif | |
60 | #endif | |
61 | ||
62 | fmt = os->setf(ios::fixed); // set fixed floating point output | |
63 | *os << fTracks[0]<< " " << fTracks[1] << " " << fTracks[2] << " "; | |
64 | *os << fX << " " << fZ << " " << fQ << " "; | |
65 | fmt = os->setf(ios::scientific); // set scientific for dEdX. | |
66 | *os << fdEdX << " "; | |
67 | fmt = os->setf(ios::fixed); // every fixed | |
68 | *os << fSigmaX2 << " " << fSigmaZ2; | |
69 | os->flags(fmt); // reset back to old formating. | |
70 | return; | |
71 | } | |
72 | //---------------------------------------------------------------------- | |
73 | void AliITSRecPoint::Read(istream *is){ | |
74 | //////////////////////////////////////////////////////////////////////// | |
75 | // Standard input format for this class. | |
76 | //////////////////////////////////////////////////////////////////////// | |
77 | ||
78 | ||
79 | *is >> fTracks[0] >> fTracks[1] >> fTracks[2] >> fX >> fZ >> fQ; | |
80 | *is >> fdEdX >> fSigmaX2 >> fSigmaZ2; | |
81 | return; | |
82 | } | |
83 | //---------------------------------------------------------------------- | |
84 | ostream &operator<<(ostream &os,AliITSRecPoint &p){ | |
85 | //////////////////////////////////////////////////////////////////////// | |
86 | // Standard output streaming function. | |
87 | //////////////////////////////////////////////////////////////////////// | |
88 | ||
89 | p.Print(&os); | |
90 | return os; | |
91 | } | |
92 | //---------------------------------------------------------------------- | |
93 | istream &operator>>(istream &is,AliITSRecPoint &r){ | |
94 | //////////////////////////////////////////////////////////////////////// | |
95 | // Standard input streaming function. | |
96 | //////////////////////////////////////////////////////////////////////// | |
97 | ||
98 | r.Read(&is); | |
99 | return is; | |
100 | } | |
101 | //---------------------------------------------------------------------- |