]>
Commit | Line | Data |
---|---|---|
d88f97cc | 1 | #ifndef ALISIGNAL_H |
2 | #define ALISIGNAL_H | |
3da30618 | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
f531a546 | 6 | // $Id$ |
3da30618 | 7 | |
959fbac5 | 8 | #include "TObject.h" |
9 | #include "TArrayF.h" | |
c72198f1 | 10 | #include "TH1.h" |
1fbffa23 | 11 | #include "TObjArray.h" |
d0a8ef71 | 12 | #include "TArrayI.h" |
d88f97cc | 13 | |
14 | #include "AliPosition.h" | |
1fbffa23 | 15 | #include "AliAttrib.h" |
d0a8ef71 | 16 | #include "AliObjMatrix.h" |
d88f97cc | 17 | |
965bd237 | 18 | class AliDevice; |
d0120ca2 | 19 | class AliTrack; |
965bd237 | 20 | |
1c01b4f8 | 21 | class AliSignal : public TNamed,public AliPosition,public AliAttrib |
d88f97cc | 22 | { |
23 | public: | |
261c0caf | 24 | AliSignal(); // Default constructor |
25 | virtual ~AliSignal(); // Destructor | |
26 | AliSignal(const AliSignal& s); // Copy constructor | |
27 | virtual TObject* Clone(const char* name="") const; // Make a deep copy and provide its pointer | |
2cb7369d | 28 | virtual void SetSignal(Double_t sig,Int_t j=1); // Store signal value for the j-th slot |
29 | virtual void SetSignal(Double_t sig,TString name); // Store signal value for the name-specified slot | |
30 | virtual void AddSignal(Double_t sig,Int_t j=1); // Add value to the signal of the j-th slot | |
31 | virtual void AddSignal(Double_t sig,TString name); // Add value to the signal of the name-specified slot | |
261c0caf | 32 | virtual Float_t GetSignal(Int_t j=1,Int_t mode=0) const; // Provide j-th (corrected) signal value |
2cb7369d | 33 | virtual Float_t GetSignal(TString name,Int_t mode=0) const; // Provide name-specified (corrected) signal value |
34 | virtual void SetSignalError(Double_t dsig,Int_t j=1); // Store error on the signal of the j-th slot | |
35 | virtual void SetSignalError(Double_t dsig,TString name); // Store error on the signal of the name-specified slot | |
36 | virtual Float_t GetSignalError(Int_t j=1) const; // Provide error on the signal of the j-th slot | |
37 | virtual Float_t GetSignalError(TString name) const; // Provide err. on the sig. of the name-specified slot | |
261c0caf | 38 | virtual void ResetSignals(Int_t mode=0); // Selective reset of signal values and/or errors |
39 | virtual void DeleteSignals(Int_t mode=0); // Selectie delete of signal values and/or errors | |
40 | virtual void Reset(Int_t mode=0); // Reset signal and position values and errors | |
1f241680 | 41 | virtual void Data(TString f="car",TString u="rad") const; // Print all signal info for frame f and ang units u |
261c0caf | 42 | virtual void List(Int_t j=0) const; // Print signal info for the j-th (all) slot(s) |
2cb7369d | 43 | virtual void List(TString name) const; // Print signal info for the name-specified slot |
6a8254a0 | 44 | void ListWaveform(Int_t j=0) const; // Print info for the j-th (all) waveform(s) |
d0120ca2 | 45 | void ListTrack(Int_t j=0) const; // Print info for the j-th (all) assoc. track(s) |
261c0caf | 46 | Int_t GetNvalues() const; // Provide the number of signal values |
47 | Int_t GetNerrors() const; // Provide the number of specified errors | |
5ae71069 | 48 | virtual Int_t GetNslots() const; // Provide the number of exising slots |
261c0caf | 49 | Int_t GetNwaveforms() const; // Provide the number of specified waveforms |
6a8254a0 | 50 | void SetWaveform(TH1F* waveform,Int_t j=1); // Set the histogram for the j-th waveform |
51 | TH1F* GetWaveform(Int_t j=1) const; // Pointer to the histo of the j-th waveform | |
52 | TH1F* GetWaveform(TString name) const; // Pointer to the waveform with the specified name | |
53 | Int_t GetWaveformIndex(TString name) const; // Index of the waveform with the specified name | |
54 | void ResetWaveform(Int_t j=1); // Reset the histo of the j-th waveform | |
55 | void ResetWaveform(TString name); // Reset the waveform histo with the specified name | |
56 | void DeleteWaveform(Int_t j=1); // Delete histo of the j-th waveform | |
57 | void DeleteWaveform(TString name); // Delete waveform histo with the specified name | |
261c0caf | 58 | Int_t GetNlinks(TObject* obj=0,Int_t j=0) const; // Number of links for the specified object |
2cb7369d | 59 | Int_t GetNlinks(TObject* obj,TString name) const; // Number of links for the specified object |
261c0caf | 60 | void SetLink(TObject* obj,Int_t j=1,Int_t k=1); // Link object to the j-th slot at position k |
2cb7369d | 61 | void SetLink(TObject* obj,TString name,Int_t k=1); // Link object to the name-specified slot at pos. k |
261c0caf | 62 | void AddLink(TObject* obj,Int_t j=1); // Link obj to the j-th slot at 1st free position |
2cb7369d | 63 | void AddLink(TObject* obj,TString name); // Link obj to the name-specified slot at 1st free pos. |
261c0caf | 64 | TObject* GetLink(Int_t j=1,Int_t k=1) const; // Pointer of the object linked to the j-th slot |
2cb7369d | 65 | TObject* GetLink(TString name,Int_t k=1) const; // Pointer of object linked to the name-specified slot |
261c0caf | 66 | Int_t GetIndices(TObject* obj,TArrayI& js,TArrayI& ks) const; // Slot and pos. indices for linked objects |
67 | Int_t GetIndices(TObject* obj,Int_t j,TArrayI& ks) const; // Pos. indices for linked objects of j-th slot | |
2cb7369d | 68 | Int_t GetIndices(TObject* obj,TString name,TArrayI& ks) const;// Pos. indices for linked objects of name-spec. slot |
261c0caf | 69 | Int_t GetIndices(TObject* obj,TArrayI& js,Int_t k) const; // Slot indices for linked objects at pos. k |
70 | void ResetLink(Int_t j=1,Int_t k=1); // Reset the link(s) of the j-th slot | |
2cb7369d | 71 | void ResetLink(TString name,Int_t k=1); // Reset the link(s) of the name-specified slot |
261c0caf | 72 | void ResetLinks(TObject* obj,Int_t j=0,Int_t k=0); // Reset link(s) to object obj for j-th slot |
2cb7369d | 73 | void ResetLinks(TObject* obj,TString name,Int_t k=0); // Reset link(s) to object obj for name-specified slot |
261c0caf | 74 | void SetSwapMode(Int_t swap=1); // Set swapmode flag for the link storage |
75 | Int_t GetSwapMode() const; // Provide swapmode flag for the link storage | |
965bd237 | 76 | void SetDevice(TObject* dev); // Store pointer to the device that owns this signal |
77 | AliDevice* GetDevice() const; // Provide pointer to the owning device | |
d0120ca2 | 78 | void AddTrack(AliTrack& t,Int_t mode=1); // Relate an AliTrack to this signal |
79 | void RemoveTrack(AliTrack& t,Int_t mode=1); // Remove related AliTrack from this signal | |
80 | void RemoveTracks(Int_t mode=1); // Remove all related AliTracks from this signal | |
81 | Int_t GetNtracks(AliTrack* t=0) const; // Provide number of related AliTracks | |
82 | AliTrack* GetTrack(Int_t j) const; // Access to the related AliTrack number j | |
83 | AliTrack* GetIdTrack(Int_t id) const; // Access to the related AliTrack with ID=id | |
5ae71069 | 84 | Int_t GetSignalFlag(Int_t j=1) const; // Provide signal value flag of the j-th slot |
85 | Int_t GetSignalFlag(TString name) const; // Provide signal value flag of the name specified slot | |
86 | Int_t GetErrorFlag(Int_t j=1) const; // Provide error value flag of the j-th slot | |
87 | Int_t GetErrorFlag(TString name) const; // Provide error value flag of the name specified slot | |
c72198f1 | 88 | |
d88f97cc | 89 | protected: |
5ae71069 | 90 | void SetSigFlags(Int_t is,Int_t ie,Int_t j); // Set flags for signal and/or error value settings |
1fbffa23 | 91 | TArrayF* fSignals; // Signal values |
92 | TArrayF* fDsignals; // Errors on signal values | |
5ae71069 | 93 | TArrayI* fSigflags; // Flags to mark setting of signal and/or error values |
1fbffa23 | 94 | TObjArray* fWaveforms; // The 1D histograms containing the signal waveforms |
d0a8ef71 | 95 | AliObjMatrix* fLinks; // Pointers of objects related to the various slots |
965bd237 | 96 | TObject* fDevice; // Pointer to the device that owns this signal |
d0120ca2 | 97 | TObjArray* fTracks; // Pointers to associated tracks |
d88f97cc | 98 | |
5ae71069 | 99 | ClassDef(AliSignal,16) // Generic handling of (extrapolated) detector signals. |
d88f97cc | 100 | }; |
101 | #endif |