]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFFEElightConfig.h
added 0OMU trigger definition
[u/mrichter/AliRoot.git] / TOF / AliTOFFEElightConfig.h
1 #ifndef ALITOFFEELIGHTCONFIG_H
2 #define ALITOFFEELIGHTCONFIG_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 ///////////////////////////////////////////////////////////////
8 //                                                           //
9 //   This classes provide the TOFFEE light config objects.   //
10 //                                                           //
11 //   authors: Roberto Preghenella (R+)                       //
12 //   contacts: preghenella@bo.infn.it                        //
13 //                                                           //
14 ///////////////////////////////////////////////////////////////
15
16 #include "TROOT.h"
17
18 class AliTOFFEEchannelConfig
19 {
20
21  public:
22   enum EStatus_t {
23     kStatusEnabled = 0x1
24   };
25   
26  private:
27   UChar_t fStatus; // status
28   Int_t fMatchingWindow; // matching window [ns]
29   Int_t fLatencyWindow; // latency window [ns]
30
31  public:
32   AliTOFFEEchannelConfig() : fStatus(0x0), fMatchingWindow(0), fLatencyWindow(0) {}; // default construct
33   ~AliTOFFEEchannelConfig() {}; // default destructor
34
35   UChar_t GetStatus() const {return fStatus;}; // get status
36   Int_t GetMatchingWindow() const {return fMatchingWindow;}; // get matching window
37   Int_t GetLatencyWindow() const {return fLatencyWindow;}; // get latency window
38
39   void SetStatus(UChar_t value) {fStatus = value;}; // set status
40   void SetMatchingWindow(Int_t value) {fMatchingWindow = value;}; // set matching window
41   void SetLatencyWindow(Int_t value) {fLatencyWindow = value;}; // set latency window
42
43   Bool_t IsEnabled() const {return (GetStatus() & kStatusEnabled);}; // is enabled
44
45 };
46
47 //_____________________________________________________________________________
48
49 class AliTOFFEEtriggerConfig
50 {
51
52  public:
53   
54  private:
55   UInt_t fStatusMap; // status
56
57  public:
58   AliTOFFEEtriggerConfig() : fStatusMap(0x0) {}; // default construct
59   ~AliTOFFEEtriggerConfig() {}; // default destructor
60
61   UInt_t GetStatusMap() const {return fStatusMap;}; // get status map
62
63   void SetStatusMap(UInt_t value) {fStatusMap = value;}; // set status map
64
65 };
66
67 //_____________________________________________________________________________
68
69 class AliTOFFEElightConfig
70 {
71
72  private:
73   static const Int_t fgkNumberOfChannels = 172800; // number of channels
74   static const Int_t fgkNumberOfTriggerMaps = 72; // number of trigger maps
75   Int_t fVersion; // version
76   Int_t fRunNumber; // run number
77   Int_t fRunType; // run type
78   AliTOFFEEchannelConfig fChannelConfig[fgkNumberOfChannels]; // channel config array
79   AliTOFFEEtriggerConfig fTriggerConfig[fgkNumberOfTriggerMaps]; // trigger config array
80
81  public:
82   AliTOFFEElightConfig() : fVersion(0), fRunNumber(0), fRunType(0), fChannelConfig() {}; // default construct
83   ~AliTOFFEElightConfig() {}; // default destructor
84
85   Int_t GetVersion() const {return fVersion;}; // get version
86   Int_t GetRunNumber() const {return fRunNumber;}; // get run number
87   Int_t GetRunType() const {return fRunType;}; // get run type
88   AliTOFFEEchannelConfig *GetChannelConfig(Int_t i) {return (i < fgkNumberOfChannels ? &fChannelConfig[i] : NULL);}; // get channel config
89   AliTOFFEEtriggerConfig *GetTriggerConfig(Int_t i) {return (i < fgkNumberOfTriggerMaps ? &fTriggerConfig[i] : NULL);}; // get trigger config
90
91   void SetVersion(Int_t value) {fVersion = value;}; // get version
92   void SetRunNumber(Int_t value) {fRunNumber = value;}; // get run number
93   void SetRunType(Int_t value) {fRunType = value;}; // get run type
94
95 };
96
97
98
99 #endif /* ALITOFFEELIGHTCONFIG_H */