ATLAS Offline Software
PrioritySet.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include <iostream>
7 
8 
9 using namespace std;
10 
12  : L1DataBaseclass(),m_Priorities(N_PRIORITIES,"LOW")
13 {}
14 
15 void
16 TrigConf::PrioritySet::setPriorities(const std::vector<std::string>& vec) {
17  if (vec.size() > N_PRIORITIES) std::cerr
18  << "setPriorities >> number of priorities too high: " << vec.size() << std::endl;
19  for (unsigned int i=0; i<vec.size(); ++i) m_Priorities.at(i) = vec[i];
20 }
21 
22 void
23 TrigConf::PrioritySet::print(const std::string& indent, unsigned int detail) const {
24  if(detail>=5) {
25  cout << indent << "PrioritySet " << name() << endl;
26  cout << indent << "lvl1MasterTableId: " << lvl1MasterTableId() << endl;
27  unsigned int ctpid(0);
28  for(const string& priority: m_Priorities)
29  cout << "\t " << ctpid++ << "\t" << " priority = " << priority << endl;
30  }
31 }
32 
33 
37 void
38 TrigConf::PrioritySet::writeXML(std::ostream & xmlfile, int indentLevel, int indentWidth) const {
39  indent(xmlfile, indentLevel, indentWidth)
40  << "<PrioritySet name=\"" << name() << "\" version=\"" << version() << "\">"
41  << endl;
42  unsigned int ctpid(0);
43  for(const string& priority : m_Priorities) {
44  indent(xmlfile, indentLevel + 1, indentWidth)
45  << "<Priority ctpid=\"" << ctpid++
46  << "\" priority=\"" << priority << "\">"
47  << priority << "</Priority>" << endl;
48  }
49  indent(xmlfile, indentLevel, indentWidth)
50  << "</PrioritySet>" << endl;
51 }
52 
TrigConf::PrioritySet::PrioritySet
PrioritySet()
Definition: PrioritySet.cxx:11
TrigConf::PrioritySet::writeXML
virtual void writeXML(std::ostream &xmlfile, int indentLevel=0, int indentWidth=2) const
Writes the Prescale item to the XML file.
Definition: PrioritySet.cxx:38
detail
Definition: extract_histogram_tag.cxx:14
python.selector.AtlRunQuerySelectorLhcOlc.priority
priority
Definition: AtlRunQuerySelectorLhcOlc.py:611
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
geometry_dat_to_json.indent
indent
Definition: geometry_dat_to_json.py:36
lumiFormat.i
int i
Definition: lumiFormat.py:85
TrigConf::PrioritySet::print
virtual void print(const std::string &indent="", unsigned int detail=1) const override
Definition: PrioritySet.cxx:23
TrigConf::PrioritySet::setPriorities
void setPriorities(const std::vector< std::string > &vec)
Definition: PrioritySet.cxx:16
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
PrioritySet.h
get_generator_info.version
version
Definition: get_generator_info.py:33
TrigConf::L1DataBaseclass
Definition: L1DataBaseclass.h:22