]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSChannelDaSSD.h
Remove unnecessary warning message in case the raw-data payload size in CDH is not...
[u/mrichter/AliRoot.git] / ITS / AliITSChannelDaSSD.h
CommitLineData
f67db810 1#ifndef ALIITSCHANNELDASSD_H
2#define ALIITSCHANNELDASSD_H
3
223dda26 4/* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6/* */
7/* $Id$ */
8
9///////////////////////////////////////////////////////////////////////////////
10///
11/// This class provides storage container ITS SSD channel callibration data
12/// used by DA.
13///
14///////////////////////////////////////////////////////////////////////////////
f67db810 15
f67db810 16#include "TMath.h"
17#include "TObject.h"
18
223dda26 19
f67db810 20class AliITSChannelDaSSD : public TObject {
21 public :
22 AliITSChannelDaSSD();
23 explicit AliITSChannelDaSSD(const UShort_t stripId);
24 AliITSChannelDaSSD(const UShort_t stripId, const Long_t eventsnumber);
25 AliITSChannelDaSSD(const AliITSChannelDaSSD& strip);
26 AliITSChannelDaSSD& operator = (const AliITSChannelDaSSD& strip);
27 virtual ~AliITSChannelDaSSD();
28
29 UShort_t GetStripId() const { return fStripId; }
30 Long_t GetEventsNumber() const { return fEventsNumber; }
31 Short_t* GetSignal() const { return fSignal; }
32 Short_t* GetSignal(const Long_t eventnumber) const
33 { return (eventnumber < fEventsNumber && fSignal) ? (fSignal+eventnumber) : NULL; }
34
35 Float_t GetPedestal() const { return fPedestal; }
36 Float_t GetNoise() const { return fNoise; }
37 Bool_t CheckNoise() const { return (fNoise < fgkUndefinedValue) ? kTRUE : kFALSE; }
38
39 UChar_t GetFeeOffset() const { return (fPedestal < fgkUndefinedValue) ? (static_cast<UChar_t>(TMath::Nint(fPedestal))) : 0; }
40 UChar_t GetFeeZs() const { return (fNoise < fgkUndefinedValue) ?
41 (static_cast<UChar_t>(fZsThresholdFactor * TMath::Nint(fNoise))) : 0; }
42 Bool_t SetEvenetsNumber(const Long_t eventsnumber);
43 Bool_t SetSignal(const Long_t eventnumber, const Short_t signal);
44 void SetStripId(const UShort_t stripId) { fStripId = stripId; }
45
46 void SetPedestal(Float_t pedestal) { fPedestal = pedestal; }
47 void SetNoise(Float_t noise) { fNoise = noise; }
48 void ClearNoise() { if (fNoise < fgkUndefinedValue) fNoise = fgkUndefinedValue; }
49 void ClearPedestal() { if (fPedestal < fgkUndefinedValue) fPedestal = fgkUndefinedValue; }
50 void ClearSignal() { if (fSignal) for (Int_t i = 0; i < fEventsNumber; i++)
51 fSignal[i] = 0x100 * fgkDefaultSignal + fgkDefaultSignal; }
52 void DeleteSignal() { if (fSignal) { delete [] fSignal; fSignal = NULL; fEventsNumber = 0;} }
53
54 static Short_t GetOverflowConst() { return fgkSignalOverflow; }
55 static Short_t GetUnderflowConst() { return fgkSignalUnderflow; }
56 static Float_t GetUndefinedValue() { return fgkUndefinedValue; }
57
58 protected :
223dda26 59 static const UShort_t fgkMinStripId = 0; // minimum strip id
60 static const UShort_t fgkMaxStripId = 1535; // maximum strip id
f67db810 61
223dda26 62 static const Short_t fgkSignalOverflow = 2047; // ADC overflow value
63 static const Short_t fgkSignalUnderflow = 2048; // ADC underflow value
64 static const UShort_t fgkDefaultSignal = 0x7F; // initialization value for fNoise, fPedestal, fSignal[i]
65 static const Float_t fgkUndefinedValue; // constant value which indicates that fNoise, fPedestal is undefined
66
f67db810 67 UShort_t fStripId; // channel = strip number within SSD module 0-1535
68 Long_t fEventsNumber; // number of events for fSignal memory allocation
69 Short_t *fSignal; //!
70
223dda26 71 Float_t fPedestal; // pedestal
72 Float_t fNoise; // noise
f67db810 73
74 Float_t fZsThresholdFactor; // factor for zero suppression threshold
75
76 ClassDef(AliITSChannelDaSSD, 1)
77};
78
79#endif