File indexing completed on 2025-01-18 09:59:29
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 #ifndef G4XmlRNtupleManager_h
0033 #define G4XmlRNtupleManager_h 1
0034
0035 #include "G4TRNtupleManager.hh"
0036 #include "globals.hh"
0037
0038 #include "toolx/raxml"
0039
0040 #include <string_view>
0041 #include <utility>
0042 #include <vector>
0043
0044 class G4XmlRFileManager;
0045 struct G4XmlRNtupleDescription;
0046
0047 class G4XmlRNtupleManager : public G4TRNtupleManager<tools::aida::ntuple>
0048 {
0049 friend class G4XmlAnalysisReader;
0050
0051 public:
0052 explicit G4XmlRNtupleManager(const G4AnalysisManagerState& state);
0053 G4XmlRNtupleManager() = delete;
0054 ~G4XmlRNtupleManager() override = default;
0055
0056 protected:
0057
0058 void SetFileManager(std::shared_ptr<G4XmlRFileManager> fileManager);
0059
0060
0061 using G4BaseRNtupleManager::SetNtupleIColumn;
0062 using G4BaseRNtupleManager::SetNtupleFColumn;
0063 using G4BaseRNtupleManager::SetNtupleDColumn;
0064 using G4TRNtupleManager<tools::aida::ntuple>::SetNtupleIColumn;
0065 using G4TRNtupleManager<tools::aida::ntuple>::SetNtupleFColumn;
0066 using G4TRNtupleManager<tools::aida::ntuple>::SetNtupleDColumn;
0067 using G4TRNtupleManager<tools::aida::ntuple>::SetNtupleSColumn;
0068
0069
0070
0071
0072 G4bool SetNtupleIColumn(
0073 G4int ntupleId, const G4String& columnName, std::vector<G4int>& vector) final;
0074 G4bool SetNtupleFColumn(
0075 G4int ntupleId, const G4String& columnName, std::vector<G4float>& vector) final;
0076 G4bool SetNtupleDColumn(
0077 G4int ntupleId, const G4String& columnName, std::vector<G4double>& vector) final;
0078 G4bool SetNtupleSColumn(
0079 G4int ntupleId, const G4String& columnName, std::vector<std::string>& vector) final;
0080
0081 private:
0082
0083 G4int ReadNtupleImpl(const G4String& ntupleName, const G4String& fileName,
0084 const G4String& dirName, G4bool isUserFileName) final;
0085 G4bool GetTNtupleRow(G4TRNtupleDescription<tools::aida::ntuple>* ntupleDescription) final;
0086
0087
0088 static constexpr std::string_view fkClass { "G4XmlRNtupleManager" };
0089
0090
0091 std::shared_ptr<G4XmlRFileManager> fFileManager { nullptr };
0092 };
0093
0094 inline void
0095 G4XmlRNtupleManager::SetFileManager(std::shared_ptr<G4XmlRFileManager> fileManager)
0096 {
0097 fFileManager = std::move(fileManager);
0098 }
0099
0100 #endif