Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooWorkspaceHandle.h
Go to the documentation of this file.
1// Author: Stephan Hageboeck, CERN 01/2019
2
3/*************************************************************************
4 * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11#ifndef ROOFIT_ROOFITCORE_INC_ROOWORKSPACEHANDLE_H_
12#define ROOFIT_ROOFITCORE_INC_ROOWORKSPACEHANDLE_H_
13
14#include "RooWorkspace.h"
15
16/// An interface to set and retrieve a workspace.
17/// This is needed for all generic objects that can be saved in a workspace, which itself depend
18/// on the workspace (e.g. the RooStats::ModelConfig).
19/// Because of a circular dependency, a workspace with a ModelConfig cannot be (deep) cloned.
20/// The handle hides this dependency.
22public:
24
25 ///Set the workspace. If it exists, it is up to the implementing class to decide how to proceed.
26 virtual void SetWS(RooWorkspace &ws) = 0;
27
28 ///Set the workspace irrespective of what the previous workspace is.
29 virtual void ReplaceWS(RooWorkspace *ws) = 0;
30
31 ///Retrieve the workspace.
32 virtual RooWorkspace *GetWS() const = 0;
33
35};
36
37#endif /* ROOFIT_ROOFITCORE_INC_ROOWORKSPACEHANDLE_H_ */
#define ClassDef(name, id)
Definition Rtypes.h:337
An interface to set and retrieve a workspace.
virtual void SetWS(RooWorkspace &ws)=0
Set the workspace. If it exists, it is up to the implementing class to decide how to proceed.
virtual void ReplaceWS(RooWorkspace *ws)=0
Set the workspace irrespective of what the previous workspace is.
virtual RooWorkspace * GetWS() const =0
Retrieve the workspace.
Persistable container for RooFit projects.