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