Project
Loading...
Searching...
No Matches
TriggerSTUDCS.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11#ifndef ALICEO2_EMCAL_TRIGGERSTUDCS_H
12#define ALICEO2_EMCAL_TRIGGERSTUDCS_H
13
14#include <iosfwd>
15#include <array>
16#include <Rtypes.h>
17
18namespace o2
19{
20
21namespace emcal
22{
23
31
33{
34 public:
36 TriggerSTUDCS() = default;
37
39 TriggerSTUDCS(const TriggerSTUDCS& stu) = default;
40
43
45 explicit TriggerSTUDCS(std::array<int, 3> Gammahigh,
46 std::array<int, 3> Jethigh,
47 std::array<int, 3> Gammalow,
48 std::array<int, 3> Jetlow,
49 int rawData,
50 int region,
51 int fw,
52 int patchSize,
53 int median,
54 std::array<int, 4> phosScale);
55
57 ~TriggerSTUDCS() = default;
58
64 bool operator==(const TriggerSTUDCS& other) const;
65
68 std::string toJSON() const;
69
70 void setGammaHigh(int vzpar, int val) { mGammaHigh[vzpar] = val; }
71 void setJetHigh(int vzpar, int val) { mJetHigh[vzpar] = val; }
72 void setGammaLow(int vzpar, int val) { mGammaLow[vzpar] = val; }
73 void setJetLow(int vzpar, int val) { mJetLow[vzpar] = val; }
74 void setRawData(int rd) { mGetRawData = rd; }
75 void setRegion(int rg) { mRegion = rg; }
76 void setFw(int fv) { mFw = fv; }
77 void setPHOSScale(int iscale, int val) { mPHOSScale[iscale] = val; }
78 void setPatchSize(int size) { mPatchSize = size; }
79 void setMedianMode(int mode) { mMedian = mode; }
80
81 int getGammaHigh(int vzpar) const { return mGammaHigh[vzpar]; }
82 int getJetHigh(int vzpar) const { return mJetHigh[vzpar]; }
83 int getGammaLow(int vzpar) const { return mGammaLow[vzpar]; }
84 int getJetLow(int vzpar) const { return mJetLow[vzpar]; }
85 int getRawData() const { return mGetRawData; }
86 int getRegion() const { return mRegion; }
87 int getFw() const { return mFw; }
88 int getPHOSScale(int iscale) const { return mPHOSScale[iscale]; }
89 int getPatchSize() const { return mPatchSize; }
90 int getMedianMode() const { return mMedian; }
91
92 //void getSegmentation(TVector2& v1, TVector2& v2, TVector2& v3, TVector2& v4) const;
93
102 void PrintStream(std::ostream& stream) const;
103
104 private:
105 std::array<int, 3> mGammaHigh;
106 std::array<int, 3> mJetHigh;
107 std::array<int, 3> mGammaLow;
108 std::array<int, 3> mJetLow;
109 int mGetRawData = 1;
110 int mRegion = 0xFFFFFFFF;
111 int mFw = 0x2A012;
112 std::array<int, 4> mPHOSScale;
113 int mPatchSize = 0;
114 int mMedian = 0;
115
116 ClassDefNV(TriggerSTUDCS, 1);
117};
118
123std::ostream& operator<<(std::ostream& in, const TriggerSTUDCS& stu);
124
125} // namespace emcal
126
127} // namespace o2
128
129#endif
CCDB container for STU DCS data in EMCAL.
void setPatchSize(int size)
int getJetHigh(int vzpar) const
void setGammaHigh(int vzpar, int val)
void PrintStream(std::ostream &stream) const
Print STUs on a given stream.
void setPHOSScale(int iscale, int val)
int getPHOSScale(int iscale) const
std::string toJSON() const
Serialize object to JSON format.
~TriggerSTUDCS()=default
Destructor.
int getJetLow(int vzpar) const
void setJetHigh(int vzpar, int val)
TriggerSTUDCS & operator=(const TriggerSTUDCS &source)=default
Assignment operator.
int getGammaLow(int vzpar) const
bool operator==(const TriggerSTUDCS &other) const
Comparison of two STU data.
void setMedianMode(int mode)
TriggerSTUDCS(const TriggerSTUDCS &stu)=default
copy constructor
void setGammaLow(int vzpar, int val)
TriggerSTUDCS()=default
default constructor
void setJetLow(int vzpar, int val)
int getGammaHigh(int vzpar) const
GLenum mode
Definition glcorearb.h:266
GLsizeiptr size
Definition glcorearb.h:659
GLsizei GLsizei GLchar * source
Definition glcorearb.h:798
GLuint GLfloat * val
Definition glcorearb.h:1582
GLuint GLuint stream
Definition glcorearb.h:1806
std::ostream & operator<<(std::ostream &stream, const Cell &cell)
Stream operator for EMCAL cell.
Definition Cell.cxx:355
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
VectorOfTObjectPtrs other
std::random_device rd