Project
Loading...
Searching...
No Matches
TriggerTRUDCS.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_TRIGGERTRUDCS_H
12#define ALICEO2_EMCAL_TRIGGERTRUDCS_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 TriggerTRUDCS() = default;
37
39 TriggerTRUDCS(const TriggerTRUDCS& tru) = default;
40
43
45 explicit TriggerTRUDCS(uint64_t selpf,
46 uint64_t l0sel,
47 uint64_t l0cosm,
48 uint64_t gthrl0,
49 uint64_t rlbkstu,
50 uint64_t fw,
51 std::array<uint32_t, 6> maskReg);
52
54 ~TriggerTRUDCS() = default;
55
61 bool operator==(const TriggerTRUDCS& other) const;
62
65 std::string toJSON() const;
66
67 void setSELPF(uint64_t pf) { mSELPF = pf; }
68 void setL0SEL(uint64_t la) { mL0SEL = la; }
69 void setL0COSM(uint64_t lc) { mL0COSM = lc; }
70 void setGTHRL0(uint64_t lg) { mGTHRL0 = lg; }
71 void setMaskReg(uint32_t msk, int pos) { mMaskReg[pos] = msk; }
72 void setRLBKSTU(uint64_t rb) { mRLBKSTU = rb; }
73 void setFw(uint64_t fw) { mFw = fw; }
74
75 uint64_t getSELPF() const { return mSELPF; }
76 uint64_t getL0SEL() const { return mL0SEL; }
77 uint64_t getL0COSM() const { return mL0COSM; }
78 uint64_t getGTHRL0() const { return mGTHRL0; }
79 uint32_t getMaskReg(int pos) const { return mMaskReg[pos]; }
80 uint64_t getRLBKSTU() const { return mRLBKSTU; }
81 uint64_t getFw() const { return mFw; }
82
83 //int getSegmentation();
84
93 void PrintStream(std::ostream& stream) const;
94
95 private:
96 uint64_t mSELPF = 0x1e1f;
97 uint64_t mL0SEL = 0x1;
98 uint64_t mL0COSM = 0;
99 uint64_t mGTHRL0 = 0;
100 std::array<uint32_t, 6> mMaskReg;
101 uint64_t mRLBKSTU = 0;
102 uint64_t mFw = 0x21;
103
104 ClassDefNV(TriggerTRUDCS, 1);
105};
106
111std::ostream& operator<<(std::ostream& in, const TriggerTRUDCS& tru);
112
113} // namespace emcal
114
115} // namespace o2
116
117#endif
uint16_t pos
Definition RawData.h:3
CCDB container for TRU DCS data in EMCAL.
void setL0SEL(uint64_t la)
~TriggerTRUDCS()=default
Destructor.
uint64_t getSELPF() const
uint64_t getGTHRL0() const
TriggerTRUDCS(const TriggerTRUDCS &tru)=default
copy constructor
uint64_t getRLBKSTU() const
uint64_t getL0COSM() const
void setL0COSM(uint64_t lc)
void setGTHRL0(uint64_t lg)
uint32_t getMaskReg(int pos) const
std::string toJSON() const
Serialize object to JSON format.
void setFw(uint64_t fw)
bool operator==(const TriggerTRUDCS &other) const
Comparison of two TRU data.
void PrintStream(std::ostream &stream) const
Print TRUs on a given stream.
TriggerTRUDCS()=default
default constructor
void setSELPF(uint64_t pf)
void setRLBKSTU(uint64_t rb)
uint64_t getL0SEL() const
TriggerTRUDCS & operator=(const TriggerTRUDCS &source)=default
Assignment operator.
uint64_t getFw() const
void setMaskReg(uint32_t msk, int pos)
GLsizei GLsizei GLchar * source
Definition glcorearb.h:798
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