Project
Loading...
Searching...
No Matches
FeeDCS.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
12#ifndef ALICEO2_EMCAL_FEEDCS_H_
13#define ALICEO2_EMCAL_FEEDCS_H_
14
15#include <memory>
16#include <iosfwd>
17#include <array>
18#include <Rtypes.h>
19#include <bitset>
20
22
23namespace o2
24{
25
26namespace emcal
27{
28
29const Int_t kNTRU = 46; // this
30
31class FeeDCS
32{
33
34 public:
36 FeeDCS() = default;
37
39 ~FeeDCS() = default;
40
42 FeeDCS(const FeeDCS& fee) = default;
43
45 FeeDCS& operator=(const FeeDCS& source) = default;
46
47 bool operator==(const FeeDCS& other) const;
48
49 o2::emcal::TriggerDCS getTriggerDCS() const { return mTrigDCS; }
50 o2::emcal::TriggerTRUDCS getTRUDCS(Int_t iTRU) const { return mTrigDCS.getTRUDCS(iTRU); }
53 std::bitset<32> getDDLlist0() const { return mLinks0; }
54 std::bitset<14> getDDLlist1() const { return mLinks1; }
55 unsigned int getSRUFWversion(int ism = 0) const { return mSRUFWversion.at(ism); }
56 unsigned int getSRUconfig(int ism = 0) const { return mSRUcfg.at(ism); }
57 int getNSRUbuffers(int ism = 0) const { return (mSRUcfg.at(ism) >> 1 & 0x7); }
58 int getRunNumber() const { return mRunNumber; }
59
60 void setTRUDCS(Int_t iTRU, o2::emcal::TriggerTRUDCS tru) { mTrigDCS.setTRU(iTRU, tru); }
62 void setSTUDCal(o2::emcal::TriggerSTUDCS stu) { mTrigDCS.setSTUDCal(stu); }
63 void setDDLlist0(unsigned int a) { mLinks0 = std::bitset<32>(a); }
64 void setDDLlist1(unsigned int a) { mLinks1 = std::bitset<14>(a); }
65 void setSRUFWversion(int ism, unsigned int ver) { mSRUFWversion.at(ism) = ver; }
66 void setSRUconfig(int ism, unsigned int ver) { mSRUcfg.at(ism) = ver; }
67 void setRunNumber(int rn) { mRunNumber = rn; }
68
69 bool isDDLactive(int iDDL) { return (iDDL < 32 ? mLinks0.test(iDDL) : mLinks1.test(iDDL - 32)); }
70 bool isSMactive(int iSM);
71 bool isEMCalSTUactive() { return mLinks1.test(12); } // EMCAL STU FEEID is 44
72 bool isDCalSTUactive() { return mLinks1.test(13); } // EMCAL STU FEEID is 45
73
74 private:
75 int mRunNumber = 0;
76 o2::emcal::TriggerDCS mTrigDCS;
77 std::bitset<32> mLinks0;
78 std::bitset<14> mLinks1;
79 std::array<unsigned int, 20> mSRUFWversion;
80 std::array<unsigned int, 20> mSRUcfg;
81
82 ClassDefNV(FeeDCS, 1);
83};
84
85std::ostream& operator<<(std::ostream& in, const FeeDCS& dcs);
86
87} // namespace emcal
88
89} // namespace o2
90#endif
o2::emcal::TriggerTRUDCS getTRUDCS(Int_t iTRU) const
Definition FeeDCS.h:50
~FeeDCS()=default
Destructor.
bool isSMactive(int iSM)
Definition FeeDCS.cxx:25
void setSTUEMCal(o2::emcal::TriggerSTUDCS stu)
Definition FeeDCS.h:61
void setSRUconfig(int ism, unsigned int ver)
Definition FeeDCS.h:66
std::bitset< 14 > getDDLlist1() const
Definition FeeDCS.h:54
int getNSRUbuffers(int ism=0) const
Definition FeeDCS.h:57
void setSRUFWversion(int ism, unsigned int ver)
Definition FeeDCS.h:65
unsigned int getSRUFWversion(int ism=0) const
Definition FeeDCS.h:55
bool operator==(const FeeDCS &other) const
Definition FeeDCS.cxx:18
FeeDCS & operator=(const FeeDCS &source)=default
Assignment operator.
bool isDCalSTUactive()
Definition FeeDCS.h:72
bool isDDLactive(int iDDL)
Definition FeeDCS.h:69
void setDDLlist0(unsigned int a)
Definition FeeDCS.h:63
o2::emcal::TriggerSTUDCS getSTUDCSDCal() const
Definition FeeDCS.h:52
bool isEMCalSTUactive()
Definition FeeDCS.h:71
void setTRUDCS(Int_t iTRU, o2::emcal::TriggerTRUDCS tru)
Definition FeeDCS.h:60
o2::emcal::TriggerSTUDCS getSTUDCSEMCal() const
Definition FeeDCS.h:51
int getRunNumber() const
Definition FeeDCS.h:58
FeeDCS(const FeeDCS &fee)=default
copy constructor
std::bitset< 32 > getDDLlist0() const
Definition FeeDCS.h:53
void setSTUDCal(o2::emcal::TriggerSTUDCS stu)
Definition FeeDCS.h:62
FeeDCS()=default
default constructor
o2::emcal::TriggerDCS getTriggerDCS() const
Definition FeeDCS.h:49
unsigned int getSRUconfig(int ism=0) const
Definition FeeDCS.h:56
void setRunNumber(int rn)
Definition FeeDCS.h:67
void setDDLlist1(unsigned int a)
Definition FeeDCS.h:64
CCDB container for the DCS data in EMCAL.
Definition TriggerDCS.h:37
void setTRU(Int_t iTRU, TriggerTRUDCS a)
Definition TriggerDCS.h:71
TriggerSTUDCS getSTUDCSEMCal() const
Definition TriggerDCS.h:67
void setSTUEMCal(TriggerSTUDCS so)
Definition TriggerDCS.h:62
TriggerSTUDCS getSTUDCSDCal() const
Definition TriggerDCS.h:68
void setSTUDCal(TriggerSTUDCS so)
Definition TriggerDCS.h:63
TriggerTRUDCS getTRUDCS(Int_t iTRU) const
Definition TriggerDCS.h:69
CCDB container for STU DCS data in EMCAL.
CCDB container for TRU DCS data in EMCAL.
GLsizei GLsizei GLchar * source
Definition glcorearb.h:798
GLboolean GLboolean GLboolean GLboolean a
Definition glcorearb.h:1233
std::ostream & operator<<(std::ostream &stream, const Cell &cell)
Stream operator for EMCAL cell.
Definition Cell.cxx:355
const Int_t kNTRU
Definition FeeDCS.h:29
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
VectorOfTObjectPtrs other