#include <AlgFactory.h>
Public Member Functions | |
| AlgHandle | GetAlgHandle (const char *algnm, const char *cnfnm) |
| ConfigRecord * | GetOwnedConfigRecord (const VldContext *vld) |
| void | Register (const char *algnm, const char *cnfnm, const char *libnm=0, const char *cclnm=0) |
Static Public Member Functions | |
| AlgFactory & | GetInstance () |
Private Member Functions | |
| AlgFactory () | |
| virtual | ~AlgFactory () |
| AlgFactory (const AlgFactory &) | |
| void | operator= (const AlgFactory &) |
Private Attributes | |
| TList | fAlgHandleList |
| Bool_t | fConfigRecordIsModified |
Static Private Attributes | |
| AlgFactory * | fsTheInstance |
Friends | |
| struct | Cleaner |
|
|
Definition at line 37 of file AlgFactory.cxx. References MSG. Referenced by GetInstance(). 00037 : 00038 fConfigRecordIsModified(kFALSE) 00039 { 00040 MSG("Alg", Msg::kDebug) << "AlgFactory::Constructor\n"; 00041 fsTheInstance = this; 00042 }
|
|
|
Definition at line 45 of file AlgFactory.cxx. References fAlgHandleList, fsTheInstance, and MSG. 00046 {
00047 MSG("Alg", Msg::kDebug) << "AlgFactory::Destructor\n";
00048 fAlgHandleList.Delete();
00049 fsTheInstance = 0;
00050 }
|
|
|
|
|
||||||||||||
|
|
|
Definition at line 146 of file AlgFactory.cxx. References fAlgHandleList, fConfigRecordIsModified, AlgHandle::GetAlgConfig(), RecRecordImp< T >::HasBeenModified(), ConfigRecord::SecureConfig(), and RecRecordImp< T >::SetTransient(). Referenced by RecordSetupModule::Reco(). 00147 {
00148
00149 // Only returns a ConfigRecord when the AlgConfig list has been modified
00150 if (fConfigRecordIsModified == kFALSE) return 0;
00151
00152 // Create new ConfigRecord for owned return to caller.
00153 const RecHeader rh(*vld);
00154 ConfigRecord *confrec = new ConfigRecord(rh);
00155 confrec->HasBeenModified();
00156 confrec->SetTransient(false);// Record not to be cleared by mom.clear
00157 confrec->SetName("AlgConfigRecord");
00158 confrec->SetTitle("Created by AlgFactory");
00159
00160 // Add AlgConfigs to new ConfigRecord
00161 TIter algiter(&fAlgHandleList);
00162 AlgHandle *ah = 0;
00163 while ((ah = (AlgHandle *) algiter())) {
00164 confrec->SecureConfig(ah->GetAlgConfig());
00165 }
00166
00167 fConfigRecordIsModified = kFALSE;
00168 return confrec;
00169 }
|
|
|
|
|
||||||||||||||||||||
|
Definition at line 172 of file AlgFactory.cxx. References DynamicPluggableFactory::GetInstance(), DynamicPluggableFactory::IsRegistered(), MSG, and DynamicPluggableFactory::Register(). Referenced by AltDeMuxModule::AltDeMuxModule(), AltModuleSliceList::AltModuleSliceList(), AltModuleStpPatternRec::AltModuleStpPatternRec(), atmo_configure_common(), RealCalDetPIDModule::BeginJob(), DmxDeMuxFilterModule::BeginJob(), CalDetSIModule::BeginJob(), AtmosShowerListModule::BeginJob(), Cluster3DModule::Cluster3DModule(), FarDetStripListModule::DefaultConfig(), FarDetSliceListModule::DefaultConfig(), FarDetShieldPlankListModule::DefaultConfig(), AtNuFitModule::DefaultConfig(), AtNuFindModule::DefaultConfig(), DmxDeMuxCosmicsModule::DmxDeMuxCosmicsModule(), DmxDeMuxModule::DmxDeMuxModule(), FitTrack3ListModule::FitTrack3ListModule(), FitTrackMSListModule::FitTrackMSListModule(), GetAlgHandle(), and main(). 00174 {
00175 const char *algnm = Strip(aalgnm);
00176 const char *cnfnm = Strip(ccnfnm);
00177
00178 TString cclstr(cclnm ? cclnm : "AlgConfig");
00179 TString regstr(algnm);
00180 regstr = regstr + ":" + cnfnm;
00181 DynamicPluggableFactory &dpf =
00182 DynamicPluggableFactory::GetInstance();
00183 if (dpf.IsRegistered(regstr.Data())) {
00184 MSG("Alg", Msg::kWarning)
00185 << "AlgFactory: (AlgorithmClass:AlgConfigName) = ("
00186 << regstr.Data() << ") already registered. 2nd attempt Ignored."
00187 << endl;
00188 delete [] algnm; delete [] cnfnm; // Strip() gives user ownership
00189 return;
00190 }
00191
00192 DynAlgReg *dar = new DynAlgReg(regstr.Data(), algnm, libnm,
00193 cclstr.Data());
00194 dpf.Register(dar);
00195
00196 MSG("Alg", Msg::kDebug)
00197 << "AlgFactory: Registration of (AlgorithmClass:AlgConfigName) = ("
00198 << regstr.Data() << ") completed." << endl;
00199
00200 delete [] algnm; delete [] cnfnm; // Strip() gives user ownership
00201 return;
00202 }
|
|
|
Definition at line 57 of file AlgFactory.h. |
|
|
Definition at line 37 of file AlgFactory.h. Referenced by GetAlgHandle(), GetOwnedConfigRecord(), and ~AlgFactory(). |
|
|
Definition at line 38 of file AlgFactory.h. Referenced by GetAlgHandle(), and GetOwnedConfigRecord(). |
|
|
Definition at line 34 of file AlgFactory.cxx. Referenced by GetInstance(), ~AlgFactory(), and AlgFactory::Cleaner::~Cleaner(). |
1.3.9.1