]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSdigitSPD.h
Coding conventions for AliITSdigitXXX classes and AliITSTrackerV1
[u/mrichter/AliRoot.git] / ITS / AliITSdigitSPD.h
1 #ifndef ALIITSDIGITSPD_H
2 #define ALIITSDIGITSPD_H
3 /* Copyright(c) 2004-2006, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice     */
5
6 #include <AliITSdigit.h>
7
8 //______________________________________________________________________
9 class AliITSdigitSPD: public AliITSdigit {
10
11  public:
12     AliITSdigitSPD(); //default creator
13     AliITSdigitSPD(const Int_t *digits);//standard creator digits only
14     //standard creator with digits, tracks, and hits
15     AliITSdigitSPD(const Int_t *digits,const Int_t *tracks,const Int_t *hits);
16     virtual ~AliITSdigitSPD(){/*destructor*/}
17     // returns the array size used to store Tracks and Hits
18     static Int_t GetNTracks() {return fgkSspd;}
19     // returns the signal in electrons
20     Int_t GetSignalSPD() const {return fSignalSPD;}
21     // returns pointer to the array of tracks which make this digit
22     virtual Int_t *GetTracks() {return &fTracks[0];}
23      //returns the pointer to the array of hits which made this digit
24     virtual Int_t *GetHits() {return &fHits[0];}
25     // returns track number kept in the array element i of fTracks 
26     virtual Int_t GetTrack(Int_t i) const {return fTracks[i];}
27     // returns hit number kept in the array element i of fHits 
28     virtual Int_t GetHit(Int_t i) const {return fHits[i];}
29     // returns TArrayI of unduplicated track numbers (summed over hits).
30     virtual Int_t GetListOfTracks(TArrayI &t);
31     //copy the array trks[fgkSspd] into fTracks
32     virtual void SetTracks(const Int_t *trks){
33         for(Int_t i=0;i<fgkSspd;i++) fTracks[i]=trks[i];}
34     // set signal in electrons
35     void SetSignalSPD(Int_t sig) {fSignalSPD = sig;}
36     //copy the array hits[fgkSspd] into fHits
37     virtual void SetHits(const Int_t *hits){
38         for(Int_t i=0;i<fgkSspd;i++) fHits[i]=hits[i];}
39     //set array element i of fTracks to trk.
40     virtual void SetTrack(Int_t i,Int_t trk){fTracks[i]=trk;}
41     //set array element i of fHits to hit.
42     virtual void SetHit(Int_t i,Int_t hit){fHits[i]=hit;}
43     void Print(ostream *os); // Class ascii print function
44     void Read(istream *os);  // Class ascii read function
45
46  protected:
47     static const Int_t fgkSspd = 10; // size of fTracks and fHits arrays
48     
49     // debugging  -- goes to the dictionary
50     Int_t fTracks[fgkSspd]; //[fgkSspd] tracks making this digit 
51     Int_t fHits[fgkSspd];   //[fgkSspd] hits associated to the tracks
52     Int_t fSignalSPD;   // Signal in electrons
53
54     ClassDef(AliITSdigitSPD,2)   // Simulated digit object for SPD
55
56 };
57 // Input and output functions for standard C++ input/output.
58 ostream &operator<<(ostream &os,AliITSdigitSPD &source);
59 istream &operator>>(istream &os,AliITSdigitSPD &source);
60
61 #endif