Thread pool for global fits.  
 More...
#include <JFremantle_t.hh>
Thread pool for global fits. 
Definition at line 33 of file JFremantle_t.hh.
 
◆ input_type
◆ output_type
◆ JFremantle()
  
  
      
        
          | JACOUSTICS::JFremantle::JFremantle  | 
          ( | 
          const JGeometry &  | 
          geometry,  | 
         
        
           | 
           | 
          const JSoundVelocity &  | 
          velocity,  | 
         
        
           | 
           | 
          const JFitParameters &  | 
          parameters,  | 
         
        
           | 
           | 
          const size_t  | 
          ns,  | 
         
        
           | 
           | 
          const size_t  | 
          backlog = std::numeric_limits<size_t>::max()  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
    | geometry | detector geometry  | 
    | velocity | sound velocity  | 
    | parameters | parameters  | 
    | ns | number of threads  | 
    | backlog | backlog  | 
  
   
Definition at line 49 of file JFremantle_t.hh.
   62       for (
size_t i = 0; i < 
ns; ++i) {
 
   64         thread worker([
this, geometry, velocity, parameters]() {
 
   68           for (
JGlobalfit katoomba(geometry, velocity, parameters); ; ) {
 
   71               unique_lock<mutex> lock(
in);
 
   73               cv.wait(lock, [
this]() { 
return stop || !
input.empty(); });
 
   88             if (
result.chi2 / 
result.ndf <= katoomba.parameters.chi2perNDF) {
 
   91                 unique_lock<mutex> lock(
out);
 
  112         workers.emplace_back(std::move(worker));
 
static output_type * output
optional output
 
std::condition_variable cw
 
std::vector< std::thread > workers
 
static JMATH::JQuantile_t Q
chi2/NDF
 
std::condition_variable cv
 
static int detid
detector identifier
 
static bool squash
squash transmissions in output
 
std::queue< input_type > input
 
virtual bool put(const T &object)=0
Object output.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
Global fit of prameterised detector geometry to acoustics data.
 
Auxiliary data structure to convert model to super event.
 
void put(const double x)
Put value.
 
 
 
 
◆ ~JFremantle()
  
  
      
        
          | JACOUSTICS::JFremantle::~JFremantle  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ enqueue()
  
  
      
        
          | void JACOUSTICS::JFremantle::enqueue  | 
          ( | 
          input_type &  | 
          data | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Queue data. 
- Parameters
 - 
  
  
 
Definition at line 143 of file JFremantle_t.hh.
  148         unique_lock<mutex> lock(
in);
 
  153           throw runtime_error(
"The thread pool has been stopped.");
 
 
 
 
◆ detid
  
  
      
        
          | int JACOUSTICS::JFremantle::detid = -1 | 
         
       
   | 
  
static   | 
  
 
 
◆ squash
  
  
      
        
          | bool JACOUSTICS::JFremantle::squash = false | 
         
       
   | 
  
static   | 
  
 
 
◆ output
◆ workers
  
  
      
        
          | std::vector<std::thread> JACOUSTICS::JFremantle::workers | 
         
       
   | 
  
private   | 
  
 
 
◆ input
  
  
      
        
          | std::queue<input_type> JACOUSTICS::JFremantle::input | 
         
       
   | 
  
private   | 
  
 
 
◆ in
  
  
      
        
          | std::mutex JACOUSTICS::JFremantle::in | 
         
       
   | 
  
private   | 
  
 
 
◆ out
  
  
      
        
          | std::mutex JACOUSTICS::JFremantle::out | 
         
       
   | 
  
private   | 
  
 
 
◆ cv
  
  
      
        
          | std::condition_variable JACOUSTICS::JFremantle::cv | 
         
       
   | 
  
private   | 
  
 
 
◆ cw
  
  
      
        
          | std::condition_variable JACOUSTICS::JFremantle::cw | 
         
       
   | 
  
private   | 
  
 
 
◆ stop
  
  
      
        
          | bool JACOUSTICS::JFremantle::stop | 
         
       
   | 
  
private   | 
  
 
 
◆ backlog
  
  
      
        
          | size_t JACOUSTICS::JFremantle::backlog | 
         
       
   | 
  
private   | 
  
 
 
The documentation for this class was generated from the following files: