From da1e3af6e8f35a9654d9e5d560ec5051be799772 Mon Sep 17 00:00:00 2001 From: Adrien Blanchet Date: Wed, 27 Nov 2024 12:19:08 +0100 Subject: [PATCH] forgot overload --- include/GenericToolbox.Root.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/GenericToolbox.Root.h b/include/GenericToolbox.Root.h index 3112536..1d85ea3 100644 --- a/include/GenericToolbox.Root.h +++ b/include/GenericToolbox.Root.h @@ -151,6 +151,7 @@ namespace GenericToolbox{ inline TDirectory* mkdirTFile(TFile* outputFile_, const std::string &dirName_); inline TDirectory* getCurrentTDirectory(); inline void writeInTFileWithObjTypeExt(TDirectory* dir_, const TObject* objToSave_, std::string saveName_ = "", bool forceWriteFile_=false); + inline void writeInTFileWithObjTypeExt(TDirectory* dir_, const TObject& objToSave_, std::string saveName_ = "", bool forceWriteFile_=false); inline void writeInTFile(TDirectory* dir_, const TObject* objToSave_, std::string saveName_ = "", bool forceWriteFile_=false); inline void writeInTFile(TDirectory* dir_, const TObject& objToSave_, std::string saveName_ = "", bool forceWriteFile_=false); inline void writeInTFile(TDirectory* dir_, const std::string& objToSave_, std::string saveName_, bool forceWriteFile_=false); @@ -774,6 +775,9 @@ namespace GenericToolbox { // Force TFile Write? if( forceWriteFile_ ){ triggerTFileWrite(dir_); } } + inline void writeInTFileWithObjTypeExt(TDirectory* dir_, const TObject& objToSave_, std::string saveName_, bool forceWriteFile_){ + writeInTFileWithObjTypeExt(dir_, &objToSave_, std::move(saveName_), forceWriteFile_); + } inline void writeInTFile(TDirectory* dir_, const TObject& objToSave_, std::string saveName_, bool forceWriteFile_){ writeInTFile(dir_, &objToSave_, std::move(saveName_), forceWriteFile_); }