This class is intended as a base class for singletons, especially those that are written to file. The Get() function is written such that it reads the class from file if needed. This is the case if it hasn't been read yet, or if the gDirectory has been changed. This means in a loop over different input files, Get() will always return the info of the current file.
Definition at line 31 of file TSingleton.h.
Static Public Member Functions | |
static T * | AddCurrent () |
static T * | Get (bool verbose=false) |
static T * | GetAll () |
static void | PrintDirectory () |
static void | Set (T *val) |
Protected Member Functions | |
TSingleton () | |
~TSingleton () | |
Static Private Attributes | |
static TDirectory * | fDir = nullptr |
static T * | fSingleton = nullptr |
#include <TSingleton.h>
|
inlinestatic |
Definition at line 137 of file TSingleton.h.
|
inlinestatic |
Definition at line 34 of file TSingleton.h.
Referenced by TSingleton< TParsingDiagnostics >::AddCurrent(), and TSingleton< TParsingDiagnostics >::GetAll().
|
inlinestatic |
Definition at line 62 of file TSingleton.h.
|
inlinestatic |
Definition at line 166 of file TSingleton.h.
Referenced by TRunInfo::Print().
|
inlinestatic |
Definition at line 129 of file TSingleton.h.
Referenced by TSingleton< TParsingDiagnostics >::Get().