#include <CfgConfigurable.h>
Inheritance diagram for CfgConfigurable:

Public Member Functions | |
| CfgConfigurable () | |
| virtual | ~CfgConfigurable () |
| virtual void | Config ()=0 |
| virtual const Registry & | DefaultConfig () const |
| Registry & | GetConfig () |
| const Registry & | GetConfig () const |
| int | Update () |
| void | Set (CfgDialog *d=0) |
| void | Set (const char *s) |
Protected Member Functions | |
| virtual void | CommitDefaultConfig (const Registry &r) |
Private Attributes | |
| Registry | fDefConfig |
| Registry | fConfig |
|
|
Definition at line 16 of file CfgConfigurable.cxx. 00016 : fConfig(false) { }
|
|
|
Definition at line 20 of file CfgConfigurable.cxx. 00020 { }
|
|
|
====================================================================== Subclass must call this before the Configurable can have meaningful entries ====================================================================== Definition at line 24 of file CfgConfigurable.cxx. References fDefConfig. Referenced by Conf::Conf(), GfxDigitListCfg::GfxDigitListCfg(), GfxMCVecListCfg::GfxMCVecListCfg(), GfxShowerListCfg::GfxShowerListCfg(), GfxStripListCfg::GfxStripListCfg(), and GfxTrackListCfg::GfxTrackListCfg(). 00025 {
00030 fDefConfig = r;
00031 }
|
|
|
Implemented in BfldLoanPool, Conf, DbiTableProxyRegistry, GfxCfg, GfxCfg, PlexLoanPool, and UgliLoanPool. Referenced by Update(). |
|
|
====================================================================== Eventually this might go in the database and load the configuration. This would take a name or something. ====================================================================== Reimplemented in BfldLoanPool, PlexLoanPool, and UgliLoanPool. Definition at line 35 of file CfgConfigurable.cxx. 00036 {
00041 return fDefConfig;
00042 }
|
|
|
====================================================================== Returns the configuration Registry. This const version denies the user any freedom to modify it, but does mean that a configurable object can use it in a const method. ====================================================================== Definition at line 53 of file CfgConfigurable.cxx. 00054 {
00060 return fConfig;
00061 }
|
|
|
|
====================================================================== Update the configuration given a text string s. Format: "key1=true, key2=10, key3=11.1, key4='A string'" ====================================================================== Definition at line 109 of file CfgConfigurable.cxx. References GetConfig(), Registry::LockValues(), Registry::Merge(), s(), Cfg::StringToRegistry(), and Registry::UnLockValues(). 00110 {
00115 Registry r;
00116 Cfg::StringToRegistry(r,s);
00117 this->GetConfig().UnLockValues();
00118 this->GetConfig().Merge(r);
00119 this->GetConfig().LockValues();
00120 }
|
|
|
Definition at line 80 of file CfgConfigurable.cxx. References GetConfig(), Registry::LockValues(), Registry::Merge(), CfgDialog::Query(), CfgDialog::SetCurrent(), CfgDialog::SetDefault(), and Registry::UnLockValues(). Referenced by RerootToTruthModule::Get(), set_sm2_bfield(), UgliLoanPool::SetAlwaysUseDbi(), UgliLoanPool::SetConfigFromEnvironment(), PlexLoanPool::SetConfigFromEnvironment(), DbiTableProxyRegistry::SetConfigFromEnvironment(), BfldLoanPool::SetConfigFromEnvironment(), UgliLoanPool::SetSwimMethodHighField(), UgliLoanPool::SetSwimMethodLowField(), and UgliLoanPool::SetUseGeo(). 00081 {
00082 //======================================================================
00083 // Update the configuration parameters. Allow a CfgDialog object to be
00084 // passed in. If none is passed in use the default, text based dialog
00085 // object.
00086 //======================================================================
00087 bool deleteDialog = false;
00088 if (d==0) {
00089 d = new CfgDialog();
00090 deleteDialog = true;
00091 }
00092
00093 // Set up d with the default configuration parameters
00094 d->SetDefault(this->DefaultConfig());
00095 d->SetCurrent(this->GetConfig());
00096
00097 // Do the querry
00098 Registry r = d->Query();
00099 this->GetConfig().UnLockValues();
00100 this->GetConfig().Merge(r);
00101 this->GetConfig().LockValues();
00102
00103 // Clean up the dialog
00104 if (deleteDialog) { delete d; d = 0; }
00105 }
|
|
|
====================================================================== Update the class's state given the current configuration. If there is nothing to do just return w/o taking any action. Return's 0 if no action was taken, >0 if the object was reconfigured. ====================================================================== Definition at line 65 of file CfgConfigurable.cxx. References Config(), fConfig, Registry::IsDirty(), and Registry::SetDirty(). Referenced by apply_reg_gui(), RerootToTruthModule::Get(), UgliLoanPool::Instance(), BfldLoanPool::Instance(), set_sm2_bfield(), DbiTableProxyRegistry::SetConfigFromEnvironment(), and testConf(). 00066 {
00072 if (! fConfig.IsDirty()) return 0; // Nothing to do if config is current
00073 this->Config(); // Send the "reconfig" message
00074 fConfig.SetDirty(false); // Mark the config. as current
00075 return 1;
00076 }
|
|
|
Definition at line 81 of file CfgConfigurable.h. Referenced by Update(). |
|
|
Definition at line 81 of file CfgConfigurable.h. Referenced by CommitDefaultConfig(). |
1.3.9.1