ATLAS Offline Software
Loading...
Searching...
No Matches
HanConfigAlgPar.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: HanConfigAlgPar.cxx,v 1.4 2007-12-14 16:04:40 mgwilson Exp $
7// **********************************************************************
8
10
11#include <iomanip>
12#include <sstream>
13
14#include <TObjString.h>
15
16
17//Get rid of Root macros that confuse Doxygen
21
22
23namespace dqi {
24
25// *********************************************************************
26// Public Methods
27// *********************************************************************
28
31 : m_name("")
32 , m_value(0.0)
33{
34}
35
36
41
42
43void
45SetName( std::string name_ )
46{
47 m_name.SetString( name_.c_str() );
48}
49
50
51const char*
53GetName() const
54{
55 return m_name.GetName();
56}
57
58
59void
61SetValue( float value_ )
62{
63 m_value = value_;
64}
65
66
67float
69GetValue() const
70{
71 return m_value;
72}
73
74
75void
77PrintIOStream( std::ostream& o ) const
78{
79 o << GetName() << " = " << GetValue() << "\n";
80}
81
82TList *
84GetList()
85{
86 TList *ret = new TList();
87
88 std::ostringstream parValStr;
89 parValStr << std::setprecision(4) << this->m_value;
90 ret->SetName( this->GetName() );
91 ret->Add( new TObjString(parValStr.str().c_str()) );
92
93 return ret;
94}
95
96} // namespace dqi
97
98
99std::ostream& operator<<( std::ostream& o, const dqi::HanConfigAlgPar& p )
100{
101 p.PrintIOStream(o);
102 return o;
103}
104
105
106std::ostream& operator<<( std::ostream& o, const dqi::HanConfigAlgPar* p )
107{
108 p->PrintIOStream(o);
109 return o;
110}
111
std::ostream & operator<<(std::ostream &o, const dqi::HanConfigAlgPar &p)
ClassImp(xAOD::Experimental::RFileChecker) namespace xAOD
virtual TList * GetList()
virtual void SetValue(float value_)
virtual void SetName(std::string name_)
virtual float GetValue() const
virtual const char * GetName() const
virtual void PrintIOStream(std::ostream &o) const