gdata
gTrueInfoData.h
Go to the documentation of this file.
1 #pragma once
2 
11 #include <string>
12 #include <map>
13 #include <vector>
14 #include "ghit.h"
15 #include "glogger.h"
16 
18 public:
24  GTrueInfoData(GHit* ghit, std::shared_ptr<GLogger> logger);
25 
29  ~GTrueInfoData() { log->debug(DESTRUCTOR, "GTrueInfoData"); }
30 
35  std::string getIdentityString();
36 
42  void includeVariable(const std::string& varName, double var);
43 
49  void includeVariable(const std::string& varName, std::string var);
50 
55  [[nodiscard]] inline std::map<std::string, double> getDoubleVariablesMap() const {
56  return trueInfoDoublesVariablesMap;
57  }
58 
63  [[nodiscard]] inline std::map<std::string, std::string> getStringVariablesMap() const {
64  return trueInfoStringVariablesMap;
65  }
66 
67 private:
68  std::map<std::string, double> trueInfoDoublesVariablesMap;
69  std::map<std::string, std::string> trueInfoStringVariablesMap;
70  std::vector<GIdentifier> gidentity;
71  std::shared_ptr<GLogger> log;
72 };
73 
std::map< std::string, double > getDoubleVariablesMap() const
Returns the map of double variables.
Definition: gTrueInfoData.h:55
void includeVariable(const std::string &varName, double var)
Includes a double variable in the true hit data.
~GTrueInfoData()
Destructor for GTrueInfoData.
Definition: gTrueInfoData.h:29
GTrueInfoData(GHit *ghit, std::shared_ptr< GLogger > logger)
Constructs a GTrueInfoData object.
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:63