]>
Commit | Line | Data |
---|---|---|
f8dece8d | 1 | /************************************************************************** |
e869281d | 2 | * Copyright(c) 2004-2006, ALICE Experiment at CERN, All rights reserved. * |
f8dece8d | 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 | **************************************************************************/ | |
88cb7938 | 15 | |
f8dece8d | 16 | /* $Id$ */ |
17 | ||
3bd79107 | 18 | //////////////////////////////////////////////// |
f8dece8d | 19 | // Digits classes for all ITS detectors // |
7d62fb64 | 20 | // // |
21 | // // | |
3bd79107 | 22 | //////////////////////////////////////////////// |
7d62fb64 | 23 | |
58005f18 | 24 | #include "AliITSdigit.h" |
3bd79107 | 25 | |
e56160b8 | 26 | |
f8dece8d | 27 | //______________________________________________________________________ |
58005f18 | 28 | ClassImp(AliITSdigit) |
e56160b8 | 29 | |
30 | AliITSdigit::AliITSdigit(): | |
31 | fCoord1(0), | |
32 | fCoord2(0), | |
33 | fSignal(0){ | |
34 | //default constructor. zero all values. | |
0599a018 | 35 | for(Int_t i=0;i<fgkSize;i++) fTracks[i] = 0; |
36 | for(Int_t i=0;i<fgkSize;i++) fHits[i] = 0; | |
37 | ||
e56160b8 | 38 | } |
39 | ||
40 | ||
41 | AliITSdigit::AliITSdigit(const Int_t *digits): | |
42 | fCoord1(digits[0]), | |
43 | fCoord2(digits[1]), | |
44 | fSignal(digits[2]){ | |
3bd79107 | 45 | // Creates a real data digit object |
0599a018 | 46 | for(Int_t i=0;i<fgkSize;i++) fTracks[i] = 0; |
47 | for(Int_t i=0;i<fgkSize;i++) fHits[i] = 0; | |
48 | ||
f8dece8d | 49 | |
3bd79107 | 50 | } |
f8dece8d | 51 | //______________________________________________________________________ |
7d62fb64 | 52 | void AliITSdigit::Print(ostream *os) { |
f8dece8d | 53 | //Standard output format for this class |
3bd79107 | 54 | |
f8dece8d | 55 | *os << fCoord1 <<","<< fCoord2 <<","<< fSignal; |
56 | } | |
57 | //______________________________________________________________________ | |
7d62fb64 | 58 | void AliITSdigit::Read(istream *os) { |
f8dece8d | 59 | //Standard input for this class |
3bd79107 | 60 | |
f8dece8d | 61 | *os >> fCoord1 >> fCoord2 >> fSignal; |
62 | } | |
63 | //______________________________________________________________________ | |
64 | ostream &operator<<(ostream &os,AliITSdigit &source){ | |
65 | // Standard output streaming function. | |
66 | ||
67 | source.Print(&os); | |
68 | return os; | |
69 | } | |
70 | //______________________________________________________________________ | |
71 | istream &operator>>(istream &os,AliITSdigit &source){ | |
72 | // Standard output streaming function. | |
73 | ||
74 | source.Read(&os); | |
75 | return os; | |
76 | } | |
f8dece8d | 77 | |
3bd79107 | 78 |