Adaption to new fluka common blocks (E. Futo)
[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
16/*
17$Log$
d9f43611 18Revision 1.5 2002/10/14 14:57:00 hristov
19Merging the VirtualMC branch to the main development branch (HEAD)
20
b9d0a01d 21Revision 1.3.12.1 2002/10/14 13:14:08 hristov
22Updating VirtualMC to v3-09-02
23
24Revision 1.4 2002/09/09 17:28:02 nilsen
25Added class iostreamer funcionality and Print and Read functions. cleaned
26up files.
27
ee84ac37 28*/
e8189707 29////////////////////////////////////////////////
30// Reconstructed point class for set:ITS //
31////////////////////////////////////////////////
32
33
34#include "AliITSRecPoint.h"
e8189707 35ClassImp(AliITSRecPoint)
9671cc24 36
37AliITSRecPoint::AliITSRecPoint() {
38 // default creator
39 fTracks[0]=fTracks[1]=fTracks[2]=-3;
40 fX=fZ=fQ=fdEdX=0.;
41 fSigmaX2=fSigmaZ2=0.;
ee84ac37 42}
43//----------------------------------------------------------------------
44void 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
d9f43611 55#if defined __ICC || defined __ECC
ee84ac37 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//----------------------------------------------------------------------
73void AliITSRecPoint::Read(istream *is){
74////////////////////////////////////////////////////////////////////////
75// Standard input format for this class.
76////////////////////////////////////////////////////////////////////////
77
9671cc24 78
ee84ac37 79 *is >> fTracks[0] >> fTracks[1] >> fTracks[2] >> fX >> fZ >> fQ;
80 *is >> fdEdX >> fSigmaX2 >> fSigmaZ2;
81 return;
82}
83//----------------------------------------------------------------------
84ostream &operator<<(ostream &os,AliITSRecPoint &p){
85////////////////////////////////////////////////////////////////////////
86// Standard output streaming function.
87////////////////////////////////////////////////////////////////////////
88
89 p.Print(&os);
90 return os;
91}
92//----------------------------------------------------------------------
93istream &operator>>(istream &is,AliITSRecPoint &r){
94////////////////////////////////////////////////////////////////////////
95// Standard input streaming function.
96////////////////////////////////////////////////////////////////////////
97
98 r.Read(&is);
99 return is;
100}
101//----------------------------------------------------------------------