ATLAS Offline Software
Loading...
Searching...
No Matches
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
9using namespace std;
10using namespace TrigConf;
11
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
18const std::vector<uint32_t> &
19LutCam::lut() const {
20 return m_lut;
21}
22
23void
24LutCam::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
29const std::vector<uint32_t> &
30LutCam::cam() const {
31 return m_cam;
32}
33
34void
35LutCam::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
40void
41LutCam::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}
void setLut(const u_int l[], const int size)
Definition LutCam.cxx:24
static const u_int ALL_CAM_SIZE
Definition LutCam.h:21
std::vector< uint32_t > m_cam
Definition LutCam.h:40
static const u_int ALL_LUT_SIZE
Definition LutCam.h:20
std::vector< uint32_t > m_lut
Definition LutCam.h:39
virtual void print(const std::string &indent="", unsigned int detail=1) const override
Definition LutCam.cxx:41
void setCam(const u_int c[], const int size)
Definition LutCam.cxx:35
const std::vector< uint32_t > & lut() const
Definition LutCam.cxx:19
const std::vector< uint32_t > & cam() const
Definition LutCam.cxx:30
std::ostream & indent(std::ostream &o, int lvl, int size) const
void printNameIdV(const std::string &indent="") const
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22
STL namespace.