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 "/cvmfs/nova.opensciencegrid.org/externals/genie/v3_00_06_p01a/Linux64bit+3.10-2.17-e19-debug/GENIE-Generator/src/Framework/Algorithm/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 <costas.andreopoulos stfc.ac.uk> University of Liverpool & STFC Rutherford Appleton Lab

October 20, 2005

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

Definition at line 35 of file AlgId.h.

Constructor & Destructor Documentation

AlgId::AlgId ( )

Definition at line 35 of file AlgId.cxx.

References Init().

36 {
37  this->Init();
38 }
void Init(void)
Definition: AlgId.cxx:109
AlgId::AlgId ( string  name,
string  config 
)

Definition at line 40 of file AlgId.cxx.

References SetId().

41 {
42  this->SetId(name,config);
43 }
const XML_Char * name
Definition: expat.h:151
Definition: config.py:1
void SetId(string name, string config="")
Definition: AlgId.cxx:70
AlgId::AlgId ( const AlgId id)

Definition at line 45 of file AlgId.cxx.

References Copy().

46 {
47  this->Copy(id);
48 }
void Copy(const AlgId &id)
Definition: AlgId.cxx:78
AlgId::AlgId ( const RgAlg registry_item)

Definition at line 50 of file AlgId.cxx.

References Copy().

51 {
52  this->Copy(registry_item);
53 }
void Copy(const AlgId &id)
Definition: AlgId.cxx:78
AlgId::~AlgId ( )

Definition at line 55 of file AlgId.cxx.

56 {
57 
58 }

Member Function Documentation

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

Definition at line 78 of file AlgId.cxx.

References fConfig, fName, and UpdateKey().

Referenced by AlgId(), and Key().

79 {
80  this->fName = id.Name();
81  this->fConfig = id.Config();
82 
83  this->UpdateKey();
84 }
string fName
Algorithm name (including namespaces)
Definition: AlgId.h:63
string fConfig
Configuration set name.
Definition: AlgId.h:64
void UpdateKey(void)
Definition: AlgId.cxx:99
void AlgId::Copy ( const RgAlg registry_item)

Definition at line 86 of file AlgId.cxx.

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

87 {
88  this->fName = registry_item.name;
89  this->fConfig = registry_item.config;
90 
91  this->UpdateKey();
92 }
string fName
Algorithm name (including namespaces)
Definition: AlgId.h:63
string fConfig
Configuration set name.
Definition: AlgId.h:64
void UpdateKey(void)
Definition: AlgId.cxx:99
string config
void AlgId::Init ( void  )
private

Definition at line 109 of file AlgId.cxx.

References fConfig, fKey, and fName.

Referenced by AlgId(), and Key().

110 {
111  this->fName = "";
112  this->fConfig = "";
113  this->fKey = "";
114 }
string fName
Algorithm name (including namespaces)
Definition: AlgId.h:63
string fConfig
Configuration set name.
Definition: AlgId.h:64
string fKey
Unique key: namespace::alg_name/alg_config.
Definition: AlgId.h:65
string genie::AlgId::Key ( void  ) const
inline
string genie::AlgId::Name ( void  ) const
inline
void AlgId::Print ( ostream &  stream) const

Definition at line 94 of file AlgId.cxx.

References Key().

Referenced by Key(), and genie::operator<<().

95 {
96  stream << this->Key();
97 }
string Key(void) const
Definition: AlgId.h:47
void AlgId::SetConfig ( string  config)

Definition at line 65 of file AlgId.cxx.

References Name(), and SetId().

Referenced by Key().

66 {
67  this->SetId(this->Name(), config);
68 }
Definition: config.py:1
string Name(void) const
Definition: AlgId.h:45
void SetId(string name, string config="")
Definition: AlgId.cxx:70
void AlgId::SetId ( string  name,
string  config = "" 
)

Definition at line 70 of file AlgId.cxx.

References gen_hdf5record::config, fConfig, fName, and UpdateKey().

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

71 {
72  this->fName = name;
73  this->fConfig = config;
74 
75  this->UpdateKey();
76 }
const XML_Char * name
Definition: expat.h:151
string fName
Algorithm name (including namespaces)
Definition: AlgId.h:63
string fConfig
Configuration set name.
Definition: AlgId.h:64
void UpdateKey(void)
Definition: AlgId.cxx:99
void AlgId::SetName ( string  name)

Definition at line 60 of file AlgId.cxx.

References Config(), and SetId().

Referenced by Key().

61 {
62  this->SetId(name, this->Config());
63 }
const XML_Char * name
Definition: expat.h:151
void SetId(string name, string config="")
Definition: AlgId.cxx:70
string Config(void) const
Definition: AlgId.h:46
void AlgId::UpdateKey ( void  )
private

Definition at line 99 of file AlgId.cxx.

References Config(), fKey, findDuplicateFiles::key, Name(), and gen_hdf5record::size.

Referenced by Copy(), Key(), and SetId().

100 {
101  ostringstream key;
102 
103  key << this->Name();
104  if(this->Config().size() > 0) key << "/" << this->Config();
105 
106  fKey = key.str();
107 }
string Name(void) const
Definition: AlgId.h:45
string Config(void) const
Definition: AlgId.h:46
string fKey
Unique key: namespace::alg_name/alg_config.
Definition: AlgId.h:65

Friends And Related Function Documentation

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

Definition at line 28 of file AlgId.cxx.

Referenced by Key().

29  {
30  algid.Print(stream);
31  return stream;
32  }

Member Data Documentation

string genie::AlgId::fConfig
private

Configuration set name.

Definition at line 64 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 65 of file AlgId.h.

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

string genie::AlgId::fName
private

Algorithm name (including namespaces)

Definition at line 63 of file AlgId.h.

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


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