MaCh3  2.5.1
Reference Guide
NuDockServerBase.h
Go to the documentation of this file.
1 #pragma once
2 
7 
8 #include "Fitters/FitterBase.h"
9 #include "NuDockFactory.h"
11 #include <nlohmann/json.hpp>
13 
25 class NuDockServerBase : public FitterBase {
26 public:
30 
32  virtual ~NuDockServerBase();
33 
35  inline std::string GetName()const {return "NuDockServer";};
36 
41  void setup();
42 
49  virtual double getLogLikelihood();
50 
60  virtual nlohmann::json setParameters(const nlohmann::json &request);
61 
68  virtual nlohmann::json getParametersNames(const nlohmann::json &request);
69 
76  virtual nlohmann::json getParameters(const nlohmann::json &request);
77 
84  virtual nlohmann::json get2NLL(const nlohmann::json &request);
85 
93  virtual nlohmann::json setAsimovPoint(const nlohmann::json &request);
94 
104  virtual nlohmann::json getMCSpectrum(const nlohmann::json &request);
105 
115  virtual nlohmann::json getDataSpectrum(const nlohmann::json &request);
116 
118  void RunMCMC() override {(void)0; /* do nothing */};
119 
120 protected:
122  bool verbose;
125 };
#define _MaCh3_Safe_Include_Start_
KS: Avoiding warning checking for headers.
Definition: Core.h:126
#define _MaCh3_Safe_Include_End_
Factory utilities for creating and configuring NuDock communication objects.
Base class for implementing fitting algorithms.
Definition: FitterBase.h:26
Manager * fitMan
The manager for configuration handling.
Definition: FitterBase.h:110
The manager class is responsible for managing configurations and settings.
Definition: Manager.h:16
A class that implements a NuDock server for cross-fitter communication.
virtual nlohmann::json getDataSpectrum(const nlohmann::json &request)
Handle a "get_data_spectrum" request.
virtual nlohmann::json setAsimovPoint(const nlohmann::json &request)
Handle a "set_asimov" request.
void setup()
Perform one-time server setup.
virtual nlohmann::json get2NLL(const nlohmann::json &request)
Handle a "log_likelihood" request.
virtual ~NuDockServerBase()
Destructor.
virtual double getLogLikelihood()
Compute the total log-likelihood across all systematics and samples.
NuDockServerBase(Manager *const fitMan)
Construct the NuDock server.
std::string GetName() const
Return a human-readable identifier for this fitter.
virtual nlohmann::json getParameters(const nlohmann::json &request)
Handle a "get_parameters" request.
virtual nlohmann::json getMCSpectrum(const nlohmann::json &request)
Handle a "get_mc_spectrum" request.
virtual nlohmann::json getParametersNames(const nlohmann::json &request)
Handle a "get_parameter_names" request.
void RunMCMC() override
No-op implementation — the server does not run own MCMC.
virtual nlohmann::json setParameters(const nlohmann::json &request)
Handle a "set_parameters" request.
bool verbose
Flag controlling verbose logging of server operations.
bool add_prior_llh
If true, systematic prior likelihoods are added to the total LLH.