45typedef map <RgKey, RegistryItemI *>
RgIMap;
48typedef map <RgKey, RegistryItemI *>::iterator
RgIMapIter;
71 Registry(
string name,
bool isReadOnly =
true);
148 string Name (
void)
const;
149 void Print (ostream & stream)
const;
153 void Clear (
bool force =
false);
A registry. Provides the container for algorithm configuration parameters.
const RgIMap & GetItemMap(void) const
void Append(const Registry &, RgKey pfx="")
append the input registry. Entries already in the registry are not updated
void LinkToGlobalDef(RgKey key)
link its value to a global default (i.e. a 'global' item)
void Merge(const Registry &, RgKey pfx="")
append the input registry. Entries already in the registry are updated
Registry & operator=(const Registry ®)
RgInt GetIntDef(RgKey key, RgInt def_opt, bool set_def=true)
RgIMap fRegistry
'key' -> 'value' map
RgDbl GetDouble(RgKey key) const
void Lock(void)
locks the registry
void Clear(bool force=false)
clear the registry
RegistryItemI * CloneRegistryItem(const RgKey &key) const
Properly clone a registry Item according to its type.
void operator()(RgKey key, int item)
string Name(void) const
get the registry name
RgIMapConstIter SafeFind(RgKey key) const
void UnLockItem(RgKey key)
unlocks the registry item
RgAlg GetAlg(RgKey key) const
bool ItemLocksAreActive(void) const
check if item locks are active
RgStr GetString(RgKey key) const
void LockItem(RgKey key)
locks the registry item
bool IsLocked(void) const
checks registry lock
RgType_t ItemType(RgKey key) const
return item type
bool CanSetItem(RgKey key) const
can I set the specifed item?
void OverrideGlobalDef(RgKey key)
let item override global default (i.e. a 'local' item)
RgKeyList FindKeys(RgKey key_part) const
create list with all keys containing 'key_part'
void AssertExistence(RgKey key0) const
friend ostream & operator<<(ostream &stream, const Registry ®istry)
RgBool GetBoolDef(RgKey key, RgBool def_opt, bool set_def=true)
int NEntries(void) const
get number of items
RgH2F GetH2F(RgKey key) const
RgStr GetStringDef(RgKey key, RgStr def_opt, bool set_def=true)
bool DeleteEntry(RgKey key)
delete the spcified item
Registry & operator+=(const Registry ®)
RgAlg GetAlgDef(RgKey key, RgAlg def_opt, bool set_def=true)
bool fIsReadOnly
is read only?
bool Exists(RgKey key) const
item with input key exists?
void SetName(string name)
set the registry name
RgInt GetInt(RgKey key) const
bool ItemIsLocked(RgKey key) const
check item lock
void Init(void)
initialize the registry
bool ItemIsLocal(RgKey key) const
local or global?
void InhibitItemLocks(void)
override individual item locks
RgBool GetBool(RgKey key) const
RgDbl GetDoubleDef(RgKey key, RgDbl def_opt, bool set_def=true)
void Set(RgIMapPair entry)
RgH1F GetH1F(RgKey key) const
void Copy(const Registry &)
copy the input registry
void Get(RgKey key, const RegistryItemI *&item) const
RgTree GetTree(RgKey key) const
void RestoreItemLocks(void)
restore individual item locks
void UnLock(void)
unlocks the registry (doesn't unlock items)
void CopyToFolder(TFolder *folder) const
string fName
registry's name
void Print(ostream &stream) const
print the registry to stream
THE MAIN GENIE PROJECT NAMESPACE
T GetValueOrUseDefault(Registry *r, RgKey key, T def, bool set_def)
vector< RgKey > RgKeyList
void SetRegistryItem(Registry *r, RgKey key, T item)
enum genie::ERgType RgType_t
map< RgKey, RegistryItemI * > RgIMap
pair< RgKey, RegistryItemI * > RgIMapPair
map< RgKey, RegistryItemI * >::const_iterator RgIMapConstIter
map< RgKey, RegistryItemI * >::size_type RgIMapSizeType
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
map< RgKey, RegistryItemI * >::iterator RgIMapIter