ATLAS Offline Software
LutCam.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include <iostream>
7 #include <iomanip>
8 
9 using namespace std;
10 using namespace TrigConf;
11 
12 LutCam::LutCam() : L1DataBaseclass() {
13  // init vectors with zeros
14  m_lut = std::vector<uint32_t>(ALL_LUT_SIZE,0);
15  m_cam = std::vector<uint32_t>(ALL_CAM_SIZE,0);
16 }
17 
18 const std::vector<uint32_t> &
19 LutCam::lut() const {
20  return m_lut;
21 }
22 
23 void
24 LutCam::setLut(const u_int l[], const int size) {
25  // set vector element with range checking - or check range before?
26  for (int i=0; i<size; i++) m_lut.at(i) = l[i];
27 }
28 
29 const std::vector<uint32_t> &
30 LutCam::cam() const {
31  return m_cam;
32 }
33 
34 void
35 LutCam::setCam(const u_int c[], const int size) {
36  // set vector element with range checking
37  for (int i=0; i<size; i++) m_cam.at(i) = c[i];
38 }
39 
40 void
41 LutCam::print(const std::string& indent, unsigned int /*detail*/) const {
42  cout << indent << "LutCam: " << endl;
44  cout << indent << "Print the LUT" << endl;
45  for (unsigned int i=0; i<ALL_LUT_SIZE; i++)
46  cout << indent << i << "\t:\t0x" << setw(8) << setfill('0')
47  << hex << m_lut[i] << dec << endl;
48  cout << indent << "Print the CAM" << endl;
49  for (unsigned int i=0; i<ALL_CAM_SIZE; i++)
50  cout << indent << i << "\t:\t0x" << setw(8) << setfill('0')
51  << hex << m_cam[i] << dec << endl;
52 }
TrigConf::LutCam::print
virtual void print(const std::string &indent="", unsigned int detail=1) const override
Definition: LutCam.cxx:41
LutCam.h
TrigConf::LutCam::lut
const std::vector< uint32_t > & lut() const
Definition: LutCam.cxx:19
TrigConf::LutCam::ALL_LUT_SIZE
static const u_int ALL_LUT_SIZE
Definition: LutCam.h:20
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
TrigConf::LutCam::setLut
void setLut(const u_int l[], const int size)
Definition: LutCam.cxx:24
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition: Config.h:22
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
geometry_dat_to_json.indent
indent
Definition: geometry_dat_to_json.py:18
lumiFormat.i
int i
Definition: lumiFormat.py:92
TrigConf::LutCam::m_lut
std::vector< uint32_t > m_lut
Definition: LutCam.h:39
TrigConf::LutCam::ALL_CAM_SIZE
static const u_int ALL_CAM_SIZE
Definition: LutCam.h:21
TrigConf::LutCam::setCam
void setCam(const u_int c[], const int size)
Definition: LutCam.cxx:35
TrigConf::LutCam::cam
const std::vector< uint32_t > & cam() const
Definition: LutCam.cxx:30
TrigConf::TrigConfData::indent
std::ostream & indent(std::ostream &o, int lvl, int size) const
Definition: TrigConfData.cxx:23
TrigConf::L1DataBaseclass
Definition: L1DataBaseclass.h:22
python.compressB64.c
def c
Definition: compressB64.py:93
TrigConf::TrigConfData::printNameIdV
void printNameIdV(const std::string &indent="") const
Definition: TrigConfData.cxx:31
TrigConf::LutCam::m_cam
std::vector< uint32_t > m_cam
Definition: LutCam.h:40