2#ifndef restG4_TRestGDMLParser
3#define restG4_TRestGDMLParser
5#include <TGeoManager.h>
7#include "TRestMetadata.h"
13 TGeoManager* fGeoManager{};
19 std::string fFileString =
"";
20 std::string fPath =
"";
21 std::string fOutputGdmlDirectory =
22 REST_USER_PATH.empty() ? REST_TMP_PATH +
"/gdml/" : REST_USER_PATH +
"/gdml/";
23 std::string fOutputGdmlFilename =
"";
24 std::string fGdmlVersion =
"0.0";
25 std::map<std::string, std::string> fEntityVersionMap{};
27 std::string GetEntityVersion(
const std::string& name)
const;
29 inline std::string GetGDMLVersion()
const {
return fGdmlVersion; }
31 inline std::string GetOutputGDMLFile()
const {
return fOutputGdmlFilename; }
33 void Load(
const std::string& filename);
35 inline TGeoManager* GetGeoManager(
const std::string& gdmlFilename) {
37 fGeoManager = TGeoManager::Import(GetOutputGDMLFile().c_str());
41 TGeoManager* CreateGeoManager();
42 [[deprecated(
"Use CreateGeoManager() instead.")]]
inline TGeoManager* CreateGeoM() {
43 return CreateGeoManager();
52 void ReplaceAttributeWithKeyWord(
const std::string& keyword);
void InitFromConfigFile() override
To make settings from rml file. This method must be implemented in the derived class.