AlgId.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::AlgId
5 
6 \brief Algorithm ID (algorithm name + configuration set name)
7 
8 \author Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk>
9  University of Liverpool & STFC Rutherford Appleton Lab
10 
11 \created October 20, 2005
12 
13 \cpright Copyright (c) 2003-2019, The GENIE Collaboration
14  For the full text of the license visit http://copyright.genie-mc.org
15  or see $GENIE/LICENSE
16 */
17 //____________________________________________________________________________
18 
19 #ifndef _ALGID_H_
20 #define _ALGID_H_
21 
22 #include <string>
23 #include <iostream>
24 
26 
27 using std::string;
28 using std::ostream;
29 
30 namespace genie {
31 
32 class AlgId;
33 ostream & operator << (ostream & stream, const AlgId & alg);
34 
35 class AlgId {
36 
37 public:
38 
39  AlgId();
40  AlgId(string name, string config);
41  AlgId(const AlgId & id);
42  AlgId(const RgAlg & registry_item);
43  ~AlgId();
44 
45  string Name (void) const { return fName; }
46  string Config (void) const { return fConfig; }
47  string Key (void) const { return fKey; }
48 
49  void SetId (string name, string config="");
50  void SetName (string name);
51  void SetConfig (string config);
52  void Copy (const AlgId & id);
53  void Copy (const RgAlg & registry_item);
54  void Print (ostream & stream) const;
55 
56  friend ostream & operator << (ostream & stream, const AlgId & alg);
57 
58 private:
59 
60  void Init (void);
61  void UpdateKey (void);
62 
63  string fName; ///< Algorithm name (including namespaces)
64  string fConfig; ///< Configuration set name
65  string fKey; ///< Unique key: namespace::alg_name/alg_config
66 };
67 
68 } // genie namespace
69 
70 #endif // _ALGID_H_
const XML_Char * name
Definition: expat.h:151
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
void SetName(string name)
Definition: AlgId.cxx:60
string fName
Algorithm name (including namespaces)
Definition: AlgId.h:63
string fConfig
Configuration set name.
Definition: AlgId.h:64
Definition: config.py:1
friend ostream & operator<<(ostream &stream, const AlgId &alg)
Definition: AlgId.cxx:28
void Print(ostream &stream) const
Definition: AlgId.cxx:94
string Name(void) const
Definition: AlgId.h:45
void SetId(string name, string config="")
Definition: AlgId.cxx:70
void SetConfig(string config)
Definition: AlgId.cxx:65
Algorithm ID (algorithm name + configuration set name)
Definition: AlgId.h:35
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
void Init(void)
Definition: AlgId.cxx:109
string Key(void) const
Definition: AlgId.h:47
void UpdateKey(void)
Definition: AlgId.cxx:99
string Config(void) const
Definition: AlgId.h:46
string fKey
Unique key: namespace::alg_name/alg_config.
Definition: AlgId.h:65
void Copy(const AlgId &id)
Definition: AlgId.cxx:78
enum BeamMode string