Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooRealMPFE.h
Go to the documentation of this file.
1/// \cond ROOFIT_INTERNAL
2
3/*****************************************************************************
4 * Project: RooFit *
5 * Package: RooFitCore *
6 * File: $Id: RooRealMPFE.h,v 1.7 2007/05/11 09:11:30 verkerke Exp $
7 * Authors: *
8 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
9 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
10 * *
11 * Copyright (c) 2000-2005, Regents of the University of California *
12 * and Stanford University. All rights reserved. *
13 * *
14 * Redistribution and use in source and binary forms, *
15 * with or without modification, are permitted according to the terms *
16 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
17 *****************************************************************************/
18#ifndef ROO_REAL_MPFE
19#define ROO_REAL_MPFE
20
21#include "RooAbsReal.h"
22#include "RooRealProxy.h"
23#include "RooListProxy.h"
24#include "RooArgList.h"
25#include "TStopwatch.h"
26#include <vector>
27
28class RooArgSet ;
29namespace RooFit { class BidirMMapPipe; }
30
31class RooRealMPFE : public RooAbsReal {
32public:
33 // Constructors, assignment etc
34 RooRealMPFE(const char *name, const char *title, RooAbsReal& arg, bool calcInline=false) ;
35 RooRealMPFE(const RooRealMPFE& other, const char* name=nullptr);
36 TObject* clone(const char* newname=nullptr) const override { return new RooRealMPFE(*this,newname); }
37 ~RooRealMPFE() override;
38
39 void calculate() const ;
40 double getValV(const RooArgSet* nset=nullptr) const override ;
41 void standby() ;
42
43 void setVerbose(bool clientFlag=true, bool serverFlag=true) ;
44
45 void applyNLLWeightSquared(bool flag) ;
46
47 void enableOffsetting(bool flag) override ;
48
49 void followAsSlave(RooRealMPFE& master) { _updateMaster = &master ; }
50
51 RooAbsReal & arg() const { return *_arg; }
52
53 protected:
54
55 // Function evaluation
56 double evaluate() const override ;
57 friend class RooAbsTestStatistic ;
58 void constOptimizeTestStatistic(ConstOpCode opcode, bool doAlsoTracking=true) override ;
59 virtual double getCarry() const;
60
61 enum State { Initialize,Client,Server,Inline } ;
62 State _state ;
63
64 enum Message { SendReal=0, SendCat, Calculate, Retrieve, ReturnValue, Terminate,
66
67 void initialize() ;
68 void initVars() ;
69 void serverLoop() ;
70
71 void doApplyNLLW2(bool flag) ;
72
73 RooRealProxy _arg ; ///< Function to calculate in parallel process
74 RooListProxy _vars ; ///< Variables
75 RooArgList _saveVars ; ///< Copy of variables
76 mutable bool _calcInProgress ;
77 bool _verboseClient ;
78 bool _verboseServer ;
79 bool _inlineMode ;
80 mutable bool _forceCalc ;
82
83 RooFit::BidirMMapPipe *_pipe; ///<! connection to child
84
85 mutable std::vector<bool> _valueChanged ; ///<! Flags if variable needs update on server-side
86 mutable std::vector<bool> _constChanged ; ///<! Flags if variable needs update on server-side
87 RooRealMPFE* _updateMaster ; ///<! Update master
88 mutable bool _retrieveDispatched ; ///<!
89 mutable double _evalCarry; ///<!
90};
91
92#endif
93
94/// \endcond
std::string Message(const std::string &msg, const std::string &location)
Definition Scanner.cxx:177
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
char name[80]
Definition TGX11.cxx:110
Int_t Retrieve(Int_t query, const char *path=0)
friend class RooRealMPFE
Definition RooAbsArg.h:609
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
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
Mother of all ROOT objects.
Definition TObject.h:41
RooCmdArg Verbose(bool flag=true)
std::size_t State
Definition types.h:23
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Definition CodegenImpl.h:64
void evaluate(typename Architecture_t::Tensor_t &A, EActivationFunction f)
Apply the given activation function to each value in the given tensor A.
Definition Functions.h:98
void initialize(typename Architecture_t::Matrix_t &A, EInitialization m)
Definition Functions.h:282
void Initialize(Bool_t useTMVAStyle=kTRUE)
Definition tmvaglob.cxx:176