GRSISort
Created by P.C. Bender
Developement Team: P.C. Bender, R. Dunlop, V. Bildstein
An extension of the ROOT analysis Framework
GValue Class Reference

Definition at line 10 of file GValue.h.

Public Types

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

Public Member Functions

 GValue ()
 
 GValue (const char *name)
 
 GValue (const char *name, double value, EPriority priority=EPriority::kUser)
 
 GValue (const GValue &val)
 
bool AppendValue (GValue *)
 
void Copy (TObject &obj) const override
 
const char * GetInfo () const
 
double GetValue ()
 
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 (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 std::string WriteToBuffer (Option_t *opt="")
 
static int WriteValFile (const std::string &filename="", Option_t *opt="")
 

Private Member Functions

 ClassDefOverride (GValue, 1)
 

Static Private Member Functions

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

Private Attributes

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

Static Private Attributes

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

#include <GValue.h>

+ Inheritance diagram for GValue:
+ Collaboration diagram for GValue:

Member Enumeration Documentation

◆ EPriority

enum GValue::EPriority
strong
Enumerator
kUser 
kValFile 
kRootFile 
kDefault 

Definition at line 12 of file GValue.h.

Constructor & Destructor Documentation

◆ GValue() [1/4]

GValue::GValue ( )

Definition at line 16 of file GValue.cxx.

References kDefault.

Referenced by ParseInputData(), and SetReplaceValue().

◆ GValue() [2/4]

GValue::GValue ( const char *  name)

Definition at line 25 of file GValue.cxx.

References kDefault.

◆ GValue() [3/4]

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

Definition at line 20 of file GValue.cxx.

◆ GValue() [4/4]

GValue::GValue ( const GValue val)

Definition at line 29 of file GValue.cxx.

References Copy().

Member Function Documentation

◆ AddValue()

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

Definition at line 103 of file GValue.cxx.

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

Referenced by ParseInputData(), and SetReplaceValue().

◆ AllValues()

static TList* GValue::AllValues ( )
inlinestatic

Definition at line 34 of file GValue.h.

References fValueVector.

◆ AppendValue()

bool GValue::AppendValue ( GValue oldvalue)

Definition at line 73 of file GValue.cxx.

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

Referenced by ParseInputData().

◆ ClassDefOverride()

GValue::ClassDefOverride ( GValue  ,
 
)
private

◆ Clear()

void GValue::Clear ( )
static

Definition at line 182 of file GValue.cxx.

References fValueVector.

◆ Copy()

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

Definition at line 34 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 61 of file GValue.cxx.

References fValueVector, and GetDefaultValue().

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

◆ Get()

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

◆ GetDefaultValue()

static GValue* GValue::GetDefaultValue ( )
inlinestatic

Definition at line 28 of file GValue.h.

References fDefaultValue.

Referenced by FindValue().

◆ GetInfo()

const char* GValue::GetInfo ( ) const
inline

Definition at line 20 of file GValue.h.

References info.

Referenced by AppendValue().

◆ GetValue()

double GValue::GetValue ( )
inline

Definition at line 19 of file GValue.h.

References fValue.

Referenced by AppendValue().

◆ ParseInputData()

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

Definition at line 228 of file GValue.cxx.

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

Referenced by ReadValFile().

◆ Print()

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

Definition at line 141 of file GValue.cxx.

References PrintToString().

◆ PrintToString()

std::string GValue::PrintToString ( ) const

Definition at line 125 of file GValue.cxx.

References fValue, and info.

Referenced by Print().

◆ ReadValFile()

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

Definition at line 192 of file GValue.cxx.

References kValFile, and ParseInputData().

Referenced by TGRSIint::SetupPipeline(), and TGRSISelector::SlaveBegin().

◆ ReplaceValue()

bool GValue::ReplaceValue ( GValue oldvalue)

Definition at line 94 of file GValue.cxx.

References Copy(), and fPriority.

Referenced by AddValue().

◆ SetInfo()

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

Definition at line 23 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 49 of file GValue.cxx.

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

◆ SetValue()

void GValue::SetValue ( double  value)
inline

Definition at line 22 of file GValue.h.

References fValue.

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

◆ Size()

static int GValue::Size ( )
inlinestatic

◆ trim()

void GValue::trim ( std::string *  line,
const std::string &  trimChars = " \f\n\r\t\v" 
)
staticprivate

Definition at line 317 of file GValue.cxx.

Referenced by ParseInputData().

◆ Value()

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

Definition at line 41 of file GValue.cxx.

References fValueVector.

Referenced by TRuntimeObjects::GetVariable().

◆ WriteToBuffer()

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

Definition at line 168 of file GValue.cxx.

References fValueVector, and Size().

◆ WriteValFile()

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

Definition at line 146 of file GValue.cxx.

References fValueVector.

Member Data Documentation

◆ fDefaultValue

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

Definition at line 64 of file GValue.h.

Referenced by GetDefaultValue().

◆ fPriority

EPriority GValue::fPriority
private

Definition at line 62 of file GValue.h.

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

◆ fValue

double GValue::fValue {0.}
private

Definition at line 61 of file GValue.h.

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

◆ fValueVector

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

Definition at line 65 of file GValue.h.

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

◆ info

std::string GValue::info
private

Definition at line 63 of file GValue.h.

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