GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 <c.andreopoulos \at cern.ch>
9  University of Liverpool
10 
11 \created October 20, 2005
12 
13 \cpright Copyright (c) 2003-2024, The GENIE Collaboration
14  For the full text of the license visit http://copyright.genie-mc.org
15 */
16 //____________________________________________________________________________
17 
18 #ifndef _ALGID_H_
19 #define _ALGID_H_
20 
21 #include <string>
22 #include <iostream>
23 
25 
26 using std::string;
27 using std::ostream;
28 
29 namespace genie {
30 
31 class AlgId;
32 ostream & operator << (ostream & stream, const AlgId & alg);
33 
34 class AlgId {
35 
36 public:
37 
38  AlgId();
39  AlgId(string name, string config);
40  AlgId(const AlgId & id);
41  AlgId(const RgAlg & registry_item);
42  ~AlgId();
43 
44  string Name (void) const { return fName; }
45  string Config (void) const { return fConfig; }
46  string Key (void) const { return fKey; }
47 
48  void SetId (string name, string config="");
49  void SetName (string name);
50  void SetConfig (string config);
51  void Copy (const AlgId & id);
52  void Copy (const RgAlg & registry_item);
53  void Print (ostream & stream) const;
54 
55  friend ostream & operator << (ostream & stream, const AlgId & alg);
56 
57 private:
58 
59  void Init (void);
60  void UpdateKey (void);
61 
62  string fName; ///< Algorithm name (including namespaces)
63  string fConfig; ///< Configuration set name
64  string fKey; ///< Unique key: namespace::alg_name/alg_config
65 };
66 
67 } // genie namespace
68 
69 #endif // _ALGID_H_
void SetName(string name)
Definition: AlgId.cxx:54
string fName
Algorithm name (including namespaces)
Definition: AlgId.h:62
string fConfig
Configuration set name.
Definition: AlgId.h:63
friend ostream & operator<<(ostream &stream, const AlgId &alg)
Definition: AlgId.cxx:22
void Print(ostream &stream) const
Definition: AlgId.cxx:88
string Name(void) const
Definition: AlgId.h:44
void SetId(string name, string config="")
Definition: AlgId.cxx:64
void SetConfig(string config)
Definition: AlgId.cxx:59
Algorithm ID (algorithm name + configuration set name)
Definition: AlgId.h:34
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
void Init(void)
Definition: AlgId.cxx:103
string Key(void) const
Definition: AlgId.h:46
void UpdateKey(void)
Definition: AlgId.cxx:93
string Config(void) const
Definition: AlgId.h:45
string fKey
Unique key: namespace::alg_name/alg_config.
Definition: AlgId.h:64
void Copy(const AlgId &id)
Definition: AlgId.cxx:72