AliRoot Core  3dc7879 (3dc7879)
AliEMCALTriggerSTUDCSConfig.h
Go to the documentation of this file.
1 #ifndef ALIEMCALTRIGGERSTUDCSCONFIG_H
2 #define ALIEMCALTRIGGERSTUDCSCONFIG_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 #include "TObject.h"
7 #include <iosfwd>
8 #include <string>
9 
10 class TVector2;
11 class TClonesArray;
12 
13 //________________________________________________
22 //________________________________________________
23 
24 class AliEMCALTriggerSTUDCSConfig : public TObject
25 {
26 
27 public:
28 
29  //________________________________________________
38  //________________________________________________
39 
40  class AliEMCALTriggerSTUTRUErrorCount : public TObject
41  {
42 
43  public:
44 
46  AliEMCALTriggerSTUTRUErrorCount(Int_t time, ULong64_t errorCount) : TObject(), fTime(time), fErrorCount(errorCount) {}
48 
49  virtual Bool_t IsEqual(const TObject *o) const;
50  virtual Int_t Compare(const TObject *o) const;
51 
52  void SetValue(Int_t time, ULong64_t errorcount){ fTime = time; fErrorCount = errorcount; }
53  Int_t GetTime() const { return fTime ; }
54  ULong64_t GetErrorCount() const { return fErrorCount ; }
55 
56  private:
57  Int_t fTime;
58  ULong_t fErrorCount;
59 
61  ClassDef(AliEMCALTriggerSTUTRUErrorCount, 1) ;
63 
64  };
65 
68 
75  bool operator==(const AliEMCALTriggerSTUDCSConfig &other) const;
76 
83  friend std::ostream &operator<<(std::ostream &stream, const AliEMCALTriggerSTUDCSConfig &config);
84 
90  std::string ToJSON() const;
91 
92  void SetG(Int_t vzpar, Int_t ithresh, Int_t val) { fG[vzpar][ithresh] = val; }
93  void SetJ(Int_t vzpar, Int_t ithresh, Int_t val) { fJ[vzpar][ithresh] = val; }
94  void SetRawData(Int_t rd) { fGetRawData = rd; }
95  void SetRegion(Int_t rg) { fRegion = rg; }
96  void SetFw(Int_t fv) { fFw = fv; }
97  void SetPHOSScale(int iscale, int val) { fPHOSScale[iscale] = val; }
98  void SetTRUErrorCounts(Int_t itru, Int_t itime, ULong64_t errorcounts);
99  void SetPatchSize(Int_t size) { fPatchSize =size; }
100  void SetMedianMode(Int_t mode) { fMedian =mode; }
101 
102  Int_t GetG(int vzpar, int ithresh) const { return fG[vzpar][ithresh]; }
103  Int_t GetJ(int vzpar, int ithresh) const { return fJ[vzpar][ithresh]; }
104  Int_t GetRawData() const { return fGetRawData; }
105  Int_t GetRegion() const { return fRegion; }
106  Int_t GetFw() const { return fFw; }
107  Int_t GetPHOSScale(Int_t iscale) const { return fPHOSScale[iscale]; }
108  Int_t GetPatchSize() const { return fPatchSize; }
109  Int_t GetMedianMode() const { return fMedian; }
110 
111  void GetSegmentation(TVector2& v1, TVector2& v2, TVector2& v3, TVector2& v4) const;
112 
113  TClonesArray *GetErrorCountsForTRU(Int_t itru) const;
115 
116 protected:
118 
119 private:
120 
121  Int_t fG[3][2];
122  Int_t fJ[3][2];
123  Int_t fGetRawData;
124  Int_t fRegion;
125  Int_t fFw;
126  Int_t fPHOSScale[4];
127  Int_t fPatchSize;
128  Int_t fMedian;
129  TClonesArray *fTRUErrorCounts[68];
130 
132  ClassDef(AliEMCALTriggerSTUDCSConfig,5) ;
134 
135 };
136 
137 #endif // ALIEMCALTRIGGERSTUDCSCONFIG_H
138 
void SetPHOSScale(int iscale, int val)
AliEMCALTriggerSTUDCSConfig & operator=(const AliEMCALTriggerSTUDCSConfig &cd)
Int_t GetPHOSScale(Int_t iscale) const
virtual Bool_t IsEqual(const TObject *o) const
Checks for equalness according to the time stamp.
Int_t fMedian
1 in case of using EMCAL/DCAL for estimating the median
Int_t GetJ(int vzpar, int ithresh) const
TClonesArray * fTRUErrorCounts[68]
TRU error counts.
std::string ToJSON() const
Serialize object to JSON format.
void SetG(Int_t vzpar, Int_t ithresh, Int_t val)
Int_t GetG(int vzpar, int ithresh) const
bool operator==(const AliEMCALTriggerSTUDCSConfig &other) const
Equalty operator.
friend std::ostream & operator<<(std::ostream &stream, const AliEMCALTriggerSTUDCSConfig &config)
Streaming operator.
void GetSegmentation(TVector2 &v1, TVector2 &v2, TVector2 &v3, TVector2 &v4) const
Get Segmentation.
EMCal trigger STU DCS Config.
Int_t fPatchSize
Jet patch size: 0 for 8x8 and 2 for 16x16.
TClonesArray * GetErrorCountsForTRU(Int_t itru) const
void SetTRUErrorCounts(Int_t itru, Int_t itime, ULong64_t errorcounts)
Set TRU error counts.
Int_t fPHOSScale[4]
PHOS scale factors.
AliEMCALTriggerSTUDCSConfig()
Default constructor.
virtual ~AliEMCALTriggerSTUDCSConfig()
Destructor.
void SetJ(Int_t vzpar, Int_t ithresh, Int_t val)