BioDynaMo
v1.05.120-25dc9790
|
Go to the documentation of this file.
15 #ifndef CORE_UTIL_IO_H_
16 #define CORE_UTIL_IO_H_
52 TFileRaii(
const std::string& filename,
const char* mode);
88 void WriteToFile(
const std::string& filename,
const std::string& content);
100 template <
typename T>
105 file.
Get()->GetObject(obj_name, empty_obj);
129 template <
typename T>
131 const T& pst_object,
const char* mode =
"new") {
133 file.
Get()->WriteObject(&pst_object, obj_name);
138 #endif // CORE_UTIL_IO_H_
BDM_CLASS_DEF_NV(RuntimeVariables, 1)
bool operator==(const RuntimeVariables &other) const
Automatically close a TFile object using RAII pattern.
bool GetPersistentObject(const char *root_file, const char *obj_name, T *&empty_obj)
Gets the persistent object from the specified ROOT file.
ClassDefNV(VectorTypeWrapper, 1)
bool operator!=(const RuntimeVariables &other) const
void SetSystemInfo(const SysInfo_t &other)
VectorTypeWrapper()=default
void WriteToFile(const std::string &filename, const std::string &content)
bool FileExists(const std::string &file_name)
void WritePersistentObject(const char *root_file, const char *obj_name, const T &pst_object, const char *mode="new")
Writes a persistent object to the specified ROOT file.
IntegralTypeWrapper(TRootIOCtor *io_ctor)
IntegralTypeWrapper(const T &data)
TFileRaii(const std::string &filename, const char *mode)
SysInfo_t GetSystemInfo() const
void PrintSystemInfo() const
BDM_CLASS_DEF_NV(IntegralTypeWrapper, 1)