gdata
gTrueInfoData.h
Go to the documentation of this file.
1 #ifndef GTRUEINFOHIT_H
2 #define GTRUEINFOHIT_H 1
3 
12 #include <string>
13 #include <map>
14 #include <vector>
15 #include "ghit.h"
16 #include "glogger.h"
17 
19 public:
25  GTrueInfoData(GHit* ghit, std::shared_ptr<GLogger> logger);
26 
30  ~GTrueInfoData() { log->debug(DESTRUCTOR, "GTrueInfoData"); }
31 
36  std::string getIdentityString();
37 
43  void includeVariable(const std::string& varName, float var);
44 
50  void includeVariable(const std::string& varName, std::string var);
51 
56  [[nodiscard]] inline std::map<std::string, double> getFloatVariablesMap() const {
57  return trueInfoDoublesVariablesMap;
58  }
59 
64  [[nodiscard]] inline std::map<std::string, std::string> getStringVariablesMap() const {
65  return trueInfoStringVariablesMap;
66  }
67 
68 private:
69  std::map<std::string, double> trueInfoDoublesVariablesMap;
70  std::map<std::string, std::string> trueInfoStringVariablesMap;
71  std::vector<GIdentifier> gidentity;
72  std::shared_ptr<GLogger> log;
73 };
74 
75 #endif
~GTrueInfoData()
Destructor for GTrueInfoData.
Definition: gTrueInfoData.h:30
void includeVariable(const std::string &varName, float var)
Includes a float variable in the true hit data.
GTrueInfoData(GHit *ghit, std::shared_ptr< GLogger > logger)
Constructs a GTrueInfoData object.
std::map< std::string, double > getFloatVariablesMap() const
Returns the map of float variables.
Definition: gTrueInfoData.h:56
std::string getIdentityString()
Returns a string representation of the identity.
std::map< std::string, std::string > getStringVariablesMap() const
Returns the map of string variables.
Definition: gTrueInfoData.h:64