-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
Milestone
Description
At the moment we have no specific destructors for the Globals, hence I suggest to reimplement it as a SingleTon:
class Setup
{
public:
static Setup& getSetup(const Configuration &cfg) {
// either this or make a thread safe version with a few more lines
static Setup instance(cfg);
return instance;
}
~Setup();
// getters, e.g.
const MuonAlgorithm::value muonAlgorithm() const;
...
private:
Setup(const Configuration &cfg);
Setup(Setup const&); // Don't Implement.
void operator=(Setup const&); // Don't implement
// all current variables
...
}Hopefully this will not only hep fix issue #161 but also provide a nicer interface to our global variables.
Please let me know what you think.
The implementation procedure would be simple:
- implement
Setupto mirrorGlobals - Use
Setupeverywhere - Remove
Globals