Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooRealMPFE.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooRealMPFE.h,v 1.7 2007/05/11 09:11:30 verkerke Exp $
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#ifndef ROO_REAL_MPFE
17#define ROO_REAL_MPFE
18
19#include "RooAbsReal.h"
20#include "RooRealProxy.h"
21#include "RooListProxy.h"
22#include "RooArgList.h"
23#include "TStopwatch.h"
24#include <vector>
25
26class RooArgSet ;
27namespace RooFit { class BidirMMapPipe; }
28
29class RooRealMPFE : public RooAbsReal {
30public:
31 // Constructors, assignment etc
32 RooRealMPFE(const char *name, const char *title, RooAbsReal& arg, bool calcInline=false) ;
33 RooRealMPFE(const RooRealMPFE& other, const char* name=nullptr);
34 TObject* clone(const char* newname) const override { return new RooRealMPFE(*this,newname); }
35 ~RooRealMPFE() override;
36
37 void calculate() const ;
38 double getValV(const RooArgSet* nset=nullptr) const override ;
39 void standby() ;
40
41 void setVerbose(bool clientFlag=true, bool serverFlag=true) ;
42
43 void applyNLLWeightSquared(bool flag) ;
44
45 void enableOffsetting(bool flag) override ;
46
47 void followAsSlave(RooRealMPFE& master) { _updateMaster = &master ; }
48
49 RooAbsReal & arg() const { return *_arg; }
50
51 protected:
52
53 // Function evaluation
54 double evaluate() const override ;
55 friend class RooAbsTestStatistic ;
56 void constOptimizeTestStatistic(ConstOpCode opcode, bool doAlsoTracking=true) override ;
57 virtual double getCarry() const;
58
61
64
65 void initialize() ;
66 void initVars() ;
67 void serverLoop() ;
68
69 void doApplyNLLW2(bool flag) ;
70
71 RooRealProxy _arg ; ///< Function to calculate in parallel process
72 RooListProxy _vars ; ///< Variables
73 RooArgList _saveVars ; ///< Copy of variables
74 mutable bool _calcInProgress ;
78 mutable bool _forceCalc ;
80
81 RooFit::BidirMMapPipe *_pipe; ///<! connection to child
82
83 mutable std::vector<bool> _valueChanged ; ///<! Flags if variable needs update on server-side
84 mutable std::vector<bool> _constChanged ; ///<! Flags if variable needs update on server-side
85 RooRealMPFE* _updateMaster ; ///<! Update master
86 mutable bool _retrieveDispatched ; ///<!
87 mutable double _evalCarry; ///<!
88};
89
90#endif
char name[80]
Definition TGX11.cxx:110
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
Abstract base class for all test statistics.
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition RooArgList.h:22
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:24
Multi-processor front-end for parallel calculation of RooAbsReal objects.
Definition RooRealMPFE.h:29
RooFit::BidirMMapPipe * _pipe
! connection to child
Definition RooRealMPFE.h:81
RooArgList _saveVars
Copy of variables.
Definition RooRealMPFE.h:73
void calculate() const
Client-side function that instructs server process to start asynchronuous (re)calculation of function...
RooAbsReal & arg() const
Definition RooRealMPFE.h:49
void initialize()
Initialize the remote process and message passing pipes between current process and remote process.
void serverLoop()
Server loop of remote processes.
void standby()
Terminate remote server process and return front-end class to standby mode.
bool _calcInProgress
Definition RooRealMPFE.h:74
RooListProxy _vars
Variables.
Definition RooRealMPFE.h:72
double _evalCarry
!
Definition RooRealMPFE.h:87
void applyNLLWeightSquared(bool flag)
Control verbose messaging related to inter process communication on both client and server side.
void initVars()
Initialize list of variables of front-end argument 'arg'.
RooRealMPFE * _updateMaster
! Update master
Definition RooRealMPFE.h:85
void doApplyNLLW2(bool flag)
bool _retrieveDispatched
!
Definition RooRealMPFE.h:86
bool _verboseClient
Definition RooRealMPFE.h:75
void setVerbose(bool clientFlag=true, bool serverFlag=true)
Control verbose messaging related to inter process communication on both client and server side.
bool _forceCalc
Definition RooRealMPFE.h:78
std::vector< bool > _constChanged
! Flags if variable needs update on server-side
Definition RooRealMPFE.h:84
double evaluate() const override
Send message to server process to retrieve output value If error were logged use logEvalError() on re...
TObject * clone(const char *newname) const override
Definition RooRealMPFE.h:34
void constOptimizeTestStatistic(ConstOpCode opcode, bool doAlsoTracking=true) override
Intercept call to optimize constant term in test statistics and forward it to object on server side.
virtual double getCarry() const
std::vector< bool > _valueChanged
! Flags if variable needs update on server-side
Definition RooRealMPFE.h:83
void enableOffsetting(bool flag) override
Control verbose messaging related to inter process communication on both client and server side.
bool _verboseServer
Definition RooRealMPFE.h:76
RooRealProxy _arg
Function to calculate in parallel process.
Definition RooRealMPFE.h:71
bool _inlineMode
Definition RooRealMPFE.h:77
~RooRealMPFE() override
Destructor.
void followAsSlave(RooRealMPFE &master)
Definition RooRealMPFE.h:47
RooAbsReal::ErrorLoggingMode _remoteEvalErrorLoggingState
Definition RooRealMPFE.h:79
double getValV(const RooArgSet *nset=nullptr) const override
If value needs recalculation and calculation has not been started with a call to calculate() start it...
Mother of all ROOT objects.
Definition TObject.h:41
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Definition JSONIO.h:26