ATLAS Offline Software
HanConfigAlgLimit.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // **********************************************************************
6 // $Id: HanConfigAlgLimit.cxx,v 1.5 2007-12-14 16:04:39 mgwilson Exp $
7 // **********************************************************************
8 
11 
12 #include <iomanip>
13 #include <sstream>
14 
15 #include <TObjString.h>
16 #include <TSeqCollection.h>
17 
18 //Get rid of Root macros that confuse Doxygen
22 
23 
24 namespace dqi {
25 
26 // *********************************************************************
27 // Public Methods
28 // *********************************************************************
29 
32  : m_name("")
33  , m_greenValue(0.0)
34  , m_redValue(0.0)
35 {
36 }
37 
38 
41 {
42 }
43 
44 
45 void
47 SetName( std::string name_ )
48 {
49  m_name.SetString( name_.c_str() );
50 }
51 
52 
53 const char*
55 GetName() const
56 {
57  return m_name.GetName();
58 }
59 
60 
61 void
63 SetGreen( float value_ )
64 {
65  m_greenValue = value_;
66 }
67 
68 
69 float
71 GetGreen() const
72 {
73  return m_greenValue;
74 }
75 
76 
77 void
79 SetRed( float value_ )
80 {
81  m_redValue = value_;
82 }
83 
84 
85 float
87 GetRed() const
88 {
89  return m_redValue;
90 }
91 
92 
93 void
95 PrintIOStream( std::ostream& o ) const
96 {
97  o << GetName() << " = { green = " << GetGreen() << ", red = " << GetRed() << " }\n";
98 }
99 
100 
101 TSeqCollection *
103 GetList()
104 {
105  TSeqCollection *ret = newTObjArray(this->GetName(), 0, 2);
106 
107  std::ostringstream greenValStr;
108  greenValStr << std::setprecision(4) << this->m_greenValue;
109  ret->Add( newTObjArray("Green",new TObjString( greenValStr.str().c_str() ), 1) );
110 
111  std::ostringstream redValStr;
112  redValStr << std::setprecision(4) << this->m_redValue;
113  ret->Add( newTObjArray("Red",new TObjString( redValStr.str().c_str() ), 1) );
114 
115  return ret;
116 }
117 
118 } // namespace dqi
119 
120 // *********************************************************************
121 // Private Methods
122 // *********************************************************************
123 
124 
125 std::ostream& operator<<( std::ostream& o, const dqi::HanConfigAlgLimit& l )
126 {
127  l.PrintIOStream(o);
128  return o;
129 }
130 
131 
132 std::ostream& operator<<( std::ostream& o, const dqi::HanConfigAlgLimit* l )
133 {
134  l->PrintIOStream(o);
135  return o;
136 }
137 
dqi::HanConfigAlgLimit::m_name
TObjString m_name
Definition: HanConfigAlgLimit.h:44
dqi::HanConfigAlgLimit::GetList
virtual TSeqCollection * GetList()
Definition: HanConfigAlgLimit.cxx:103
dqi::HanConfigAlgLimit
Definition: HanConfigAlgLimit.h:18
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
dqi::HanConfigAlgLimit::GetGreen
virtual float GetGreen() const
Definition: HanConfigAlgLimit.cxx:71
ClassImp
ClassImp(xAOD::TFileChecker) namespace xAOD
Definition: TFileChecker.cxx:28
dqi::HanConfigAlgLimit::PrintIOStream
virtual void PrintIOStream(std::ostream &o) const
Definition: HanConfigAlgLimit.cxx:95
dqi::HanConfigAlgLimit::GetName
virtual const char * GetName() const
Definition: HanConfigAlgLimit.cxx:55
dqi::HanConfigAlgLimit::HanConfigAlgLimit
HanConfigAlgLimit()
Definition: HanConfigAlgLimit.cxx:31
operator<<
std::ostream & operator<<(std::ostream &o, const dqi::HanConfigAlgLimit &l)
Definition: HanConfigAlgLimit.cxx:125
dqi::HanConfigAlgLimit::SetRed
virtual void SetRed(float value_)
Definition: HanConfigAlgLimit.cxx:79
HanUtils.h
dqi::HanConfigAlgLimit::~HanConfigAlgLimit
virtual ~HanConfigAlgLimit()
Definition: HanConfigAlgLimit.cxx:40
HanConfigAlgLimit.h
dqi::HanConfigAlgLimit::SetGreen
virtual void SetGreen(float value_)
Definition: HanConfigAlgLimit.cxx:63
dqi::HanConfigAlgLimit::GetRed
virtual float GetRed() const
Definition: HanConfigAlgLimit.cxx:87
dqi::HanConfigAlgLimit::m_greenValue
Float_t m_greenValue
Definition: HanConfigAlgLimit.h:45
dqi::newTObjArray
TSeqCollection * newTObjArray(const char *name, TObject *obj=0, Int_t size=TCollection::kInitCapacity)
Definition: HanUtils.cxx:27
dqi::HanConfigAlgLimit::m_redValue
Float_t m_redValue
Definition: HanConfigAlgLimit.h:46
dqi::HanConfigAlgLimit::SetName
virtual void SetName(std::string name_)
Definition: HanConfigAlgLimit.cxx:47
dqi
Definition: CompositeAlgorithm.h:16