Line data Source code
1 : #ifndef ALIESDADFRIEND_H
2 : #define ALIESDADFRIEND_H
3 : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 : * See cxx source for full Copyright notice */
5 :
6 : ///////////////////////////////////////////////////////////////////////////////
7 : ///
8 : /// This is a class for containing all the AD DDL raw data
9 : /// It is written to the ESD-friend file
10 : ///
11 : ///////////////////////////////////////////////////////////////////////////////
12 :
13 : #include <TObject.h>
14 :
15 : class AliESDADfriend: public TObject {
16 : public :
17 : AliESDADfriend();
18 : virtual ~AliESDADfriend();
19 :
20 : AliESDADfriend(const AliESDADfriend& adfriend);
21 : AliESDADfriend& operator = (const AliESDADfriend& adfriend);
22 :
23 : void Reset();
24 :
25 : // Getters of various scalers and Minimum Bias flags :
26 :
27 : ULong64_t GetBBScalers(Int_t channel) const
28 0 : { return fBBScalers[channel]; }
29 : ULong64_t GetBGScalers(Int_t channel) const
30 0 : { return fBGScalers[channel]; }
31 : UInt_t GetTriggerScalers(Int_t num_scaler) const
32 0 : { return fScalers[num_scaler]; }
33 :
34 :
35 : // Getters of ADC signals, ADC pedestals, time information and corresponding flags :
36 :
37 : Float_t GetADC(Int_t channel) const
38 0 : { return fADC[channel][kNEvOfInt/2]; }
39 : Float_t GetPedestal(Int_t channel, Int_t event) const
40 0 : { return fADC[channel][event]; }
41 : Bool_t GetIntegratorFlag(Int_t channel, Int_t event) const
42 0 : { return fIsInt[channel][event]; }
43 : Bool_t GetBBFlag(Int_t channel, Int_t event) const
44 0 : { return fIsBB[channel][event]; }
45 : Bool_t GetBGFlag(Int_t channel, Int_t event) const
46 0 : { return fIsBG[channel][event]; }
47 : Float_t GetTime(Int_t channel) const
48 0 : { return fTime[channel]; }
49 : Float_t GetWidth(Int_t channel) const
50 0 : { return fWidth[channel]; }
51 :
52 : // Setters
53 : void SetBBScalers(Int_t channel, ULong64_t scalers)
54 0 : { fBBScalers[channel] = scalers; }
55 : void SetBGScalers(Int_t channel, ULong64_t scalers)
56 0 : { fBGScalers[channel] = scalers; }
57 : void SetTriggerScalers(Int_t num_scaler, UInt_t scaler)
58 0 : { fScalers[num_scaler] = scaler; }
59 :
60 : void SetPedestal(Int_t channel, Int_t event, Float_t adc)
61 0 : { fADC[channel][event] = adc; }
62 : void SetIntegratorFlag(Int_t channel, Int_t event, Bool_t flag)
63 0 : { fIsInt[channel][event] = flag; }
64 : void SetBBFlag(Int_t channel, Int_t event, Bool_t flag)
65 0 : { fIsBB[channel][event] = flag; }
66 : void SetBGFlag(Int_t channel, Int_t event, Bool_t flag)
67 0 : { fIsBG[channel][event] = flag; }
68 : void SetTime(Int_t channel, Float_t time)
69 0 : { fTime[channel] = time; }
70 : void SetWidth(Int_t channel, Float_t width)
71 0 : { fWidth[channel] = width; }
72 :
73 : UShort_t GetTriggerInputs() const
74 0 : { return fTrigger; }
75 : UShort_t GetTriggerInputsMask() const
76 0 : { return fTriggerMask; }
77 : void SetTriggerInputs(UShort_t inputs)
78 0 : { fTrigger = inputs; }
79 : void SetTriggerInputsMask(UShort_t mask)
80 0 : { fTriggerMask = mask; }
81 :
82 : enum EESDADfriendParams {
83 : kNChannels = 16, // number of electronic channels in AD (FEE numbering)
84 : kNEvOfInt = 21, // number of events of interest
85 : kNScalers = 16, // number of scalers
86 : };
87 :
88 : private:
89 :
90 : ULong64_t fBBScalers[kNChannels]; // 'Beam-Beam' scalers for all channels
91 : ULong64_t fBGScalers[kNChannels]; // 'Beam-Gas' scalers for all channels
92 : UInt_t fScalers[kNScalers]; // Trigger scalers
93 :
94 : Float_t fADC[kNChannels][kNEvOfInt]; // ADC counts for all channels and all events of interest
95 : Bool_t fIsInt[kNChannels][kNEvOfInt]; // 'Integrator' flag for all channels
96 : Bool_t fIsBB[kNChannels][kNEvOfInt]; // 'Beam-Beam' flag for all channels
97 : Bool_t fIsBG[kNChannels][kNEvOfInt]; // 'Beam-Gas' flag for all channels
98 : Float_t fTime[kNChannels]; // leading time for all channels - from HPTDC - in nanoseconds
99 : Float_t fWidth[kNChannels]; // pulse width for all channels - from HPTDC - in nanoseconds
100 :
101 : UShort_t fTrigger; // AD trigger inputs
102 : UShort_t fTriggerMask; // AD trigger inputs mask
103 :
104 180 : ClassDef(AliESDADfriend, 2) // container class for AD DDL raw data
105 : };
106 :
107 : #endif
|