ROOT  6.06/09
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 //
19 // BEGIN_HTML
20 // RooMPSentinel is a singleton class that keeps track of all
21 // parellel execution processes for goodness-of-fit calculations.
22 // The primary task of RooMPSentinel is to terminate all server processes
23 // when the main ROOT process is exiting.
24 // END_HTML
25 //
26 
27 
28 #include "RooFit.h"
29 
30 #include "RooMPSentinel.h"
31 #include "RooMPSentinel.h"
32 #include "RooRealMPFE.h"
33 
34 using namespace std;
35 
37  ;
38 
39 
40 ////////////////////////////////////////////////////////////////////////////////
41 /// Constructor
42 
44 {
45 }
46 
47 
48 
49 ////////////////////////////////////////////////////////////////////////////////
50 /// Destructor. Terminate all parallel processes still registered with
51 /// the sentinel
52 
54 {
55  TIterator *iter = _mpfeSet.createIterator() ;
56  RooRealMPFE* mpfe ;
57  while((mpfe=(RooRealMPFE*)iter->Next())) {
58  mpfe->standby() ;
59  }
60  delete iter ;
61 }
62 
63 
64 
65 ////////////////////////////////////////////////////////////////////////////////
66 /// Register given multi-processor front-end object with the sentinel
67 
69 {
70  _mpfeSet.add(mpfe,kTRUE) ;
71 }
72 
73 
74 
75 ////////////////////////////////////////////////////////////////////////////////
76 /// Remove given multi-processor front-end object from the sentinel
77 
79 {
80  _mpfeSet.remove(mpfe,kTRUE) ;
81 }
RooMPSentinel()
Constructor.
STL namespace.
Iterator abstract base class.
Definition: TIterator.h:32
ClassImp(RooMPSentinel)
std::map< std::string, std::string >::const_iterator iter
Definition: TAlienJob.cxx:54
void standby()
Terminate remote server process and return front-end class to standby mode.
void remove(RooRealMPFE &mpfe)
Remove given multi-processor front-end object from the sentinel.
void add(RooRealMPFE &mpfe)
Register given multi-processor front-end object with the sentinel.
virtual ~RooMPSentinel()
Destructor.
virtual TObject * Next()=0
const Bool_t kTRUE
Definition: Rtypes.h:91