47 ostream &
operator << (ostream & stream,
const Algorithm & alg);
49 typedef map <string, Algorithm *>
AlgMap;
113 virtual void SetId(
string name,
string config);
135 virtual void Print(ostream & stream)
const;
139 static string BuildParamVectKey(
const std::string & comm_name,
unsigned int i ) ;
142 static string BuildParamMatKey(
const std::string & comm_name,
unsigned int i,
unsigned int j) ;
181 bool GetParam(
const RgKey & name, T & p,
bool is_top_call =
true )
const ;
191 int GetParamVect(
const std::string & comm_name, std::vector<T> & v,
192 bool is_top_call =
true )
const ;
194 int GetParamVectKeys(
const std::string & comm_name, std::vector<RgKey> & k,
195 bool is_top_call =
true )
const ;
199 int GetParamMat(
const std::string & comm_name, TMatrixT<T> & mat,
200 bool is_top_call =
true )
const ;
202 int GetParamMatSym(
const std::string & comm_name, TMatrixTSym<T> & mat,
203 bool is_top_call =
true )
const ;
205 int GetParamMatKeys(
const std::string & comm_name, std::vector<RgKey> & k,
206 bool is_top_call =
true )
const ;
213 int AddTopRegisties(
const vector<Registry*> & rs,
bool owns =
false ) ;
223 #ifndef __CINT__ // don't even try for ROOT 5
224 #include "Framework/Algorithm/Algorithm.icc"
227 #endif // _ALGORITHM_H_
static string BuildParamMatKey(const std::string &comm_name, unsigned int i, unsigned int j)
Registry * GetOwnedConfig(void)
friend ostream & operator<<(ostream &stream, const Algorithm &alg)
static string BuildParamMatColSizeKey(const std::string &comm_name)
void DeleteSubstructure(void)
int GetParamMatKeys(const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
Registry * ExtractLowerConfig(const Registry &in, const string &alg_key) const
Split an incoming configuration Registry into a block valid for the sub-algo identified by alg_key...
AlgStatus_t fStatus
algorithm execution status
AlgMap * fOwnedSubAlgMp
local pool for owned sub-algs (taken out of the factory pool)
int GetParamVect(const std::string &comm_name, std::vector< T > &v, bool is_top_call=true) const
Handle to load vectors of parameters.
bool fOwnsSubstruc
true if it owns its substructure (sub-algs,...)
int MergeTopRegistry(const Registry &r)
Algorithm abstract base class.
AlgId fID
algorithm name and configuration set
int AddTopRegisties(const vector< Registry * > &rs, bool owns=false)
Add registries with top priority, also udated Ownerships.
map< string, Algorithm * > AlgMap
int GetParamMat(const std::string &comm_name, TMatrixT< T > &mat, bool is_top_call=true) const
Handle to load matrix of parameters.
virtual const Registry & GetConfig(void) const
virtual AlgStatus_t GetStatus(void) const
Get algorithm status.
enum genie::EAlgCmp AlgCmp_t
enum genie::EAlgStatus AlgStatus_t
virtual void FindConfig(void)
static string BuildParamMatRowSizeKey(const std::string &comm_name)
virtual void Configure(const Registry &config)
void AdoptSubstructure(void)
pair< string, Algorithm * > AlgMapPair
int AddTopRegistry(Registry *rp, bool owns=true)
add registry with top priority, also update ownership
Algorithm ID (algorithm name + configuration set name)
map< string, Algorithm * >::const_iterator AlgMapConstIter
virtual const AlgId & Id(void) const
Get algorithm ID.
vector< Registry * > fConfVect
static string BuildParamVectSizeKey(const std::string &comm_name)
virtual bool AllowReconfig(void) const
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
A registry. Provides the container for algorithm configuration parameters.
vector< bool > fOwnerships
ownership for every registry in fConfVect
int GetParamVectKeys(const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
virtual AlgCmp_t Compare(const Algorithm *alg) const
Compare with input algorithm.
virtual void Print(ostream &stream) const
Print algorithm info.
int GetParamMatSym(const std::string &comm_name, TMatrixTSym< T > &mat, bool is_top_call=true) const
Registry * fConfig
Summary configuration derived from fConvVect, not necessarily allocated.
virtual void SetId(const AlgId &id)
Set algorithm ID.
int AddLowRegistry(Registry *rp, bool owns=true)
add registry with lowest priority, also update ownership
Registry * ExtractLocalConfig(const Registry &in) const
bool GetParamDef(const RgKey &name, T &p, const T &def) const
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
map< string, Algorithm * >::iterator AlgMapIter
static string BuildParamVectKey(const std::string &comm_name, unsigned int i)
const Algorithm * SubAlg(const RgKey ®istry_key) const