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