PandaRoot
PndMeasurementBoundaries.h
Go to the documentation of this file.
1 /*
2  * PndMeasurementBoundaries.h
3  *
4  * Created on: 09.11.2022
5  * Author: tstockmanns
6  */
7 
8 #pragma once
9 
10 #include <string>
11 #include <ostream>
12 #include <map>
13 #include <iostream>
14 
16  PndMeasurementObject(std::string name = "", double lowVal = 0., double highVal = 0.) : fVerboseName(name), fLowerBoundary(lowVal), fHigherBoundary(highVal) {}
17  std::string fVerboseName;
18  double fValue = 0;
19  double fLowerBoundary = 0;
20  double fHigherBoundary = 0;
21  bool PassTest() { return ((fValue > fLowerBoundary) && (fValue < fHigherBoundary)); }
22 };
23 
25  public:
27  virtual ~PndMeasurementBoundaries();
28  void SetBoundaries(std::string mapName, double lowVal, double highVal, std::string measurementName = "");
29  void SetMeasurement(std::string name, double val);
30  bool CheckBoundaries();
31  PndMeasurementObject GetMeasurement(std::string mapName);
32  std::map<std::string, PndMeasurementObject> GetMeasurementMap() const { return fMeasurementBoundaries; }
33  void PrintDartMeasurement(std::ostream &out = std::cout);
34 
35  private:
36  std::map<std::string, PndMeasurementObject> fMeasurementBoundaries;
37 };
std::map< std::string, PndMeasurementObject > GetMeasurementMap() const
PndMeasurementObject(std::string name="", double lowVal=0., double highVal=0.)