Possibility to not write syswatch info to file (default)
[u/mrichter/AliRoot.git] / STEER / ESD / AliESDVZEROfriend.h
CommitLineData
b090e6a3 1#ifndef ALIESDVZEROFRIEND_H
2#define ALIESDVZEROFRIEND_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 VZERO DDL raw data
9/// It is written to the ESD-friend file
10///
11///////////////////////////////////////////////////////////////////////////////
12
13#include <TObject.h>
14
15class AliESDVZEROfriend: public TObject {
16 public :
17 AliESDVZEROfriend();
18 virtual ~AliESDVZEROfriend();
19
20 AliESDVZEROfriend(const AliESDVZEROfriend& vzerofriend);
21 AliESDVZEROfriend& operator = (const AliESDVZEROfriend& vzerofriend);
22
23 void Reset();
24
25// Getters of various scalers and Minimum Bias flags :
26
27 ULong64_t GetBBScalers(Int_t channel) const
28 { return fBBScalers[channel]; }
29 ULong64_t GetBGScalers(Int_t channel) const
30 { return fBGScalers[channel]; }
31 UInt_t GetTriggerScalers(Int_t num_scaler) const
32 { return fScalers[num_scaler]; }
33 UInt_t GetBunchNumbersMB(Int_t num_bunch) const
34 { return fBunchNumbers[num_bunch]; }
35 UShort_t GetChargeMB(Int_t channel, Int_t num_bunch) const
36 { return fChargeMB[channel][num_bunch]; }
37 Bool_t GetIntMBFlag(Int_t channel, Int_t num_bunch) const
38 { return fIsIntMB[channel][num_bunch]; }
39 Bool_t GetBBMBFlag(Int_t channel, Int_t num_bunch) const
40 { return fIsBBMB[channel][num_bunch]; }
41 Bool_t GetBGMBFlag(Int_t channel, Int_t num_bunch) const
42 { return fIsBGMB[channel][num_bunch]; }
43
44// Getters of ADC signals, ADC pedestals, time information and corresponding flags :
45
db0db003 46 Float_t GetADC(Int_t channel) const
b090e6a3 47 { return fADC[channel][kNEvOfInt/2]; }
db0db003 48 Float_t GetPedestal(Int_t channel, Int_t event) const
b090e6a3 49 { return fADC[channel][event]; }
50 Bool_t GetIntegratorFlag(Int_t channel, Int_t event) const
51 { return fIsInt[channel][event]; }
52 Bool_t GetBBFlag(Int_t channel, Int_t event) const
53 { return fIsBB[channel][event]; }
54 Bool_t GetBGFlag(Int_t channel, Int_t event) const
55 { return fIsBG[channel][event]; }
db0db003 56 Float_t GetTime(Int_t channel) const
b090e6a3 57 { return fTime[channel]; }
db0db003 58 Float_t GetWidth(Int_t channel) const
b090e6a3 59 { return fWidth[channel]; }
60
61 // Setters
62 void SetBBScalers(Int_t channel, ULong64_t scalers)
63 { fBBScalers[channel] = scalers; }
64 void SetBGScalers(Int_t channel, ULong64_t scalers)
65 { fBGScalers[channel] = scalers; }
66 void SetTriggerScalers(Int_t num_scaler, UInt_t scaler)
67 { fScalers[num_scaler] = scaler; }
68 void SetBunchNumbersMB(Int_t num_bunch, UInt_t bunch)
69 { fBunchNumbers[num_bunch] = bunch; }
70 void SetChargeMB(Int_t channel,Int_t num_bunch, UShort_t charge)
71 { fChargeMB[channel][num_bunch] = charge; }
72 void SetIntMBFlag(Int_t channel,Int_t num_bunch, Bool_t flag)
73 { fIsIntMB[channel][num_bunch] = flag; }
74 void SetBBMBFlag(Int_t channel,Int_t num_bunch, Bool_t flag)
75 { fIsBBMB[channel][num_bunch] = flag; }
76 void SetBGMBFlag(Int_t channel,Int_t num_bunch, Bool_t flag)
77 { fIsBGMB[channel][num_bunch] = flag; }
78
db0db003 79 void SetPedestal(Int_t channel, Int_t event, Float_t adc)
b090e6a3 80 { fADC[channel][event] = adc; }
81 void SetIntegratorFlag(Int_t channel, Int_t event, Bool_t flag)
82 { fIsInt[channel][event] = flag; }
83 void SetBBFlag(Int_t channel, Int_t event, Bool_t flag)
84 { fIsBB[channel][event] = flag; }
85 void SetBGFlag(Int_t channel, Int_t event, Bool_t flag)
8eb6475a 86 { fIsBG[channel][event] = flag; }
db0db003 87 void SetTime(Int_t channel, Float_t time)
b090e6a3 88 { fTime[channel] = time; }
db0db003 89 void SetWidth(Int_t channel, Float_t width)
b090e6a3 90 { fWidth[channel] = width; }
91
92 UShort_t GetTriggerInputs() const
93 { return fTrigger; }
94 UShort_t GetTriggerInputsMask() const
95 { return fTriggerMask; }
96 void SetTriggerInputs(UShort_t inputs)
97 { fTrigger = inputs; }
98 void SetTriggerInputsMask(UShort_t mask)
99 { fTriggerMask = mask; }
100
101 enum EESDVZEROfriendParams {
102 kNChannels = 64, // number of electronic channels in V0 (FEE numbering)
103 kNEvOfInt = 21, // number of events of interest
104 kNScalers = 16, // number of scalers
105 kNBunches = 10 // number of bunches used in Minimum Bias information
106 };
107
108 private:
109
110 ULong64_t fBBScalers[kNChannels]; // 'Beam-Beam' scalers for all channels
111 ULong64_t fBGScalers[kNChannels]; // 'Beam-Gas' scalers for all channels
112 UInt_t fScalers[kNScalers]; // Trigger scalers
113 UInt_t fBunchNumbers[kNBunches]; // Bunch numbers for the previous 10 MB events
114 UShort_t fChargeMB[kNChannels][kNBunches]; // ADC counts for all channels for the previous 10 MB events
115 Bool_t fIsIntMB[kNChannels][kNBunches]; // 'Integrator' flag for all channels for the previous 10 MB events
116 Bool_t fIsBBMB[kNChannels][kNBunches]; // 'Beam-Beam' flag for all channels for the previous 10 MB events
117 Bool_t fIsBGMB[kNChannels][kNBunches]; // 'Beam-Gas' for all channels for the previous 10 MB events
118
db0db003 119 Float_t fADC[kNChannels][kNEvOfInt]; // ADC counts for all channels and all events of interest
b090e6a3 120 Bool_t fIsInt[kNChannels][kNEvOfInt]; // 'Integrator' flag for all channels
121 Bool_t fIsBB[kNChannels][kNEvOfInt]; // 'Beam-Beam' flag for all channels
122 Bool_t fIsBG[kNChannels][kNEvOfInt]; // 'Beam-Gas' flag for all channels
db0db003 123 Float_t fTime[kNChannels]; // leading time for all channels - from HPTDC - in nanoseconds
124 Float_t fWidth[kNChannels]; // pulse width for all channels - from HPTDC - in nanoseconds
b090e6a3 125
126 UShort_t fTrigger; // VZERO trigger inputs
127 UShort_t fTriggerMask; // VZERO trigger inputs mask
128
db0db003 129 ClassDef(AliESDVZEROfriend, 2) // container class for VZERO DDL raw data
b090e6a3 130};
131
132#endif