GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
GValue Class Reference

Detailed Description

Definition at line 10 of file GValue.h.

Public Types

enum class  EPriority { kUser = 0 , kValFile = 1 , kRootFile = 2 , kDefault = 999999 }
 

Public Member Functions

 GValue ()=default
 
 GValue (const char *name)
 
 GValue (const char *name, double value, EPriority priority=EPriority::kUser)
 
 GValue (const GValue &val)
 
 GValue (GValue &&val) noexcept=default
 
 ~GValue ()=default
 
bool AppendValue (GValue *)
 
void Copy (TObject &obj) const override
 
const char * GetInfo () const
 
double GetValue () const
 
GValueoperator= (const GValue &val)=default
 
GValueoperator= (GValue &&val) noexcept=default
 
void Print (Option_t *opt="") const override
 
std::string PrintToString () const
 
bool ReplaceValue (GValue *)
 
void SetInfo (const char *temp)
 
void SetValue (double value)
 

Static Public Member Functions

static bool AddValue (GValue *, Option_t *opt="")
 
static TList * AllValues ()
 
static void Clear ()
 
static GValueFindValue (const std::string &="")
 
static GValueGet (const std::string &name="")
 
static GValueGetDefaultValue ()
 
static int ReadValFile (const char *filename="", Option_t *opt="replace")
 
static void SetReplaceValue (const std::string &name, double value, EPriority priority=EPriority::kUser)
 
static int Size ()
 
static double Value (const std::string &)
 
static double Value (const std::string &, const double &)
 
static std::string WriteToBuffer (Option_t *opt="")
 
static int WriteValFile (const std::string &filename="", Option_t *opt="")
 

Static Private Member Functions

static int ParseInputData (const std::string &input, EPriority priority, Option_t *opt="")
 

Private Attributes

EPriority fPriority {EPriority::kDefault}
 
double fValue {0.}
 
std::string info
 

Static Private Attributes

static GValuefDefaultValue = new GValue("GValue", sqrt(-1))
 
static std::map< std::string, GValue * > fValueVector
 
+ Inheritance diagram for GValue:
+ Collaboration diagram for GValue:

Member Enumeration Documentation

◆ EPriority

enum class GValue::EPriority
strong
Enumerator
kUser 
kValFile 
kRootFile 
kDefault 

Definition at line 12 of file GValue.h.

Constructor & Destructor Documentation

◆ GValue() [1/5]

GValue::GValue ( )
default

Referenced by ParseInputData(), and SetReplaceValue().

◆ GValue() [2/5]

GValue::GValue ( const char * name)
explicit

Definition at line 23 of file GValue.cxx.

◆ GValue() [3/5]

GValue::GValue ( const char * name,
double value,
EPriority priority = EPriority::kUser )

Definition at line 18 of file GValue.cxx.

◆ GValue() [4/5]

GValue::GValue ( const GValue & val)

Definition at line 27 of file GValue.cxx.

References Copy().

◆ GValue() [5/5]

GValue::GValue ( GValue && val)
defaultnoexcept

◆ ~GValue()

GValue::~GValue ( )
default

Member Function Documentation

◆ AddValue()

bool GValue::AddValue ( GValue * value,
Option_t * opt = "" )
static

Definition at line 106 of file GValue.cxx.

References FindValue(), fValueVector, and ReplaceValue().

Referenced by ParseInputData(), and SetReplaceValue().

◆ AllValues()

static TList * GValue::AllValues ( )
inlinestatic

Definition at line 42 of file GValue.h.

References fValueVector.

◆ AppendValue()

bool GValue::AppendValue ( GValue * oldvalue)

Definition at line 76 of file GValue.cxx.

References fPriority, GetInfo(), GetValue(), SetInfo(), and SetValue().

Referenced by ParseInputData().

◆ Clear()

void GValue::Clear ( )
static

Definition at line 184 of file GValue.cxx.

References fValueVector.

◆ Copy()

void GValue::Copy ( TObject & obj) const
override

Definition at line 32 of file GValue.cxx.

References fPriority, and fValue.

Referenced by GValue(), and ReplaceValue().

◆ FindValue()

GValue * GValue::FindValue ( const std::string & name = "")
static

Definition at line 64 of file GValue.cxx.

References fValueVector, and GetDefaultValue().

Referenced by AddValue(), Get(), ParseInputData(), and SetReplaceValue().

◆ Get()

static GValue * GValue::Get ( const std::string & name = "")
inlinestatic

◆ GetDefaultValue()

static GValue * GValue::GetDefaultValue ( )
inlinestatic

Definition at line 35 of file GValue.h.

References fDefaultValue.

Referenced by FindValue().

◆ GetInfo()

const char * GValue::GetInfo ( ) const
inline

Definition at line 27 of file GValue.h.

References info.

Referenced by AppendValue().

◆ GetValue()

double GValue::GetValue ( ) const
inline

Definition at line 26 of file GValue.h.

References fValue.

Referenced by AppendValue().

◆ operator=() [1/2]

GValue & GValue::operator= ( const GValue & val)
default

◆ operator=() [2/2]

GValue & GValue::operator= ( GValue && val)
defaultnoexcept

◆ ParseInputData()

int GValue::ParseInputData ( const std::string & input,
EPriority priority,
Option_t * opt = "" )
staticprivate

Definition at line 230 of file GValue.cxx.

References GValue(), AddValue(), AppendValue(), FindValue(), fPriority, SetInfo(), SetValue(), and trim().

Referenced by ReadValFile().

◆ Print()

void GValue::Print ( Option_t * opt = "") const
override

Definition at line 144 of file GValue.cxx.

References PrintToString().

◆ PrintToString()

std::string GValue::PrintToString ( ) const

Definition at line 128 of file GValue.cxx.

References fValue, and info.

Referenced by Print().

◆ ReadValFile()

int GValue::ReadValFile ( const char * filename = "",
Option_t * opt = "replace" )
static

◆ ReplaceValue()

bool GValue::ReplaceValue ( GValue * oldvalue)

Definition at line 97 of file GValue.cxx.

References Copy(), and fPriority.

Referenced by AddValue().

◆ SetInfo()

void GValue::SetInfo ( const char * temp)
inline

Definition at line 30 of file GValue.h.

References info.

Referenced by AppendValue(), and ParseInputData().

◆ SetReplaceValue()

void GValue::SetReplaceValue ( const std::string & name,
double value,
EPriority priority = EPriority::kUser )
static

Definition at line 52 of file GValue.cxx.

References GValue(), AddValue(), FindValue(), fPriority, and SetValue().

◆ SetValue()

void GValue::SetValue ( double value)
inline

Definition at line 29 of file GValue.h.

References fValue.

Referenced by AppendValue(), ParseInputData(), and SetReplaceValue().

◆ Size()

◆ Value() [1/2]

double GValue::Value ( const std::string & name)
static

Definition at line 39 of file GValue.cxx.

References Value().

Referenced by FastTimingHistSelector::CreateHistograms(), TRuntimeObjects::GetVariable(), and Value().

◆ Value() [2/2]

double GValue::Value ( const std::string & name,
const double & defaultValue )
static

Definition at line 44 of file GValue.cxx.

References fValueVector.

◆ WriteToBuffer()

std::string GValue::WriteToBuffer ( Option_t * opt = "")
static

Definition at line 171 of file GValue.cxx.

References fValueVector, and Size().

◆ WriteValFile()

int GValue::WriteValFile ( const std::string & filename = "",
Option_t * opt = "" )
static

Definition at line 149 of file GValue.cxx.

References fValueVector.

Member Data Documentation

◆ fDefaultValue

GValue * GValue::fDefaultValue = new GValue("GValue", sqrt(-1))
staticprivate

Definition at line 72 of file GValue.h.

Referenced by GetDefaultValue().

◆ fPriority

EPriority GValue::fPriority {EPriority::kDefault}
private

Definition at line 70 of file GValue.h.

Referenced by AppendValue(), Copy(), ParseInputData(), ReplaceValue(), and SetReplaceValue().

◆ fValue

double GValue::fValue {0.}
private

Definition at line 69 of file GValue.h.

Referenced by Copy(), GetValue(), PrintToString(), and SetValue().

◆ fValueVector

std::map< std::string, GValue * > GValue::fValueVector
staticprivate

Definition at line 73 of file GValue.h.

Referenced by AddValue(), AllValues(), Clear(), FindValue(), Size(), Value(), WriteToBuffer(), and WriteValFile().

◆ info

std::string GValue::info
private

Definition at line 71 of file GValue.h.

Referenced by GetInfo(), PrintToString(), and SetInfo().