]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSpListItem.h
changed the order of call of endofcycle so that images are produced
[u/mrichter/AliRoot.git] / ITS / AliITSpListItem.h
CommitLineData
fb4e90e0 1#ifndef ALIITSPLISTITEM_H
2#define ALIITSPLISTITEM_H
5ff02a9a 3/* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
fb4e90e0 4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8#include <TObject.h>
9
10
11class AliITSpListItem: public TObject {
12 public:
13 // Default Constructor
14 AliITSpListItem();
15 // Standard Signal Constructor
16 AliITSpListItem(Int_t track,Int_t hit,Int_t module,Int_t index,
17 Double_t signal);
18 // Standard Noise Constructor
19 AliITSpListItem(Int_t module,Int_t index,Double_t signal);
20 // Class destrutor
21 virtual ~AliITSpListItem();
22 // Copy Oporator
e56160b8 23 AliITSpListItem(const AliITSpListItem &source);
5ff02a9a 24 // = Operator
fb4e90e0 25 virtual AliITSpListItem& operator=(const AliITSpListItem &source);
5ff02a9a 26 // Building methods: they set completely the status of the object
27 void Build(Int_t module,Int_t index,Double_t noise);
28 void Build(Int_t track,Int_t hit,Int_t module,Int_t index,Double_t signal);
29 void Build(const AliITSpListItem &source);
fb4e90e0 30 // Returns the signal value in the list of signals
31 virtual Double_t GetSignal(Int_t i) const {
32 return ( (i>=0&&i<fgksize) ? fSignal[i] : 0.0);}
33 virtual Double_t GetSignal() const {
34 return fTsignal;}
35 virtual Double_t GetSignalAfterElect() const {
36 return fSignalAfterElect;}
37 // Returns the Sum/Total signal
38 virtual Double_t GetSumSignal() const {return fTsignal+fNoise;}
39 // Returns the noise
40 virtual Double_t GetNoise() const {return fNoise;}
41 // Returns the number of stored singals.
42 virtual Int_t GetNsignals() const {return fgksize;}
43 // Addes track number and signal to this existing list.
44 virtual void AddSignal(Int_t track,Int_t hit,Int_t module,
45 Int_t index,Double_t signal);
46 // Adds signal after electronics to this existing list.
47 virtual void AddSignalAfterElect(Int_t module,Int_t index,Double_t signal);
48 // Addes noise to this existing list.
49 virtual void AddNoise(Int_t module,Int_t index,Double_t noise);
50 // Returns track number.
51 virtual Int_t GetTrack(Int_t i) const {
52 return ((i>=0&&i<fgksize) ? fTrack[i] : 0);}
53 // Returns hit number.
54 virtual Int_t GetHit(Int_t i) const {
55 return ((i>=0&&i<fgksize) ? fHits[i] : 0);}
56 // Returns module number.
57 virtual Int_t GetModule() const {
58 return fmodule;}
59 // Returns index number.
60 virtual Int_t GetIndex() const {
61 return findex;}
62 // Adds the contents of pl to this
63 virtual void Add(AliITSpListItem *pl);
64 // Adds the contents of pl to this with track number off set given by
65 // fileIndex.
66 virtual void AddTo(Int_t fileIndex,AliITSpListItem *pl);
67 // Shift an index number to occupy the upper four bits.
68 virtual Int_t ShiftIndex(Int_t in,Int_t trk) const;
69 // Standard ascii class print function
70 void Print(ostream *os) const;
71 // Standard ascii class read function
72 void Read(istream *is);
d2f55a22 73 virtual void Print(Option_t *option="") const {TObject::Print(option);}
74 virtual Int_t Read(const char *name) {return TObject::Read(name);}
5ff02a9a 75 // Check if the item is used or marked as unused
76 Bool_t IsUsed() const {return fUsed;}
77 // Mark the object as unused
78 void MarkUnused() {fUsed = kFALSE;}
fb4e90e0 79 // Returns max size of array for for Tracks, Hits, and signals.
80 static Int_t GetMaxKept() {return fgksize;};
81
82 private:
83 static const Int_t fgksize = 10; // Array sizes
84 Int_t fmodule; // module number
85 Int_t findex; // Strip/row,col number linearlized.
86 Int_t fTrack[fgksize]; //[fgksize] track Number
87 Int_t fHits[fgksize]; //[fgksize] hit number
88 Double_t fSignal[fgksize]; //[fgksize] Signals
89 Double_t fTsignal; // Total signal (no noise)
90 Double_t fNoise; // Total noise, coupling, ...
91 Double_t fSignalAfterElect; // Signal after electronics
5ff02a9a 92 Bool_t fUsed; //! kTRUE if the item is built and in use
fb4e90e0 93
5ff02a9a 94 ClassDef(AliITSpListItem,4) // Item list of signals and track numbers
fb4e90e0 95};
96// Input and output functions for standard C++ input/output.
97ostream & operator<<(ostream &os,AliITSpListItem &source);
98istream & operator>>(istream &is,AliITSpListItem &source);
99
100
101#endif