LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
CalibrationExtraInfo.h
Go to the documentation of this file.
1 #ifndef CALIBRATIONEXTRAINFO_H
2 #define CALIBRATIONEXTRAINFO_H
3 
4 #include <map>
5 #include <string>
6 #include <vector>
7 
8 namespace lariov {
9 
11 
12  public:
13  CalibrationExtraInfo(std::string const& name) : fName(name) {}
14 
15  virtual ~CalibrationExtraInfo() = default;
16 
17  //Get the name of the calibration
18  std::string const& GetName() const { return fName; }
19 
20  void AddOrReplaceBoolData(std::string const& label, bool const data);
21  void AddOrReplaceIntData(std::string const& label, int const data);
22  void AddOrReplaceVecIntData(std::string const& label, std::vector<int> const& data);
23  void AddOrReplaceFloatData(std::string const& label, float const data);
24  void AddOrReplaceVecFloatData(std::string const& label, std::vector<float> const& data);
25  void AddOrReplaceStringData(std::string const& label, std::string const& data);
26 
27  bool GetBoolData(std::string const& label) const;
28  int GetIntData(std::string const& label) const;
29  std::vector<int> const& GetVecIntData(std::string const& label) const;
30  float GetFloatData(std::string const& label) const;
31  std::vector<float> const& GetVecFloatData(std::string const& label) const;
32  std::string const& GetStringData(std::string const& label) const;
33 
34  void ClearDataByLabel(std::string const& label);
35  void ClearAllData();
36 
37  private:
38  std::string fName;
39 
40  std::map<std::string, bool> fBoolData;
41 
42  std::map<std::string, int> fIntData;
43  std::map<std::string, std::vector<int>> fVecIntData;
44 
45  std::map<std::string, float> fFloatData;
46  std::map<std::string, std::vector<float>> fVecFloatData;
47 
48  std::map<std::string, std::string> fStringData;
49  };
50 }
51 
52 #endif
void AddOrReplaceVecIntData(std::string const &label, std::vector< int > const &data)
std::map< std::string, std::vector< float > > fVecFloatData
float GetFloatData(std::string const &label) const
void ClearDataByLabel(std::string const &label)
virtual ~CalibrationExtraInfo()=default
std::vector< float > const & GetVecFloatData(std::string const &label) const
std::map< std::string, std::string > fStringData
CalibrationExtraInfo(std::string const &name)
std::map< std::string, int > fIntData
std::string const & GetStringData(std::string const &label) const
void AddOrReplaceBoolData(std::string const &label, bool const data)
void AddOrReplaceVecFloatData(std::string const &label, std::vector< float > const &data)
void AddOrReplaceIntData(std::string const &label, int const data)
void AddOrReplaceStringData(std::string const &label, std::string const &data)
Filters for channels, events, etc.
std::map< std::string, bool > fBoolData
bool GetBoolData(std::string const &label) const
void AddOrReplaceFloatData(std::string const &label, float const data)
std::string const & GetName() const
std::map< std::string, std::vector< int > > fVecIntData
int GetIntData(std::string const &label) const
std::vector< int > const & GetVecIntData(std::string const &label) const
std::map< std::string, float > fFloatData