File indexing completed on 2025-12-13 10:29:00
0001 #ifndef ATOOLS_Org_Info_Key_H
0002 #define ATOOLS_Org_Info_Key_H
0003
0004 #include "ATOOLS/Math/Vector.H"
0005 #include <string>
0006 #include <vector>
0007 #include <iostream>
0008 #include <memory>
0009
0010 namespace ATOOLS {
0011
0012 typedef std::vector<double> Double_Container;
0013 typedef std::vector<Vec4D> Vector_Container;
0014
0015 namespace si {
0016
0017 enum code {
0018 idle = 0,
0019 reset = 1,
0020 dicing = 2,
0021 generated = 3,
0022 weighting = 4,
0023 weighted = 5,
0024 error = 6
0025 };
0026
0027 }
0028
0029 class Integration_Info;
0030
0031 class Info_Key {
0032 private:
0033
0034 Integration_Info *p_info;
0035 std::string m_name, m_info;
0036
0037 size_t m_valuekey, m_weightkey;
0038
0039 friend class Integration_Info;
0040
0041 public:
0042
0043
0044 Info_Key();
0045
0046
0047 ~Info_Key();
0048
0049
0050 void SetInfo(const std::string info);
0051
0052
0053 inline si::code SetStatus(const si::code sicode) const;
0054
0055
0056 inline const std::string &Name() const;
0057 inline const std::string &Info() const;
0058
0059 si::code Status() const;
0060
0061
0062 void Assign(const std::string name,const size_t doubles,
0063 const size_t vectors,Integration_Info *const info);
0064 void Assign(const std::string name,
0065 const size_t doubles,
0066 const size_t vectors,
0067 const std::shared_ptr<Integration_Info> &info);
0068
0069 inline Double_Container &Doubles() const;
0070 inline Vector_Container &Vectors() const;
0071
0072 inline double Double(const size_t i) const;
0073 inline ATOOLS::Vec4D Vector(const size_t i) const;
0074 inline double Weight() const;
0075
0076 inline bool Assigned() const;
0077
0078 inline double &operator[](const size_t i);
0079 inline ATOOLS::Vec4D &operator()(const size_t i);
0080
0081 inline void operator<<(const double weight);
0082
0083 inline Info_Key &operator=(const Info_Key &key);
0084 inline bool operator==(const Info_Key &key);
0085
0086 friend std::ostream &operator<<(std::ostream &str,const Info_Key &key);
0087
0088 };
0089
0090 std::ostream &operator<<(std::ostream &str,const Info_Key &key);
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129 }
0130
0131 #include "ATOOLS/Org/Info_Key.inl.H"
0132
0133 #endif