ATLAS Offline Software
HLTStreamTag.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 <sstream>
8 #include <fstream>
9 
10 using namespace std;
11 
13  m_stream(""),
14  m_type(""),
15  m_obeyLB(false),
16  m_prescale(1.)
17 {}
18 
20  const std::string& type,
21  bool obeyLB,
22  float prescale) :
23  m_stream(stream),
24  m_type(type),
25  m_obeyLB(obeyLB),
26  m_prescale(prescale)
27 {
28  setName(type+"."+stream);
29 }
30 
31 
33  return ( stream() == o.stream() &&
34  type() == o.type() &&
35  obeyLB() == o.obeyLB() &&
36  prescale() == o.prescale() );
37 }
38 
39 
40 void TrigConf::HLTStreamTag::writeXML(std::ofstream & xmlfile) const {
41  xmlfile << " <STREAMTAG"
42  << " stream=\"" << m_stream << "\""
43  << " type=\"" << m_type << "\""
44  << " prescale=\"" << m_prescale << "\""
45  << " obeyLB=\"" << (m_obeyLB?"yes":"no") << "\""
46  << "/>"
47  << endl;
48 }
49 
50 
51 void
52 TrigConf::HLTStreamTag::print(const std::string& indent, unsigned int /*detail*/) const {
53  std::cout << indent << *this;
54 }
55 
56 
57 
58 std::ostream &
59 TrigConf::operator<<(std::ostream & o, const TrigConf::HLTStreamTag & st) {
60  int dp = o.precision();
61  o << "HLTStreamTag "
62  << "stream: '" << st.m_stream
63  << "' type: '" << st.m_type
64  << "' obeyLB: '" << (st.m_obeyLB?"yes":"no");
65  o.precision(3);
66  o.setf(std::ios::fixed, std::ios::floatfield);
67  o << "' prescale: " << st.m_prescale
68  << std::endl;
69  o.precision(dp);
70  return o;
71 }
72 
TrigConf::TrigConfData::setName
void setName(const std::string &name)
Definition: TrigConfData.h:30
TrigConf::HLTStreamTag::stream
const std::string & stream() const
accessor to the stream name
Definition: HLTStreamTag.h:45
TileDCSDataPlotter.dp
dp
Definition: TileDCSDataPlotter.py:840
TrigConf::operator<<
std::ostream & operator<<(std::ostream &os, const TrigConf::IsolationLegacy &iso)
Definition: L1ThresholdBase.cxx:339
TrigConf::HLTStreamTag::m_type
std::string m_type
the stream type
Definition: HLTStreamTag.h:64
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
TrigConf::HLTStreamTag::m_stream
std::string m_stream
the stream name
Definition: HLTStreamTag.h:63
m_type
TokenType m_type
the type
Definition: TProperty.cxx:44
TrigConf::HLTStreamTag::m_prescale
float m_prescale
the stream prescale value (in conjunction with a chain)
Definition: HLTStreamTag.h:66
TrigConf::HLTStreamTag::type
const std::string & type() const
accessor to the stream type
Definition: HLTStreamTag.h:46
geometry_dat_to_json.indent
indent
Definition: geometry_dat_to_json.py:18
HLTStreamTag.h
TrigConf::HLTStreamTag::print
void print(const std::string &indent="", unsigned int detail=1) const override
Definition: HLTStreamTag.cxx:52
TrigConf::HLTStreamTag::operator==
bool operator==(const HLTStreamTag &)
Definition: HLTStreamTag.cxx:32
TrigConf::HLTStreamTag::obeyLB
bool obeyLB() const
accessor to the obey LB flag
Definition: HLTStreamTag.h:47
TrigConf::HLTStreamTag::prescale
float prescale() const
accessor to the stream prescale value
Definition: HLTStreamTag.h:48
TrigConf::HLTStreamTag
HLT stream configuration information.
Definition: HLTStreamTag.h:23
TrigConf::HLTStreamTag::m_obeyLB
bool m_obeyLB
the obey LB flag, if true the stream obeys the boundaries of the lumi-blocks
Definition: HLTStreamTag.h:65
TrigConf::HLTStreamTag::writeXML
void writeXML(std::ofstream &xmlfile) const
Definition: HLTStreamTag.cxx:40
TrigConf::HLTStreamTag::HLTStreamTag
HLTStreamTag()
default constructor
Definition: HLTStreamTag.cxx:12
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78