ATLAS Offline Software
Loading...
Searching...
No Matches
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
24namespace 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
43
44
45void
47SetName( std::string name_ )
48{
49 m_name.SetString( name_.c_str() );
50}
51
52
53const char*
55GetName() const
56{
57 return m_name.GetName();
58}
59
60
61void
63SetGreen( float value_ )
64{
65 m_greenValue = value_;
66}
67
68
69float
71GetGreen() const
72{
73 return m_greenValue;
74}
75
76
77void
79SetRed( float value_ )
80{
81 m_redValue = value_;
82}
83
84
85float
87GetRed() const
88{
89 return m_redValue;
90}
91
92
93void
95PrintIOStream( std::ostream& o ) const
96{
97 o << GetName() << " = { green = " << GetGreen() << ", red = " << GetRed() << " }\n";
98}
99
100
101TSeqCollection *
103GetList()
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
125std::ostream& operator<<( std::ostream& o, const dqi::HanConfigAlgLimit& l )
126{
127 l.PrintIOStream(o);
128 return o;
129}
130
131
132std::ostream& operator<<( std::ostream& o, const dqi::HanConfigAlgLimit* l )
133{
134 l->PrintIOStream(o);
135 return o;
136}
137
std::ostream & operator<<(std::ostream &o, const dqi::HanConfigAlgLimit &l)
ClassImp(xAOD::Experimental::RFileChecker) namespace xAOD
virtual void SetGreen(float value_)
virtual TSeqCollection * GetList()
virtual void SetRed(float value_)
virtual const char * GetName() const
virtual float GetRed() const
virtual void PrintIOStream(std::ostream &o) const
virtual float GetGreen() const
virtual void SetName(std::string name_)
TSeqCollection * newTObjArray(const char *name, TObject *obj=0, Int_t size=TCollection::kInitCapacity)
Definition HanUtils.cxx:27