GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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>

Collaboration diagram for genie::AlgId:
Collaboration graph
[legend]

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 <c.andreopoulos cern.ch> University of Liverpool
Created:
October 20, 2005
License:
Copyright (c) 2003-2024, 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.

References Init().

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.

References SetId().

35 {
36  this->SetId(name,config);
37 }
void SetId(string name, string config="")
Definition: AlgId.cxx:64
const char * name
AlgId::AlgId ( const AlgId id)

Definition at line 39 of file AlgId.cxx.

References Copy().

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.

References Copy().

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
void AlgId::Copy ( const AlgId id)

Definition at line 72 of file AlgId.cxx.

References fConfig, fName, and UpdateKey().

Referenced by AlgId().

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.

References RgAlg::config, fConfig, fName, RgAlg::name, and UpdateKey().

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.

References fConfig, fKey, and fName.

Referenced by AlgId().

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
string genie::AlgId::Name ( void  ) const
inline
void AlgId::Print ( ostream &  stream) const

Definition at line 88 of file AlgId.cxx.

References Key().

Referenced by genie::operator<<().

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.

References Name(), and SetId().

60 {
61  this->SetId(this->Name(), config);
62 }
string Name(void) const
Definition: AlgId.h:44
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.

References fConfig, fName, and UpdateKey().

Referenced by AlgId(), SetConfig(), and SetName().

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

Definition at line 54 of file AlgId.cxx.

References Config(), and SetId().

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

Definition at line 93 of file AlgId.cxx.

References Config(), fKey, and Name().

Referenced by Copy(), and SetId().

94 {
95  ostringstream key;
96 
97  key << this->Name();
98  if(this->Config().size() > 0) key << "/" << this->Config();
99 
100  fKey = key.str();
101 }
string Name(void) const
Definition: AlgId.h:44
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.

Referenced by Config(), Copy(), Init(), and SetId().

string genie::AlgId::fKey
private

Unique key: namespace::alg_name/alg_config.

Definition at line 64 of file AlgId.h.

Referenced by Init(), Key(), and UpdateKey().

string genie::AlgId::fName
private

Algorithm name (including namespaces)

Definition at line 62 of file AlgId.h.

Referenced by Copy(), Init(), Name(), and SetId().


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