A registry. Provides the container for algorithm configuration parameters. More...
#include <Registry.h>
Public Member Functions | |
Registry () | |
Registry (string name, bool isReadOnly=true) | |
Registry (const Registry &) | |
virtual | ~Registry () |
Registry & | operator= (const Registry ®) |
Registry & | operator+= (const Registry ®) |
void | operator() (RgKey key, int item) |
void | operator() (RgKey key, bool item) |
void | operator() (RgKey key, double item) |
void | operator() (RgKey key, const char *item) |
void | operator() (RgKey key, string item) |
void | Lock (void) |
locks the registry More... | |
void | UnLock (void) |
unlocks the registry (doesn't unlock items) More... | |
bool | IsLocked (void) const |
checks registry lock More... | |
void | InhibitItemLocks (void) |
override individual item locks More... | |
void | RestoreItemLocks (void) |
restore individual item locks More... | |
bool | ItemLocksAreActive (void) const |
check if item locks are active More... | |
void | LockItem (RgKey key) |
locks the registry item More... | |
void | UnLockItem (RgKey key) |
unlocks the registry item More... | |
bool | ItemIsLocked (RgKey key) const |
check item lock More... | |
bool | ItemIsLocal (RgKey key) const |
local or global? More... | |
void | OverrideGlobalDef (RgKey key) |
let item override global default (i.e. a 'local' item) More... | |
void | LinkToGlobalDef (RgKey key) |
link its value to a global default (i.e. a 'global' item) More... | |
void | Set (RgIMapPair entry) |
void | Set (RgKey key, RgBool item) |
void | Set (RgKey key, RgInt item) |
void | Set (RgKey key, RgDbl item) |
void | Set (RgKey key, RgStr item) |
void | Set (RgKey key, RgAlg item) |
void | Set (RgKey key, RgCChAr item) |
void | Set (RgKey key, RgH1F item) |
void | Set (RgKey key, RgH2F item) |
void | Set (RgKey key, RgTree item) |
void | Get (RgKey key, const RegistryItemI *&item) const |
void | Get (RgKey key, RgBool &item) const |
void | Get (RgKey key, RgInt &item) const |
void | Get (RgKey key, RgDbl &item) const |
void | Get (RgKey key, RgStr &item) const |
void | Get (RgKey key, RgAlg &item) const |
void | Get (RgKey key, RgH1F &item) const |
void | Get (RgKey key, RgH2F &item) const |
void | Get (RgKey key, RgTree &item) const |
RgBool | GetBool (RgKey key) const |
RgInt | GetInt (RgKey key) const |
RgDbl | GetDouble (RgKey key) const |
RgStr | GetString (RgKey key) const |
RgAlg | GetAlg (RgKey key) const |
RgH1F | GetH1F (RgKey key) const |
RgH2F | GetH2F (RgKey key) const |
RgTree | GetTree (RgKey key) const |
RgBool | GetBoolDef (RgKey key, RgBool def_opt, bool set_def=true) |
RgInt | GetIntDef (RgKey key, RgInt def_opt, bool set_def=true) |
RgDbl | GetDoubleDef (RgKey key, RgDbl def_opt, bool set_def=true) |
RgStr | GetStringDef (RgKey key, RgStr def_opt, bool set_def=true) |
RgAlg | GetAlgDef (RgKey key, RgAlg def_opt, bool set_def=true) |
RgIMapConstIter | SafeFind (RgKey key) const |
int | NEntries (void) const |
get number of items More... | |
bool | Exists (RgKey key) const |
item with input key exists? More... | |
bool | CanSetItem (RgKey key) const |
can I set the specifed item? More... | |
bool | DeleteEntry (RgKey key) |
delete the spcified item More... | |
void | SetName (string name) |
set the registry name More... | |
string | Name (void) const |
get the registry name More... | |
void | Print (ostream &stream) const |
print the registry to stream More... | |
void | Copy (const Registry &) |
copy the input registry More... | |
void | Append (const Registry &, RgKey pfx="") |
append the input registry. Entries already in the registry are not updated More... | |
void | Merge (const Registry &, RgKey pfx="") |
append the input registry. Entries already in the registry are updated More... | |
void | Clear (bool force=false) |
clear the registry More... | |
void | Init (void) |
initialize the registry More... | |
RgType_t | ItemType (RgKey key) const |
return item type More... | |
RgKeyList | FindKeys (RgKey key_part) const |
create list with all keys containing 'key_part' More... | |
const RgIMap & | GetItemMap (void) const |
void | CopyToFolder (TFolder *folder) const |
void | AssertExistence (RgKey key0) const |
void | AssertExistence (RgKey key0, RgKey key1) const |
void | AssertExistence (RgKey key0, RgKey key1, RgKey key2) const |
Private Member Functions | |
RegistryItemI * | CloneRegistryItem (const RgKey &key) const |
Properly clone a registry Item according to its type. More... | |
Private Attributes | |
string | fName |
registry's name More... | |
bool | fIsReadOnly |
is read only? More... | |
bool | fInhibitItemLocks |
RgIMap | fRegistry |
'key' -> 'value' map More... | |
Friends | |
ostream & | operator<< (ostream &stream, const Registry ®istry) |
A registry. Provides the container for algorithm configuration parameters.
May 04, 2004
Copyright (c) 2003-2020, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org
Definition at line 65 of file Registry.h.
Registry::Registry | ( | ) |
Definition at line 85 of file Registry.cxx.
Definition at line 90 of file Registry.cxx.
Registry::Registry | ( | const Registry & | registry | ) |
Definition at line 98 of file Registry.cxx.
|
virtual |
Definition at line 105 of file Registry.cxx.
append the input registry. Entries already in the registry are not updated
Definition at line 743 of file Registry.cxx.
void Registry::AssertExistence | ( | RgKey | key0 | ) | const |
Definition at line 602 of file Registry.cxx.
Definition at line 613 of file Registry.cxx.
Definition at line 619 of file Registry.cxx.
can I set the specifed item?
Definition at line 256 of file Registry.cxx.
void Registry::Clear | ( | bool | force = false | ) |
clear the registry
Definition at line 864 of file Registry.cxx.
|
private |
Properly clone a registry Item according to its type.
Definition at line 890 of file Registry.cxx.
void Registry::Copy | ( | const Registry & | registry | ) |
copy the input registry
Definition at line 722 of file Registry.cxx.
void Registry::CopyToFolder | ( | TFolder * | folder | ) | const |
Definition at line 626 of file Registry.cxx.
delete the spcified item
Definition at line 569 of file Registry.cxx.
item with input key exists?
Definition at line 563 of file Registry.cxx.
create list with all keys containing 'key_part'
Definition at line 840 of file Registry.cxx.
void Registry::Get | ( | RgKey | key, |
const RegistryItemI *& | item | ||
) | const |
Definition at line 325 of file Registry.cxx.
Definition at line 331 of file Registry.cxx.
Definition at line 363 of file Registry.cxx.
Definition at line 379 of file Registry.cxx.
Definition at line 395 of file Registry.cxx.
Definition at line 412 of file Registry.cxx.
Definition at line 428 of file Registry.cxx.
Definition at line 444 of file Registry.cxx.
Definition at line 488 of file Registry.cxx.
Definition at line 545 of file Registry.cxx.
Definition at line 460 of file Registry.cxx.
Definition at line 525 of file Registry.cxx.
Definition at line 474 of file Registry.cxx.
Definition at line 535 of file Registry.cxx.
Definition at line 495 of file Registry.cxx.
Definition at line 505 of file Registry.cxx.
Definition at line 467 of file Registry.cxx.
Definition at line 530 of file Registry.cxx.
|
inline |
Definition at line 161 of file Registry.h.
Definition at line 481 of file Registry.cxx.
Definition at line 540 of file Registry.cxx.
Definition at line 515 of file Registry.cxx.
void Registry::InhibitItemLocks | ( | void | ) |
void Registry::Init | ( | void | ) |
bool Registry::IsLocked | ( | void | ) | const |
local or global?
Definition at line 178 of file Registry.cxx.
check item lock
Definition at line 218 of file Registry.cxx.
bool Registry::ItemLocksAreActive | ( | void | ) | const |
return item type
Definition at line 829 of file Registry.cxx.
void Registry::LinkToGlobalDef | ( | RgKey | key | ) |
link its value to a global default (i.e. a 'global' item)
Definition at line 206 of file Registry.cxx.
void Registry::Lock | ( | void | ) |
void Registry::LockItem | ( | RgKey | key | ) |
locks the registry item
Definition at line 234 of file Registry.cxx.
append the input registry. Entries already in the registry are updated
Definition at line 787 of file Registry.cxx.
string Registry::Name | ( | void | ) | const |
int Registry::NEntries | ( | void | ) | const |
get number of items
Definition at line 582 of file Registry.cxx.
void Registry::operator() | ( | RgKey | key, |
int | item | ||
) |
Definition at line 110 of file Registry.cxx.
void Registry::operator() | ( | RgKey | key, |
double | item | ||
) |
Definition at line 120 of file Registry.cxx.
void genie::Registry::operator() | ( | RgKey | key, |
const char * | item | ||
) |
Definition at line 131 of file Registry.cxx.
Definition at line 142 of file Registry.cxx.
Definition at line 136 of file Registry.cxx.
void Registry::OverrideGlobalDef | ( | RgKey | key | ) |
let item override global default (i.e. a 'local' item)
Definition at line 194 of file Registry.cxx.
void Registry::Print | ( | ostream & | stream | ) | const |
print the registry to stream
Definition at line 679 of file Registry.cxx.
void Registry::RestoreItemLocks | ( | void | ) |
RgIMapConstIter Registry::SafeFind | ( | RgKey | key | ) | const |
Definition at line 550 of file Registry.cxx.
void Registry::Set | ( | RgIMapPair | entry | ) |
Definition at line 267 of file Registry.cxx.
Definition at line 279 of file Registry.cxx.
Definition at line 289 of file Registry.cxx.
Definition at line 300 of file Registry.cxx.
Definition at line 305 of file Registry.cxx.
Definition at line 294 of file Registry.cxx.
Definition at line 310 of file Registry.cxx.
Definition at line 315 of file Registry.cxx.
Definition at line 320 of file Registry.cxx.
void Registry::SetName | ( | string | name | ) |
set the registry name
Definition at line 588 of file Registry.cxx.
void Registry::UnLock | ( | void | ) |
void Registry::UnLockItem | ( | RgKey | key | ) |
unlocks the registry item
Definition at line 245 of file Registry.cxx.
|
friend |
Definition at line 77 of file Registry.cxx.
|
private |
Definition at line 182 of file Registry.h.
|
private |
is read only?
Definition at line 181 of file Registry.h.
|
private |
registry's name
Definition at line 180 of file Registry.h.
|
private |
'key' -> 'value' map
Definition at line 183 of file Registry.h.