Project
Loading...
Searching...
No Matches
FeeDCS.cxx
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#include <sstream>
13
14#include "EMCALCalib/FeeDCS.h"
15
16using namespace o2::emcal;
17
19{
20
21 return ((mTrigDCS == other.mTrigDCS) && (mLinks0 == other.mLinks0) && (mLinks1 == other.mLinks1) &&
22 (mSRUFWversion == other.mSRUFWversion) && (mSRUcfg == other.mSRUcfg) && (mRunNumber == other.mRunNumber));
23}
24
25bool FeeDCS::isSMactive(int iSM)
26{
27
28 // assert(iSM>19 && "SM index larger than 19!");
29
30 if (iSM == 10 || iSM == 19) { // SMs 10 and 19 have 1 DDL each
31 return isDDLactive(2 * iSM);
32 } else {
33 return (isDDLactive(2 * iSM) && isDDLactive(2 * iSM + 1));
34 }
35
36 return false;
37}
38
39std::ostream& o2::emcal::operator<<(std::ostream& stream, const FeeDCS& dcs)
40{
41 stream << "================================\n";
42 stream << "EMCAL FEE config for run #" << std::dec << dcs.getRunNumber() << ": \n ";
43 stream
44 << "DDL Link list0: b'"
45 << std::hex
46 << dcs.getDDLlist0()
47 << std::endl;
48 stream << "DDL Link list1: b'" << std::hex << dcs.getDDLlist1() << std::endl;
49
50 for (int i = 0; i < 20; i++) {
51 stream << "SM" << std::dec << i << ": FW=0x" << std::hex << dcs.getSRUFWversion(i) << ", CFG=0x" << std::hex << dcs.getSRUconfig(i) << " [MEB=" << std::dec << dcs.getNSRUbuffers() << "] " << std::endl;
52 }
54 stream << trg << std::endl;
55
56 return stream;
57}
int32_t i
bool isSMactive(int iSM)
Definition FeeDCS.cxx:25
std::bitset< 14 > getDDLlist1() const
Definition FeeDCS.h:54
int getNSRUbuffers(int ism=0) const
Definition FeeDCS.h:57
unsigned int getSRUFWversion(int ism=0) const
Definition FeeDCS.h:55
bool operator==(const FeeDCS &other) const
Definition FeeDCS.cxx:18
bool isDDLactive(int iDDL)
Definition FeeDCS.h:69
int getRunNumber() const
Definition FeeDCS.h:58
std::bitset< 32 > getDDLlist0() const
Definition FeeDCS.h:53
o2::emcal::TriggerDCS getTriggerDCS() const
Definition FeeDCS.h:49
unsigned int getSRUconfig(int ism=0) const
Definition FeeDCS.h:56
CCDB container for the DCS data in EMCAL.
Definition TriggerDCS.h:37
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
VectorOfTObjectPtrs other