#include <RunAlgStore.h>
Inheritance diagram for Anp::RunAlgStore:

Public Member Functions | |
| RunAlgStore () | |
| virtual | ~RunAlgStore () |
| bool | Run (Record &record, TObject *ptr) |
| void | Config (const Registry ®) |
Private Types | |
| typedef std::vector< Anp::AlgCaddy< Anp::AlgStore > > | StoreVec |
Private Member Functions | |
| void | Init () |
Private Attributes | |
| bool | fPrint |
| StoreVec | fAlgVec |
| Anp::AlgCaddy< Anp::AlgStore > | fCount |
|
|
Definition at line 31 of file RunAlgStore.h. |
|
|
Definition at line 24 of file RunAlgStore.cxx.
|
|
|
Definition at line 31 of file RunAlgStore.cxx. References fAlgVec, fCount, and Anp::AlgCaddy< T >::Print(). 00032 {
00033 if(fPrint)
00034 {
00035 cout << "--------------------------------------------------------------------" << endl;
00036 fCount.Print(7, 7, "snarl");
00037 fAlgVec.clear();
00038 cout << "--------------------------------------------------------------------" << endl;
00039 }
00040 }
|
|
|
Reimplemented from Anp::AlgStore. Definition at line 73 of file RunAlgStore.cxx. References Anp::AlgStorePtr, fAlgVec, fPrint, Registry::Get(), Anp::AlgStore::Name(), Anp::Read(), reg, UtilString::StringTok(), and Anp::Handle< T >::valid(). 00074 {
00075 //
00076 // Configure children algorithms
00077 //
00078
00079 Anp::Read(reg, "RunAlgStorePrint", fPrint);
00080
00081 const char *value = 0;
00082 vector<string> namelist;
00083
00084 if(!reg.Get("AlgStoreList", value))
00085 {
00086 cerr << "RunAlgStore::Config - AlgStoreList Registry key doesn't exist" << endl;
00087 return;
00088 }
00089 else if(value)
00090 {
00091 UtilString::StringTok(namelist, string(value), ", ");
00092 }
00093
00094 cout << endl;
00095
00096 if(namelist.empty())
00097 {
00098 cerr << "RunAlgStore::Config - could not determine AlgStoreList names" << endl;
00099 }
00100 else if(fPrint)
00101 {
00102 cout << "RunAlgStore::Config - creating " << namelist.size() << " AlgStore algorithm(s)" << endl;
00103 }
00104
00105 for(vector<string>::const_iterator it = namelist.begin(); it != namelist.end(); ++it)
00106 {
00107 AlgStorePtr alg = Factory<AlgStore>::Instance().Create(*it);
00108
00109 if(alg.valid())
00110 {
00111 if(fPrint) cout << " " << *it << endl;
00112
00113 alg -> Name(*it);
00114
00115 fAlgVec.push_back(AlgCaddy<AlgStore>(alg, *it));
00116 }
00117 else
00118 {
00119 cerr << "RunAlgStore::Config - failed to create algorithm " << *it << endl;
00120 }
00121 }
00122
00123 for(StoreVec::iterator it = fAlgVec.begin(); it != fAlgVec.end(); ++it)
00124 {
00125 it -> alg -> Config(reg);
00126 }
00127 }
|
|
|
|
|
||||||||||||
|
Implements Anp::AlgStore. Definition at line 43 of file RunAlgStore.cxx. References Anp::AlgStorePtr, Anp::AlgCaddy< T >::AllSnarl(), fAlgVec, fCount, and Anp::AlgCaddy< T >::OutSnarl(). 00044 {
00045 //
00046 // Run children algorithms
00047 //
00048
00049 fCount.AllSnarl(record);
00050
00051 for(StoreVec::iterator it = fAlgVec.begin(); it != fAlgVec.end(); ++it)
00052 {
00053 AlgStorePtr alg = it -> alg;
00054
00055 it -> AllSnarl(record);
00056
00057 if(alg -> Run(record, ptr))
00058 {
00059 it -> OutSnarl(record);
00060 }
00061 else
00062 {
00063 return false;
00064 }
00065 }
00066
00067 fCount.OutSnarl(record);
00068
00069 return true;
00070 }
|
|
|
Definition at line 39 of file RunAlgStore.h. Referenced by Config(), Run(), and ~RunAlgStore(). |
|
|
Reimplemented from Anp::Base. Definition at line 41 of file RunAlgStore.h. Referenced by Run(), and ~RunAlgStore(). |
|
|
Definition at line 37 of file RunAlgStore.h. Referenced by Config(). |
1.3.9.1