FDetector/Eye.h
Go to the documentation of this file.
1 #ifndef _fdet_Eye_h_
2 #define _fdet_Eye_h_
3 
4 #include <list>
5 #include <set>
6 #include <boost/iterator/indirect_iterator.hpp>
7 #include <boost/iterator/filter_iterator.hpp>
8 
9 #include <utl/CoordinateSystemPtr.h>
10 
11 #include <det/ValidityStamp.h>
12 
13 namespace utl {
14  class Point;
15  class TabulatedFunction;
16  class TimeInterval;
17 }
18 
19 namespace det{
20  class Detector;
21 }
22 
23 
24 namespace fdet {
25 
26  class Telescope;
27  class FDetector;
28 
31  bool operator()(const fdet::Telescope& tel) const;
32  };
33 
34 
45  class Eye {
46 
47  private:
48  typedef std::list<int> FullTelescopeIdList;
49  typedef std::list<Telescope*> FullTelescopeList;
50  typedef FullTelescopeList::iterator FullTelescopeIterator;
51  typedef FullTelescopeList::const_iterator FullTelescopeConstIterator;
52 
53  typedef boost::indirect_iterator<FullTelescopeIterator,
55  typedef boost::indirect_iterator<FullTelescopeConstIterator,
57 
66 
67  public:
69  unsigned int GetFirstTelescopeId() const;
70 
72  unsigned int GetLastTelescopeId() const;
73 
75  typedef boost::filter_iterator<TelIsCommissioned,
77 
81 
85 
87  const Telescope& GetTelescope(const unsigned int telescopeId) const;
88 
90  utl::Point GetPosition() const;
91 
93 
100 
102 
104 
109  double GetBackwallAngle() const;
110 
112  const std::string& GetName() const;
113  const std::string& GetNameAbbr() const;
114 
116  unsigned int GetId() const { return fEyeId; }
117 
121  unsigned int GetParentPhysicalId() const
123 
127  const std::string& GetParentPhysicalIdString() const
129 
131  bool IsVirtual() const { return fIdOfParentPhysicalEye != 0; }
132 
134  std::set<unsigned int> GetParticipatingEyeIds() const;
135 
140  const utl::TimeInterval& GetSDTimeOffset() const;
141 
142  double GetUpTimeFraction() const;
143  double GetFDASVetoFraction() const;
144  double GetCDASVetoFraction() const;
145  bool IsInAquisition() const;
147  int GetDAQStatus() const;
148 
149  double GetModelMinWavelength() const;
150  double GetModelMaxWavelength() const;
151 
152  private:
153  Eye(const unsigned int eyeId);
154  ~Eye();
155  Eye(const Eye&);
156  Eye& operator=(const Eye&);
157 
158  void Update();
159 
160  void GetFullTelescopeList() const;
161  void UpdateFdUpTime() const;
162 
163  template<typename T> inline const T& GetEyeData(T*& requestedData,
164  const std::string& property,
165  const std::string& component,
166  const std::string& errorMsg) const;
167  template<typename T> inline void GetEyeData(T& requestedData,
168  const std::string& property,
169  const std::string& component,
170  const std::string& errorMsg) const;
171 
172  unsigned int fEyeId;
173  // Id held also as a string as that is what is passed through the manager interface
174  std::string fEyeIdString;
175 
176  // If this is > 0, we have a virtual eye
179 
181 
182  // List of all Telescopes available in the external sources
183  // (external sources are, for example, the XML files containing
184  // the telescope/eye list or perhaps at some point a MySQL database
186 
187  // Quantities filled by lazy evaluation
188  // ------------------------------------
190  mutable std::string* fName;
191  mutable std::string* fNameAbbr;
193  mutable double* fBackwallAngle; // angle of the back wall from the east
196 
197  // up time info
199  mutable double fUpTimeFraction;
200  mutable double fCDASVetoFraction;
201  mutable double fFDASVetoFraction;
202  mutable int fStatus;
203 
204  friend class FDetector;
205 
206  };
207 
208 }
209 
210 
211 #endif
212 
213 // Configure (x)emacs for this file ...
214 // Local Variables:
215 // mode: c++
216 // compile-command: "make -C .. FDetector/Eye.o -k"
217 // End:
utl::CoordinateSystemPtr GetLocalCoordinateSystem() const
The Auger coordinate system (x to east, z local verical) for this eye.
std::string * fName
utl::CoordinateSystemPtr fCoordinateSystem
void Update()
void UpdateFdUpTime() const
const T & GetEyeData(T *&requestedData, const std::string &property, const std::string &component, const std::string &errorMsg) const
Point object.
Definition: Point.h:32
double GetCDASVetoFraction() const
const utl::TabulatedFunction & GetTimeCorrectionFactors() const
int fIdOfParentPhysicalEye
void GetFullTelescopeList() const
double fCDASVetoFraction
FullTelescopeIdList * fFullTelescopeIdList
Class to hold collection (x,y) points and provide interpolation between them.
FullTelescopeList::const_iterator FullTelescopeConstIterator
Definition: FDetector/Eye.h:51
FullTelescopeList::iterator FullTelescopeIterator
Definition: FDetector/Eye.h:50
double fUpTimeFraction
Detector description interface for Eye-related data.
Definition: FDetector/Eye.h:45
double * fBackwallAngle
unsigned int GetFirstTelescopeId() const
First telescope id in the eye.
InternalTelescopeIterator FullTelescopesBegin()
Definition: FDetector/Eye.h:58
det::ValidityStamp fUpTimeValidityStamp
Detector description interface for FDetector-related data.
Definition: FDetector.h:44
double GetUpTimeFraction() const
boost::indirect_iterator< FullTelescopeIterator, Telescope & > InternalTelescopeIterator
Definition: FDetector/Eye.h:54
const std::string & GetParentPhysicalIdString() const
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
boost::indirect_iterator< FullTelescopeConstIterator, const Telescope & > InternalConstTelescopeIterator
Definition: FDetector/Eye.h:56
utl::Point * fPosition
double fFDASVetoFraction
std::string fIdOfParentPhysicalEyeString
utl::CoordinateSystemPtr GetEyeCoordinateSystem() const
Returns the Eye Coordinate system.
double GetFDASVetoFraction() const
unsigned int GetParentPhysicalId() const
TelescopeIterator TelescopesBegin() const
Beginning of the collection of telescopes.
Definition: FDetector/Eye.h:79
unsigned int fEyeId
const Telescope & GetTelescope(const unsigned int telescopeId) const
Find Telescope by numerical Id.
unsigned int GetId() const
Eye numerical Id.
Predicate specifying whether telescope is commissioned.
Definition: FDetector/Eye.h:30
const std::string & GetNameAbbr() const
InternalConstTelescopeIterator FullTelescopesBegin() const
Definition: FDetector/Eye.h:60
double GetModelMinWavelength() const
boost::filter_iterator< TelIsCommissioned, InternalConstTelescopeIterator > TelescopeIterator
An iterator over telescopes.
Definition: FDetector/Eye.h:76
bool operator()(const fdet::Telescope &tel) const
std::list< int > FullTelescopeIdList
Definition: FDetector/Eye.h:48
const utl::TimeInterval & GetSDTimeOffset() const
Time Offset of this eye with respect to SD.
Detector description interface for Telescope-related data.
A TimeInterval is used to represent time elapsed between two events.
Definition: TimeInterval.h:43
Eye & operator=(const Eye &)
double GetBackwallAngle() const
std::list< Telescope * > FullTelescopeList
Definition: FDetector/Eye.h:49
int GetDAQStatus() const
0 == not in DAQ
unsigned int GetLastTelescopeId() const
Last telescope id in the eye.
std::string fEyeIdString
TelescopeIterator TelescopesEnd() const
End of the collection of telescopes.
Definition: FDetector/Eye.h:83
Eye(const unsigned int eyeId)
FullTelescopeList fFullTelescopeList
Object to keep track of whether data are valid, or have expired.
Definition: ValidityStamp.h:29
std::set< unsigned int > GetParticipatingEyeIds() const
Returns a list of eye id&#39;s that participate in this (virtual) eye.
InternalConstTelescopeIterator FullTelescopesEnd() const
Definition: FDetector/Eye.h:64
utl::TimeInterval * fSDTimeOffset
bool IsInAquisition() const
utl::Point GetPosition() const
Eye position.
utl::TabulatedFunction * fTimeCorrectionFactors
double GetModelMaxWavelength() const
const std::string & GetName() const
Eye name.
bool IsVirtual() const
Returns whether this eye is a virtual eye.
std::string * fNameAbbr
InternalTelescopeIterator FullTelescopesEnd()
Definition: FDetector/Eye.h:62

, generated on Tue Sep 26 2023.