]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSRecPoint.cxx
Update class version number
[u/mrichter/AliRoot.git] / ITS / AliITSRecPoint.cxx
CommitLineData
ee84ac37 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
88cb7938 16/* $Id$ */
d9f43611 17
e8189707 18////////////////////////////////////////////////
19// Reconstructed point class for set:ITS //
20////////////////////////////////////////////////
21
22
23#include "AliITSRecPoint.h"
e8189707 24ClassImp(AliITSRecPoint)
9671cc24 25
26AliITSRecPoint::AliITSRecPoint() {
27 // default creator
28 fTracks[0]=fTracks[1]=fTracks[2]=-3;
29 fX=fZ=fQ=fdEdX=0.;
30 fSigmaX2=fSigmaZ2=0.;
ee84ac37 31}
32//----------------------------------------------------------------------
33void AliITSRecPoint::Print(ostream *os){
34 ////////////////////////////////////////////////////////////////////////
35 // Standard output format for this class.
36 ////////////////////////////////////////////////////////////////////////
37#if defined __GNUC__
38#if __GNUC__ > 2
39 ios::fmtflags fmt;
40#else
41 Int_t fmt;
42#endif
43#else
9f69211c 44#if defined __ICC || defined __ECC || defined __xlC__
ee84ac37 45 ios::fmtflags fmt;
46#else
47 Int_t fmt;
48#endif
49#endif
50
51 fmt = os->setf(ios::fixed); // set fixed floating point output
52 *os << fTracks[0]<< " " << fTracks[1] << " " << fTracks[2] << " ";
53 *os << fX << " " << fZ << " " << fQ << " ";
54 fmt = os->setf(ios::scientific); // set scientific for dEdX.
55 *os << fdEdX << " ";
56 fmt = os->setf(ios::fixed); // every fixed
57 *os << fSigmaX2 << " " << fSigmaZ2;
58 os->flags(fmt); // reset back to old formating.
59 return;
60}
61//----------------------------------------------------------------------
62void AliITSRecPoint::Read(istream *is){
63////////////////////////////////////////////////////////////////////////
64// Standard input format for this class.
65////////////////////////////////////////////////////////////////////////
66
9671cc24 67
ee84ac37 68 *is >> fTracks[0] >> fTracks[1] >> fTracks[2] >> fX >> fZ >> fQ;
69 *is >> fdEdX >> fSigmaX2 >> fSigmaZ2;
70 return;
71}
72//----------------------------------------------------------------------
73ostream &operator<<(ostream &os,AliITSRecPoint &p){
74////////////////////////////////////////////////////////////////////////
75// Standard output streaming function.
76////////////////////////////////////////////////////////////////////////
77
78 p.Print(&os);
79 return os;
80}
81//----------------------------------------------------------------------
82istream &operator>>(istream &is,AliITSRecPoint &r){
83////////////////////////////////////////////////////////////////////////
84// Standard input streaming function.
85////////////////////////////////////////////////////////////////////////
86
87 r.Read(&is);
88 return is;
89}
90//----------------------------------------------------------------------