Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
genie::AlgId Class Reference

Algorithm ID (algorithm name + configuration set name) More...

#include <AlgId.h>

Public Member Functions

 AlgId ()
 
 AlgId (string name, string config)
 
 AlgId (const AlgId &id)
 
 AlgId (const RgAlg &registry_item)
 
 ~AlgId ()
 
string Name (void) const
 
string Config (void) const
 
string Key (void) const
 
void SetId (string name, string config="")
 
void SetName (string name)
 
void SetConfig (string config)
 
void Copy (const AlgId &id)
 
void Copy (const RgAlg &registry_item)
 
void Print (ostream &stream) const
 

Private Member Functions

void Init (void)
 
void UpdateKey (void)
 

Private Attributes

string fName
 Algorithm name (including namespaces) More...
 
string fConfig
 Configuration set name. More...
 
string fKey
 Unique key: namespace::alg_name/alg_config. More...
 

Friends

ostream & operator<< (ostream &stream, const AlgId &alg)
 

Detailed Description

Algorithm ID (algorithm name + configuration set name)

Author
Costas Andreopoulos <constantinos.andreopoulos cern.ch> University of Liverpool & STFC Rutherford Appleton Laboratory

October 20, 2005

Copyright (c) 2003-2020, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Definition at line 34 of file AlgId.h.

Constructor & Destructor Documentation

AlgId::AlgId ( )

Definition at line 29 of file AlgId.cxx.

30 {
31  this->Init();
32 }
void Init(void)
Definition: AlgId.cxx:103
AlgId::AlgId ( string  name,
string  config 
)

Definition at line 34 of file AlgId.cxx.

35 {
36  this->SetId(name,config);
37 }
static QCString name
Definition: declinfo.cpp:673
static Config * config
Definition: config.cpp:1054
void SetId(string name, string config="")
Definition: AlgId.cxx:64
AlgId::AlgId ( const AlgId id)

Definition at line 39 of file AlgId.cxx.

40 {
41  this->Copy(id);
42 }
void Copy(const AlgId &id)
Definition: AlgId.cxx:72
AlgId::AlgId ( const RgAlg registry_item)

Definition at line 44 of file AlgId.cxx.

45 {
46  this->Copy(registry_item);
47 }
void Copy(const AlgId &id)
Definition: AlgId.cxx:72
AlgId::~AlgId ( )

Definition at line 49 of file AlgId.cxx.

50 {
51 
52 }

Member Function Documentation

string genie::AlgId::Config ( void  ) const
inline

Definition at line 45 of file AlgId.h.

45 { return fConfig; }
string fConfig
Configuration set name.
Definition: AlgId.h:63
void AlgId::Copy ( const AlgId id)

Definition at line 72 of file AlgId.cxx.

73 {
74  this->fName = id.Name();
75  this->fConfig = id.Config();
76 
77  this->UpdateKey();
78 }
string fName
Algorithm name (including namespaces)
Definition: AlgId.h:62
string fConfig
Configuration set name.
Definition: AlgId.h:63
void UpdateKey(void)
Definition: AlgId.cxx:93
void AlgId::Copy ( const RgAlg registry_item)

Definition at line 80 of file AlgId.cxx.

81 {
82  this->fName = registry_item.name;
83  this->fConfig = registry_item.config;
84 
85  this->UpdateKey();
86 }
string fName
Algorithm name (including namespaces)
Definition: AlgId.h:62
string fConfig
Configuration set name.
Definition: AlgId.h:63
void UpdateKey(void)
Definition: AlgId.cxx:93
string config
void AlgId::Init ( void  )
private

Definition at line 103 of file AlgId.cxx.

104 {
105  this->fName = "";
106  this->fConfig = "";
107  this->fKey = "";
108 }
string fName
Algorithm name (including namespaces)
Definition: AlgId.h:62
string fConfig
Configuration set name.
Definition: AlgId.h:63
string fKey
Unique key: namespace::alg_name/alg_config.
Definition: AlgId.h:64
string genie::AlgId::Key ( void  ) const
inline

Definition at line 46 of file AlgId.h.

46 { return fKey; }
string fKey
Unique key: namespace::alg_name/alg_config.
Definition: AlgId.h:64
string genie::AlgId::Name ( void  ) const
inline

Definition at line 44 of file AlgId.h.

44 { return fName; }
string fName
Algorithm name (including namespaces)
Definition: AlgId.h:62
void AlgId::Print ( ostream &  stream) const

Definition at line 88 of file AlgId.cxx.

89 {
90  stream << this->Key();
91 }
string Key(void) const
Definition: AlgId.h:46
void AlgId::SetConfig ( string  config)

Definition at line 59 of file AlgId.cxx.

60 {
61  this->SetId(this->Name(), config);
62 }
string Name(void) const
Definition: AlgId.h:44
static Config * config
Definition: config.cpp:1054
void SetId(string name, string config="")
Definition: AlgId.cxx:64
void AlgId::SetId ( string  name,
string  config = "" 
)

Definition at line 64 of file AlgId.cxx.

65 {
66  this->fName = name;
67  this->fConfig = config;
68 
69  this->UpdateKey();
70 }
static QCString name
Definition: declinfo.cpp:673
string fName
Algorithm name (including namespaces)
Definition: AlgId.h:62
string fConfig
Configuration set name.
Definition: AlgId.h:63
static Config * config
Definition: config.cpp:1054
void UpdateKey(void)
Definition: AlgId.cxx:93
void AlgId::SetName ( string  name)

Definition at line 54 of file AlgId.cxx.

55 {
56  this->SetId(name, this->Config());
57 }
static QCString name
Definition: declinfo.cpp:673
void SetId(string name, string config="")
Definition: AlgId.cxx:64
string Config(void) const
Definition: AlgId.h:45
void AlgId::UpdateKey ( void  )
private

Definition at line 93 of file AlgId.cxx.

94 {
95  ostringstream key;
96 
97  key << this->Name();
98  if(this->Config().size() > 0) key << "/" << this->Config();
99 
100  fKey = key.str();
101 }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
string Name(void) const
Definition: AlgId.h:44
def key(type, name=None)
Definition: graph.py:13
string Config(void) const
Definition: AlgId.h:45
string fKey
Unique key: namespace::alg_name/alg_config.
Definition: AlgId.h:64

Friends And Related Function Documentation

ostream& operator<< ( ostream &  stream,
const AlgId alg 
)
friend

Definition at line 22 of file AlgId.cxx.

23  {
24  algid.Print(stream);
25  return stream;
26  }

Member Data Documentation

string genie::AlgId::fConfig
private

Configuration set name.

Definition at line 63 of file AlgId.h.

string genie::AlgId::fKey
private

Unique key: namespace::alg_name/alg_config.

Definition at line 64 of file AlgId.h.

string genie::AlgId::fName
private

Algorithm name (including namespaces)

Definition at line 62 of file AlgId.h.


The documentation for this class was generated from the following files: