ATLAS Offline Software
TrigConfData.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include <iostream>
8 #include <iomanip>
9 #include <sstream>
10 
11 using namespace std;
12 using namespace TrigConf;
13 
14 TrigConfData::TrigConfData(const string& name) :
15  m_smk(0),
16  m_id(0),
17  m_name(name),
18  m_version(0),
19  m_comment("")
20 {}
21 
22 std::ostream&
23 TrigConfData::indent(std::ostream& o, int lvl, int size) const {
24  int width = lvl*size;
25  if(width==0) return o;
26  o << setw(lvl*size) << " ";
27  return o;
28 }
29 
30 void
31 TrigConfData::printNameIdV(const string& indent) const {
32  cout << indent << name();
33  if(id()>0 || version()>0)
34  cout << " (id=" << id() << "/v=" << version() << ")";
35  cout << endl;
36  if(comment()!="")
37  cout << indent << "Comment: " << comment() << endl;
38 }
39 
40 
41 std::ostream &
42 TrigConf::operator<<(std::ostream & o, const TrigConf::TrigConfData & data) {
43  o << data.name();
44  if(data.id()>0 || data.version()>0)
45  o << " (id=" << data.id() << "/v=" << data.version() << ")";
46  return o;
47 }
48 
49 string
51  stringstream s;
52  s << *this;
53  return s.str();
54 }
55 
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
TrigConf::operator<<
std::ostream & operator<<(std::ostream &os, const TrigConf::IsolationLegacy &iso)
Definition: L1ThresholdBase.cxx:339
TrigConf::TrigConfData::name
const std::string & name() const
Definition: TrigConfData.h:22
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
TrigConf::TrigConfData::comment
const std::string & comment() const
Definition: TrigConfData.h:23
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:36
TrigConfData.h
TrigConf::TrigConfData::version
unsigned int version() const
Definition: TrigConfData.h:24
TrigConf::TrigConfData
Definition: TrigConfData.h:13
TrigConf::name
Definition: HLTChainList.h:35
TrigConf::TrigConfData::id
unsigned int id() const
Definition: TrigConfData.h:21
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
TrigConf::TrigConfData::indent
std::ostream & indent(std::ostream &o, int lvl, int size) const
Definition: TrigConfData.cxx:23
TrigConf::TrigConfData::__str__
virtual std::string __str__() const
Definition: TrigConfData.cxx:50
TrigConf::TrigConfData::printNameIdV
void printNameIdV(const std::string &indent="") const
Definition: TrigConfData.cxx:31