SDenseStationListXMLManager.h
Go to the documentation of this file.
1 #ifndef _sdet_SDenseStationListXMLManager_h_
2 #define _sdet_SDenseStationListXMLManager_h_
3 
4 #include <set>
5 #include <det/VManager.h>
6 
7 
8 namespace sdet {
9 
43 
44  public:
45  SDenseStationListXMLManager() = default;
46  virtual ~SDenseStationListXMLManager() = default;
47 
48  virtual void Init(const std::string& configLink);
49 
52  VMANAGER_GETDATA_DECLARE(std::string);
53  VMANAGER_GETDATA_DECLARE(std::vector<int>);
54  VMANAGER_GETDATA_DECLARE(std::vector<bool>);
55 
56  //
57 
58  VMANAGER_GETDATA_NOTFOUND(std::vector<std::string>)
59  //VMANAGER_GETDATA_NOTFOUND(unsigned long long int)
60  VMANAGER_GETDATA_NOTFOUND(std::list<double>)
61  VMANAGER_GETDATA_NOTFOUND(std::list<std::string>)
62  VMANAGER_GETDATA_NOTFOUND(std::list<int>)
63  VMANAGER_GETDATA_NOTFOUND(std::list<std::pair<int, int> >)
64  VMANAGER_GETDATA_NOTFOUND(std::vector<std::vector<int> >)
65  VMANAGER_GETDATA_NOTFOUND(std::vector<double>)
68  VMANAGER_GETDATA_NOTFOUND(std::map<std::string, double>)
69  VMANAGER_GETDATA_NOTFOUND(std::map<int, utl::TabulatedFunction>)
70 
71  private:
72  void GetFullStationList(std::vector<int>& returnData) const;
73 
74  // check if the station in question is on the dense list
75  bool IsDense(const IndexMap& compIndex) const;
76 
78 
79  std::set<int> fDenseStationList;
80 
81  mutable std::string fFirstStationId;
82  mutable std::string fFirstComponentProperty;
83 
84  class DenseStations {
85  private:
86  struct UTM {
87  double fNorthing = 0;
88  double fEasting = 0;
89  double fHeight = 0;
90  };
91 
92  public:
93  void Validate(const evt::Event& event);
94  bool HasStation(const int id) const { return fStations.find(id) != fStations.end(); }
95  void AddStation(const int id, const double r, const double phi);
96  const UTM& GetStation(const int id) const { return fStations.find(id)->second; }
97 
98  private:
99  void Init(const evt::Event& event);
100  void Validate(const std::string& eventId) { if (eventId.empty() || eventId != fEventId) Clear(); }
101  void Clear() { fEventId.clear(); fStations.clear(); }
102 
103  std::string fEventId;
104 
110 
111  typedef std::map<int, UTM> StationMap;
113  };
114 
116 
117  };
118 
119 }
120 
121 
122 #endif
VMANAGER_GETDATA_HANDLE_DENIED std::set< int > fDenseStationList
Point object.
Definition: Point.h:32
Class to hold collection (x,y) points and provide interpolation between them.
Manager to return station positions for array defined in shower coordinates.
virtual void Init(const std::string &configLink)
Manager Initialization. configLink is the CentralConfig hook for the configuration file...
Interface for detector managers.
Definition: VManager.h:115
void AddStation(const int id, const double r, const double phi)
void GetFullStationList(std::vector< int > &returnData) const
Class describing a Plane object.
Definition: Plane.h:17
Class to hold collection (x,y) points and provide interpolation between them, where y are complex num...
#define VMANAGER_GETDATA_HANDLE_DENIED
Definition: VManager.h:75
bool IsDense(const IndexMap &compIndex) const
std::map< std::string, std::string > IndexMap
Definition: VManager.h:133
Vector object.
Definition: Vector.h:30
virtual ~SDenseStationListXMLManager()=default
#define VMANAGER_GETDATA_NOTFOUND(_T_...)
Definition: VManager.h:41

, generated on Tue Sep 26 2023.