ATLAS Offline Software
Loading...
Searching...
No Matches
JobOptionTable.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 <fstream>
7#include <algorithm>
8
9using namespace std;
10using namespace TrigConf;
11
17
18void
22
23void
24TrigConf::JobOptionTable::print(const std::string& indent, unsigned int detail) const {
25 if(detail>=1) {
26 cout << indent << "=============================================" << endl;
27 cout << indent << "JobOptionTable" << endl;
28 cout << indent << " Super MasterTable Id = " << m_SuperMasterTableId << endl;
29 cout << indent << " HLT MasterTable Id = " << m_HltMasterTableId << endl;
30 cout << indent << " Number of parameters = " << m_JobOptionVector.size() << endl;
31 cout << indent << "=============================================" << endl;
32 if(detail>=3)
33 for(unsigned int i=0; i < m_JobOptionVector.size();i++)
35 }
36}
37
38void
39TrigConf::JobOptionTable::writeToFile(const std::string& filename) const {
40 ofstream of;
41 of.open (filename.c_str());
42 of << "=============================================" << endl;
43 of << "JobOptionTable" << endl;
44 of << " Super MasterTable Id = " << m_SuperMasterTableId << endl;
45 of << " HLT MasterTable Id = " << m_HltMasterTableId << endl;
46 of << " Number of parameters = " << m_JobOptionVector.size() << endl;
47 of << "=============================================" << endl;
48 for(unsigned int i=0; i < m_JobOptionVector.size();i++) {
49 of << m_JobOptionVector[i] << endl;
50 }
51 of.close();
52
53}
54
55namespace {
56 struct JOLessThan {
57 bool operator()(const TrigConf::JobOption& jo1, const TrigConf::JobOption& jo2) const {
58 int cmp = jo1.component_alias().compare( jo2.component_alias() );
59 if(cmp>0) return false;
60 if(cmp<0) return true;
61 return jo1.name().compare(jo2.name()) < 0;
62 }
63 };
64}
65
66void
void print(char *figname, TCanvas *c1)
void print(const std::string &indent="", unsigned int detail=1) const override
print method
void addJobOption(const JobOption &jo)
adds a job option to the table
JobOptionTable()
default constructor
void sort()
sort alphabetically by component and property name
int m_HltMasterTableId
super master table configuration key
std::vector< JobOption > m_JobOptionVector
vector of job options
int m_SuperMasterTableId
HLT master table configuration key.
int m_TriggerLevel
trigger level (0-L2, 1-EF)
void writeToFile(const std::string &filename) const
writing to file as text
hold a single job option (parameter and value)
Definition JobOption.h:32
const std::string & name() const
accessor to component alias
Definition JobOption.h:54
const std::string & component_alias() const
Definition JobOption.h:53
std::ostream & indent(std::ostream &o, int lvl, int size) const
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22
STL namespace.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.