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