HerdSoftware  0.3.2
ParametricGeoFitReader.h
Go to the documentation of this file.
1 /*
2  * ParametricGeoFitReader.h
3  *
4  * Created on: 25 May 2021
5  * Author: Valerio Formato
6  */
7 
10 #ifndef HERD_PARAMETRICGEOFITREADER_H_
11 #define HERD_PARAMETRICGEOFITREADER_H_
12 
13 #ifndef GGSSMARTLOG_H_
14 #define HERD_PARAMETRICGEOFITREADER_H_UNDEF_LOGGING
15 #endif
16 
17 // GGS headers
18 #include "montecarlo/readers/GGSTRootReader.h"
19 
20 #ifdef HERD_PARAMETRICGEOFITREADER_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  ParametricGeoFitReader(std::shared_ptr<GGSTRootReader> ggsReader) : m_ggsReader{ggsReader} {};
59 
60  bool IsFitGeoParamsAvailable();
61  RetrievalResult GetFitGeoParamsColl(ObjectWrapper &wrapper);
62 
69  std::array<int, 4> SideDetectorFirstVolumeID() { return m_sideFitFirstVolumeID; }
70 
71 private:
72  std::shared_ptr<GGSTRootReader> m_ggsReader;
73 
75  std::array<int, 4> m_sideFitFirstVolumeID;
76 
77  bool m_geoParamsRead = false;
78 };
79 } // namespace Readers
80 } // namespace Herd
81 
82 #endif
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
std::array< int, 4 > SideDetectorFirstVolumeID()
Get the GGS volID of the first volume for each side FIT detector.
Definition: ParametricGeoFitReader.h:69
std::array< int, 4 > m_sideFitFirstVolumeID
Definition: ParametricGeoFitReader.h:75
FitGeoParamsColl m_fitGeoParamsColl
Definition: ParametricGeoFitReader.h:74
FitGeoParams reader class.
Definition: ParametricGeoFitReader.h:56
ParametricGeoFitReader(std::shared_ptr< GGSTRootReader > ggsReader)
Definition: ParametricGeoFitReader.h:58
std::shared_ptr< GGSTRootReader > m_ggsReader
Definition: ParametricGeoFitReader.h:72