]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSdigit.cxx
Corrected deletion, additional protection
[u/mrichter/AliRoot.git] / ITS / AliITSdigit.cxx
CommitLineData
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 //
3bd79107 20////////////////////////////////////////////////
ff116811 21#include <TObjArray.h>
22#include <TArrayI.h>
23#include <TArrayF.h>
24#include <TMath.h>
58005f18 25#include "AliITSdigit.h"
3bd79107 26
f8dece8d 27//______________________________________________________________________
58005f18 28ClassImp(AliITSdigit)
f8dece8d 29AliITSdigit::AliITSdigit(const Int_t *digits) {
3bd79107 30 // Creates a real data digit object
f8dece8d 31
3bd79107 32 fCoord1 = digits[0];
33 fCoord2 = digits[1];
34 fSignal = digits[2];
35}
f8dece8d 36//______________________________________________________________________
37void AliITSdigit::Print(ostream *os){
38 //Standard output format for this class
3bd79107 39
f8dece8d 40 *os << fCoord1 <<","<< fCoord2 <<","<< fSignal;
41}
42//______________________________________________________________________
43void AliITSdigit::Read(istream *os){
44 //Standard input for this class
3bd79107 45
f8dece8d 46 *os >> fCoord1 >> fCoord2 >> fSignal;
47}
48//______________________________________________________________________
49ostream &operator<<(ostream &os,AliITSdigit &source){
50 // Standard output streaming function.
51
52 source.Print(&os);
53 return os;
54}
55//______________________________________________________________________
56istream &operator>>(istream &os,AliITSdigit &source){
57 // Standard output streaming function.
58
59 source.Read(&os);
60 return os;
61}
f8dece8d 62
3bd79107 63