ATLAS Offline Software
Loading...
Searching...
No Matches
L1TopoMenu.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
7
8#include <iostream>
9#include <fstream>
10
11using namespace std;
12using namespace TXC;
13
15
16L1TopoMenu::L1TopoMenu(const std::string & name, const std::string & version) :
17 m_name(name),
18 m_version(version),
19 m_smk(0)
20{}
21
22
23
25
26void
28 m_algos.emplace_back(std::move(alg));
29}
30
31const L1TopoConfigAlg &
32L1TopoMenu::algorithm(const std::string& name) const {
33 for(const L1TopoConfigAlg & alg: m_algos)
34 if(alg.name() == name) return alg;
35 TCS_EXCEPTION("L1TopoMenu: algorithm of name " << name << " doesn't exist");
36}
37
38
41
42 for(const OutputListElement & out: m_outputlist.getOutputList() ) {
43
44 const L1TopoConfigAlg & alg = algorithm( out.algoname() );
45
46 if(! alg.isDecAlg()) {
47 TCS_EXCEPTION("L1TopoMenu: output list contains an algorithm " << out.algoname() << " that is not an decision algorithm");
48 }
49
50 unsigned int bit = out.firstbit();
51 for (const string& outputname : alg.getOutputNames() ) {
52 m_outputlist.addTriggerLine( TriggerLine(outputname, out.algoname(),
53 out.algoid(), out.module(), out.fpga(), out.clock(),
54 bit++) );
55 }
56 }
57
58 m_outputlist.sort();
59
61}
62
63// print menu
65
66 cout << "==========================================" << endl
67 << "Menu Name : " << getName() << endl
68 << "Menu Version: " << getVersion() << endl
69 << m_topoconfig << endl;
70
72 cout << alg << endl;
73
74 cout << m_outputlist << endl;
75
76}
unsigned int m_smk
Definition L1TopoMenu.h:91
const std::string & getVersion() const
Definition L1TopoMenu.h:47
TCS::StatusCode setTriggerList()
std::string m_name
Definition L1TopoMenu.h:89
const L1TopoConfigAlg & algorithm(const std::string &name) const
const std::vector< TXC::L1TopoConfigAlg > & getL1TopoConfigAlgs() const
Definition L1TopoMenu.h:53
void addAlgorithm(TXC::L1TopoConfigAlg &&alg)
add algorithm
const std::string & getName() const
Definition L1TopoMenu.h:46
void print() const
print menu
TXC::L1TopoConfigOutputList m_outputlist
Definition L1TopoMenu.h:96
std::string m_version
Definition L1TopoMenu.h:90
TXC::L1TopoConfigGlobal m_topoconfig
Definition L1TopoMenu.h:95
std::vector< TXC::L1TopoConfigAlg > m_algos
Definition L1TopoMenu.h:94
std::string algorithm
Definition hcg.cxx:85
STL namespace.