Logo ROOT  
Reference Guide
RooMPSentinel.cxx
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * @(#)root/roofitcore:$Id$
5 * Authors: *
6 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8 * *
9 * Copyright (c) 2000-2005, Regents of the University of California *
10 * and Stanford University. All rights reserved. *
11 * *
12 * Redistribution and use in source and binary forms, *
13 * with or without modification, are permitted according to the terms *
14 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15 *****************************************************************************/
16
17/**
18\file RooMPSentinel.cxx
19\class RooMPSentinel
20\ingroup Roofitcore
21
22RooMPSentinel is a singleton class that keeps track of all
23parellel execution processes for goodness-of-fit calculations.
24The primary task of RooMPSentinel is to terminate all server processes
25when the main ROOT process is exiting.
26**/
27
28
29#include "RooMPSentinel.h"
30#include "RooRealMPFE.h"
31
32using namespace std;
33
35 ;
36
37
38////////////////////////////////////////////////////////////////////////////////
39/// Constructor
40
42{
43}
44
45
46
47////////////////////////////////////////////////////////////////////////////////
48/// Destructor. Terminate all parallel processes still registered with
49/// the sentinel
50
52{
53 for(auto * mpfe : static_range_cast<RooRealMPFE*>(_mpfeSet)) {
54 mpfe->standby() ;
55 }
56}
57
58
59
60////////////////////////////////////////////////////////////////////////////////
61/// Register given multi-processor front-end object with the sentinel
62
64{
65 _mpfeSet.add(mpfe,true) ;
66}
67
68
69
70////////////////////////////////////////////////////////////////////////////////
71/// Remove given multi-processor front-end object from the sentinel
72
74{
75 _mpfeSet.remove(mpfe,true) ;
76}
#define ClassImp(name)
Definition: Rtypes.h:375
virtual bool remove(const RooAbsArg &var, bool silent=false, bool matchByNameOnly=false)
Remove the specified argument from our list.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
RooMPSentinel is a singleton class that keeps track of all parellel execution processes for goodness-...
Definition: RooMPSentinel.h:23
void remove(RooRealMPFE &mpfe)
Remove given multi-processor front-end object from the sentinel.
RooArgSet _mpfeSet
Definition: RooMPSentinel.h:38
void add(RooRealMPFE &mpfe)
Register given multi-processor front-end object with the sentinel.
RooMPSentinel()
Constructor.
virtual ~RooMPSentinel()
Destructor.
RooRealMPFE is the multi-processor front-end for parallel calculation of RooAbsReal objects.
Definition: RooRealMPFE.h:30