Detector.h
Go to the documentation of this file.
1 #ifndef _det_Detector_h_
2 #define _det_Detector_h_
3 
4 #include <det/VManager.h>
5 #include <det/ManagerRegister.h>
6 #include <utl/TimeStamp.h>
7 #include <utl/AugerException.h>
8 #include <utl/Singleton.h>
9 #include <utl/config.h>
10 
11 #ifdef AUGER_SQLITE_ENABLED
12 # include <det/VSQLManager_SQLite.h>
13 #else
14 # include <det/VSQLManager_MySQL.h>
15 #endif
16 
17 // Detector namespace is partitioned into det, sdet, fdet and rdet for
18 // practical reasons. However, user will probably expect both
19 // S and F detectors to be included with Detector.h, so we
20 // put them in this header file
21 
22 #include <sdet/SManagerRegister.h>
23 #include <fdet/FManagerRegister.h>
24 #include <mdet/MManagerRegister.h>
25 #include <cdet/CManagerRegister.h>
26 #include <atm/AManagerRegister.h>
27 #include <atm/Atmosphere.h>
28 #include <utl/CoordinateSystemPtr.h>
29 
30 #include <rdet/RManagerRegister.h>
31 
32 
33 namespace sdet {
34  class SDetector;
35 }
36 
37 namespace fdet {
38  class FDetector;
39 }
40 
41 namespace rdet {
42  class RDetector;
43 }
44 
45 namespace mdet {
46  class MDetector;
47 }
48 
49 namespace cdet {
50  class CDetector;
51 }
52 
53 namespace atm {
54  class Atmosphere;
55  class VProfileModel;
56  class VRayleighModel;
57  class VMieModel;
58 }
59 
60 namespace fwk {
61  class ParametricGeoMagneticField;
62 }
63 
64 namespace utl {
65  class Vector;
66  class Point;
67 }
68 
69 namespace det {
70 
81  class Detector : public utl::Singleton<Detector> {
82 
83  public:
84  // SD
85  const sdet::SDetector& GetSDetector() const;
86 
88  { return sdet::SManagerRegister::GetInstance(); }
89 
90  // FD
91  const fdet::FDetector& GetFDetector() const;
92 
94  { return fdet::FManagerRegister::GetInstance(); }
95 
96  // RD
97  const rdet::RDetector& GetRDetector() const;
98 
100  { return rdet::RManagerRegister::GetInstance(); }
101 
102  // MD
103  const mdet::MDetector& GetMDetector() const;
105  { return mdet::MManagerRegister::GetInstance(); }
106 
107  // CD
108  const cdet::CDetector& GetCDetector() const;
110  { return cdet::CManagerRegister::GetInstance(); }
111 
112  // Atm
114  { return fAtmosphere; }
115 
117  { return atm::AManagerRegister::GetInstance(); }
118 
131  void Update(const utl::TimeStamp& time, const bool invData = true, const bool invComp = true, const bool forceRadio = false);
132 
134  utl::TimeStamp GetTime() const { return fTime; }
135 
138  { return fSiteReferenceSystem; }
139 
142  { return fReferenceCoordinateSystem; }
143 
145  utl::Vector GetGeoMagneticFieldAt (const utl::Point & location);
146 
147  private:
148  Detector();
149  ~Detector();
150 
151  Detector(const Detector& detector);
152  Detector operator=(const Detector& detector);
153 
154  mutable sdet::SDetector* fSDetector = nullptr;
155  mutable fdet::FDetector* fFDetector = nullptr;
156  mutable rdet::RDetector* fRDetector = nullptr;
157  mutable cdet::CDetector* fCDetector = nullptr;
158  mutable mdet::MDetector* fMDetector = nullptr;
163 
165 
166  friend class utl::Singleton<Detector>;
167 
168  };
169 
170 }
171 
172 
173 #endif
void Update(const utl::TimeStamp &time, const bool invData=true, const bool invComp=true, const bool forceRadio=false)
Update detector: deletes currently constructed stations and sets new time.
Definition: Detector.cc:179
Top of the interface to Atmosphere information.
ManagerRegister & GetRManagerRegister() const
Definition: Detector.h:99
Point object.
Definition: Point.h:32
Detector description interface for CDetector-related data.
Definition: CDetector.h:40
ManagerRegister & GetMManagerRegister() const
Definition: Detector.h:104
utl::TimeStamp GetTime() const
Get time pertaining to the detector description.
Definition: Detector.h:134
ManagerRegister & GetFManagerRegister() const
Definition: Detector.h:93
const mdet::MDetector & GetMDetector() const
Definition: Detector.cc:155
utl::CoordinateSystemPtr fReferenceCoordinateSystem
Definition: Detector.h:162
const cdet::CDetector & GetCDetector() const
Definition: Detector.cc:167
utl::Vector GetGeoMagneticFieldAt(const utl::Point &location)
Definition: Detector.cc:238
utl::CoordinateSystemPtr GetSiteCoordinateSystem() const
Get the coordinate system for the site.
Definition: Detector.h:137
utl::TimeStamp fTime
Definition: Detector.h:160
sdet::SDetector * fSDetector
Definition: Detector.h:154
fdet::FDetector * fFDetector
Definition: Detector.h:155
Detector associated to muon detector hierarchy.
Definition: MDetector.h:32
Detector description interface for FDetector-related data.
Definition: FDetector.h:44
A TimeStamp holds GPS second and nanosecond for some event.
Definition: TimeStamp.h:110
Detector description interface for RDetector-related data.
Definition: RDetector.h:46
const atm::Atmosphere & GetAtmosphere() const
Definition: Detector.h:113
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
utl::CoordinateSystemPtr fSiteReferenceSystem
Definition: Detector.h:161
ManagerRegister & GetAManagerRegister() const
Definition: Detector.h:116
Top of the hierarchy of the detector description interface.
Definition: Detector.h:81
const sdet::SDetector & GetSDetector() const
Definition: Detector.cc:119
Detector operator=(const Detector &detector)
const fdet::FDetector & GetFDetector() const
Definition: Detector.cc:131
atm::Atmosphere fAtmosphere
Definition: Detector.h:159
Spherical harmonics parametrisation of geomagnetic field.
rdet::RDetector * fRDetector
Definition: Detector.h:156
fwk::ParametricGeoMagneticField & GetGeoMagneticField()
Definition: Detector.cc:227
ManagerRegister & GetSManagerRegister() const
Definition: Detector.h:87
utl::CoordinateSystemPtr GetReferenceCoordinateSystem() const
Get the reference coordinate system used for analysis (usually PampaAmarilla for Auger) ...
Definition: Detector.h:141
Register for detector description managers.
Vector object.
Definition: Vector.h:30
Detector description interface for SDetector-related data.
Definition: SDetector.h:42
mdet::MDetector * fMDetector
Definition: Detector.h:158
const rdet::RDetector & GetRDetector() const
Definition: Detector.cc:143
fwk::ParametricGeoMagneticField * fGeoMagneticField
Definition: Detector.h:164
ManagerRegister & GetCManagerRegister() const
Definition: Detector.h:109
Curiously Recurring Template Pattern (CRTP) for Meyers singleton.
Definition: Singleton.h:36
cdet::CDetector * fCDetector
Definition: Detector.h:157

, generated on Tue Sep 26 2023.