Offline2ADST.h
Go to the documentation of this file.
1 #ifndef _Offline2ADST_h_
2 #define _Offline2ADST_h_
3 
4 #include <adst/DetectorGeometry.h>
5 #include <adst/FileInfo.h>
6 
7 #include "Config.h"
8 #include "Status.h"
9 
10 
11 class GenShower;
12 class GenParticle;
13 class RecEvent;
14 namespace evt {
15  class Event;
16  class GenParticle;
17 };
18 
19 namespace otoa {
20 
27  class Offline2ADST {
28  public:
29  Offline2ADST() = default;
30  Offline2ADST(const otoa::Config& cfg);
31 
37  bool Convert(const evt::Event& event, RecEvent& recEvent);
38 
42 
43  const DetectorGeometry& GetDetectorGeometry() const { return fDetectorGeometry; }
44 
45  DetectorGeometry& GetDetectorGeometry() { return fDetectorGeometry; }
46 
47  const FileInfo& GetFileInfo() const { return fFileInfo; }
48 
49  FileInfo& GetFileInfo() { return fFileInfo; }
50 
52  inline const otoa::Config& Config() const { return fConfig; }
54  inline otoa::Config& Config() { return fConfig; }
55 
57  inline const otoa::Status& Status() const { return fStatus; }
59  inline otoa::Status& Status() { return fStatus; }
60 
61  int Verbosity() { return fConfig.Verbosity(); } // delegated
62 
63  private:
65  void FillRadio(const evt::Event& event, RecEvent& recEvent);
66 
67  void FillGlobalInfo(const evt::Event& event, RecEvent& recEvent);
68 
70 
71  void FillSim(const evt::Event& event, GenShower& gen, bool saveProfiles);
72 
73  void ConvertGenParticle(GenParticle& adstGP, const evt::GenParticle& evtGP);
74 
75  otoa::Config fConfig; //< "static" conversion configuration
76  otoa::Status fStatus; //< the current conversion status
77 
78  FileInfo fFileInfo;
79  DetectorGeometry fDetectorGeometry;
80  };
81 
82 }
83 
84 
85 #endif
int Verbosity() const
Definition: Config.h:23
void FillGlobalInfo(const evt::Event &event, RecEvent &recEvent)
DetectorGeometry fDetectorGeometry
Definition: Offline2ADST.h:79
Offline2ADST()=default
void FinishDetectorAndFileInfo()
void FillRadio(const evt::Event &event, RecEvent &recEvent)
Fills the per-event radio part of the event, EventInfo, and DetectorGeometry.
void FillSim(const evt::Event &event, GenShower &gen, bool saveProfiles)
otoa::Config fConfig
Definition: Offline2ADST.h:75
const otoa::Status & Status() const
Fetch the current conversion status.
Definition: Offline2ADST.h:57
otoa::Status & Status()
Fetch the current conversion status.
Definition: Offline2ADST.h:59
const otoa::Config & Config() const
Fetch the converter configuration.
Definition: Offline2ADST.h:52
bool Convert(const evt::Event &event, RecEvent &recEvent)
Definition: Offline2ADST.cc:90
Converts an Offline event to ADST.
Definition: Config.h:19
void FillDetectorGeometryIncremental()
void ConvertGenParticle(GenParticle &adstGP, const evt::GenParticle &evtGP)
const DetectorGeometry & GetDetectorGeometry() const
Definition: Offline2ADST.h:43
otoa::Config & Config()
Fetch the converter configuration.
Definition: Offline2ADST.h:54
otoa::Status fStatus
Definition: Offline2ADST.h:76
const FileInfo & GetFileInfo() const
Definition: Offline2ADST.h:47
DetectorGeometry & GetDetectorGeometry()
Definition: Offline2ADST.h:45
Converts an Offline event to ADST.
Definition: Offline2ADST.h:27
FileInfo & GetFileInfo()
Definition: Offline2ADST.h:49
Represents the status of a single event conversion.
Definition: Status.h:17

, generated on Tue Sep 26 2023.