20 : fList(), fIgnoreBool(kFALSE)
49 for (
auto& p :
l) SetValue(p);
101 if (&o !=
this) o.
Copy(*
this);
130 if (!list.
Contains(
"="))
return false;
134 while (!list.
End()) {
215 for (
Int_t ii = 0; ii < np1; ii += 1) {
220 TIter next(&toBeRemoved);
243 cout <<
"KVNameValueList::" <<
GetName() <<
" : " <<
GetTitle() <<
" (" <<
this <<
")" << endl;
258 else cout <<
"KVNameValueList";
260 for (
int i = 0; i <
GetNpar(); ++i) {
276 if (i <
GetNpar() - 1) cout <<
",";
322 for (
Int_t ii = 0; ii < np1; ii += 1) {
323 for (
Int_t jj = 0; jj < np2; jj += 1) {
497 while ((par = next())) {
498 if (!strcmp(par->
GetName(), name))
return idx;
501 Error(
"GetNameIndex",
"Parameter \"%s\" not found, -1 returned", name);
521 Error(
"GetNameAt",
"index has to be less than %d, empty string is returned",
GetNpar());
542 Error(
"GetStringValue(const Char_t*)",
"\"%s\" does not correspond to an existing parameter, default value \"-1\" is returned", name);
573 Error(
"GetStringValue(Int_t)",
"index has to be less than %d, \"-1\" is returned\n",
GetNpar());
620 Error(
"ReadEnvFile",
"The file %s does not exist", filename);
624 TIter next_nv(name_value_list);
626 while ((nv_pair = (
TEnvRec*)next_nv())) {
638 if (!
fIgnoreBool && (PARVAL ==
"TRUE" || PARVAL ==
"FALSE" || PARVAL ==
"ON" || PARVAL ==
"OFF"
639 || PARVAL ==
"YES" || PARVAL ==
"NO" || PARVAL ==
"OK" || PARVAL ==
"NOT"))
755 for (
int i = 0; i < other.
GetNpar(); ++i) {
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
float type_of_call hi(const int &, const int &)
Factory class for generating skeleton files for new classes.
void GenerateCode()
Generate header and implementation file for currently-defined class.
void AddGetSetMethods(const KVNameValueList &)
For each named parameter in the list, we add protected member variables with the name and type of the...
Extension of TEnv to allow the writing of comments in the file.
Extended version of ROOT THashList.
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
virtual void Print(Option_t *opt="") const
KVNamedParameter * GetParameter(Int_t idx) const
return the parameter object with index idx
virtual void ls(Option_t *opt="") const
Int_t GetIntValue(const Char_t *name) const
Bool_t HasValue64bit(const Char_t *name) const
void SetValue(const Char_t *name, value_type value)
virtual ~KVNameValueList()
Destructor.
Bool_t fIgnoreBool
do not convert "yes", "false", "on", etc. in TEnv file to boolean
void RemoveParameter(const Char_t *name)
Int_t Compare(const TObject *nvl) const
void SetValue64bit(const Char_t *name, ULong64_t)
void SetFromEnv(TEnv *tenv, const TString &prefix="")
virtual void Clear(Option_t *opt="")
const Char_t * GetNameAt(Int_t idx) const
Int_t GetNpar() const
return the number of stored parameters
virtual void ReadEnvFile(const Char_t *filename)
virtual void WriteEnvFile(const Char_t *filename)
Write all name-value pairs in this list as a TEnv format file.
Int_t GetNameIndex(const Char_t *name) const
void Merge(const KVNameValueList &)
KVNameValueList()
Default constructor.
KVNamedParameter * FindParameter(const Char_t *name) const
return the parameter object with the asking name
KVNameValueList operator+=(const KVNameValueList &nvl)
KVNameValueList & operator=(const KVNameValueList &)
KVHashList fList
list of KVNamedParameter objects
Bool_t HasIntParameter(const Char_t *name) const
void SetOwner(Bool_t enable=kTRUE)
virtual KVEnv * ProduceEnvFile()
void WriteClass(const Char_t *classname, const Char_t *classdesc, const Char_t *base_class="")
ULong64_t GetValue64bit(const Char_t *name) const
bool Set(const KVString &)
Bool_t HasParameter(const Char_t *name) const
void AddValue(const KVNamedParameter &p)
KVHashList * GetList() const
TString GetTStringValue(const Char_t *name) const
void Copy(TObject &nvl) const
virtual void ClearSelection(TRegexp &)
void WriteToEnv(TEnv *tenv, const TString &prefix="")
A generic named parameter storing values of different types.
const Char_t * GetString() const
void Set(const char *, const char *)
void Add(const KVNamedParameter &p)
Double_t GetDouble() const
virtual void ls(Option_t *opt="") const
void WriteToEnv(TEnv *, const TString &p="")
Write parameter in TEnv, using optional prefix p as "p.[name]".
TString GetTString() const
virtual void Copy(TObject &obj) const
virtual void SetOwner(Bool_t enable=kTRUE)
virtual void Clear(Option_t *option="")
virtual TObject * At(Int_t idx) const
virtual void Add(TObject *obj)
virtual TObject * Remove(TObject *obj)
Remove object from list.
virtual TObject * FindObject(const char *name) const
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void Begin(TString delim) const
KVString Next(Bool_t strip_whitespace=kFALSE) const
virtual Int_t GetEntries() const
const char * GetName() const
const char * GetValue() const
virtual const char * GetValue(const char *name, const char *dflt) const
virtual void SetRcName(const char *name)
virtual Int_t ReadFile(const char *fname, EEnvLevel level)
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=nullptr)
THashList * GetTable() const
virtual void Add(TObject *obj)
virtual void Delete(Option_t *option="")
virtual const char * GetName() const
virtual void Copy(TObject &named) const
virtual void SetTitle(const char *title="")
virtual const char * GetTitle() const
virtual void SetName(const char *name)
virtual const char * GetName() const
virtual void Error(const char *method, const char *msgfmt,...) const
static Int_t IncreaseDirLevel()
static void IndentLevel()
static Int_t DecreaseDirLevel()
const char * Data() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
unsigned long long ULong64_t
Type GetType(const std::string &Name)