HerdSoftware  0.3.2
ParametricGeoPsdReader.h
Go to the documentation of this file.
1 /*
2  * ParametricGeoPsdReader.h
3  *
4  * Created on: 26 May 2021
5  * Author: Valerio Formato
6  */
7 
10 #ifndef HERD_PARAMETRICGEOPSDREADER_H_
11 #define HERD_PARAMETRICGEOPSDREADER_H_
12 
13 #ifndef GGSSMARTLOG_H_
14 #define HERD_PARAMETRICGEOPSDREADER_H_UNDEF_LOGGING
15 #endif
16 
17 // GGS headers
18 #include "montecarlo/readers/GGSTRootReader.h"
19 
20 #ifdef HERD_PARAMETRICGEOPSDREADER_H_UNDEF_LOGGING
21 // Remove the definitions of GGS output macros (would conflict with the same macros defined in EventAnalysis)
22 // We only do this if GGSSmartLog.h is being parsed in this TU, otherwise there would be nothing to undef
23 // (or we could even be undefining the EA macros)
24 #undef COUT
25 #undef CCOUT
26 #undef ENDL
27 #endif
28 
29 // EA headers
30 #include "core/ObjectWrapper.h"
31 #include "core/RetrievalResult.h"
32 #include "utils/Memory.h"
33 
34 // HerdSoftware headers
35 #include "common/DefaultValues.h"
37 
38 // c++ headers
39 #include <functional>
40 #include <string>
41 
42 using namespace EA;
43 
44 namespace Herd {
45 
46 // TODO: write doxygen doc
47 
48 namespace Readers {
49 // clang-format off
55 // clang-format on
57 public:
58  enum class DetectorType { TILES, BARS };
59 
60  ParametricGeoPsdReader(std::shared_ptr<GGSTRootReader> ggsReader) : m_ggsReader{ggsReader} {};
61 
62  bool IsPsdGeoParamsAvailable();
63  RetrievalResult GetPsdGeoParamsColl(ObjectWrapper &wrapper);
64 
65  DetectorType Type() { return m_type; }
66 
67 private:
68  std::shared_ptr<GGSTRootReader> m_ggsReader;
69 
71 
73 
74  bool m_geoParamsRead = false;
75 
76  RetrievalResult BuildBarPsdGeoParams();
77  RetrievalResult BuildTilePsdGeoParams();
78 };
79 } // namespace Readers
80 } // namespace Herd
81 
82 #endif
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
SiliconDetectorGeoParams reader class.
Definition: ParametricGeoPsdReader.h:56
DetectorType m_type
Definition: ParametricGeoPsdReader.h:70
std::shared_ptr< GGSTRootReader > m_ggsReader
Definition: ParametricGeoPsdReader.h:68
PsdGeoParamsColl m_psdGeoParamsColl
Definition: ParametricGeoPsdReader.h:72
DetectorType
Definition: ParametricGeoPsdReader.h:58
ParametricGeoPsdReader(std::shared_ptr< GGSTRootReader > ggsReader)
Definition: ParametricGeoPsdReader.h:60
DetectorType Type()
Definition: ParametricGeoPsdReader.h:65