Thread pool for global fits.  
 More...
#include <JPlatypus_t.hh>
Thread pool for global fits. 
Definition at line 34 of file JPlatypus_t.hh.
 
Constructor. 
- Parameters
 - 
  
    | geometry | detector geometry  | 
    | emitters | emitters geometry  | 
    | velocity | sound velocity  | 
    | parameters | parameters  | 
    | ns | number of threads  | 
  
   
Definition at line 45 of file JPlatypus_t.hh.
   57       for (
size_t i = 0; 
i < 
ns; ++
i) {
 
   59         thread worker([
this, geometry, emitters, velocity, parameters]() {
 
   68               unique_lock<mutex> lock(
in);
 
   70               cv.wait(lock, [
this]() { 
return stop || !
input.empty(); });
 
   80               for (JSuperEvt::rx_type::const_iterator hit = evt.
rx.begin(); hit != evt.
rx.end(); ++hit) {
 
   82                 data.push_back(
JHit(emitters[hit->id],
 
   95             const double chi2 = katoomba (data.begin(), data.end()) / katoomba.estimator->getRho(1.0);
 
   96             const double ndf  = 
getWeight(data.begin(), data.end()) - katoomba.value.getN();
 
   99               unique_lock<mutex> lock(
out);
 
  106         workers.emplace_back(move(worker));
 
JModel getModel(const JEvt &evt)
Get model. 
 
double getWeight(T __begin, T __end)
Get total weight of data points. 
 
Template specialisation of fit function of acoustic model based on JGandalf minimiser. 
 
Logical location of module. 
 
static JTOOLS::JQuantile Q
chi2/NDF 
 
std::queue< JSuperEvt > input
 
std::vector< std::thread > workers
 
Acoustic super event fit. 
 
then if[[!-f $DETECTOR]] then JDetector sh $DETECTOR fi cat $WORKDIR trigger_parameters txt<< EOFtrigger3DMuon.enabled=1;trigger3DMuon.numberOfHits=5;trigger3DMuon.gridAngle_deg=1;ctMin=0.0;TMaxLocal_ns=15.0;EOF set_variable TRIGGEREFFICIENCY_TRIGGERED_EVENTS_ONLY INPUT_FILES=() for((i=1;$i<=$NUMBER_OF_RUNS;++i));do JSirene.sh $DETECTOR $JPP_DATA/genhen.km3net_wpd_V2_0.evt.gz $WORKDIR/sirene_ ${i}.root JTriggerEfficiency.sh $DETECTOR $DETECTOR $WORKDIR/sirene_ ${i}.root $WORKDIR/trigger_efficiency_ ${i}.root $WORKDIR/trigger_parameters.txt $JPP_DATA/PMT_parameters.txt INPUT_FILES+=($WORKDIR/trigger_efficiency_ ${i}.root) done for ANGLE_DEG in $ANGLES_DEG[*];do set_variable SIGMA_NS 3.0 set_variable OUTLIERS 3 set_variable OUTPUT_FILE $WORKDIR/matrix\[${ANGLE_DEG}\deg\].root $JPP_DIR/examples/JReconstruction-f"$INPUT_FILES[*]"-o $OUTPUT_FILE-S ${SIGMA_NS}-A ${ANGLE_DEG}-O ${OUTLIERS}-d ${DEBUG}--!fiif[[$OPTION=="plot"]];then if((0));then for H1 in h0 h1;do JPlot1D-f"$WORKDIR/matrix["${^ANGLES_DEG}" deg].root:${H1}"-y"1 2e3"-Y-L TR-T""-\^"number of events [a.u.]"-> o chi2
 
double sigma_s
time-of-arrival resolution [s] 
 
int mestimator
M-estimator. 
 
JMEstimator * getMEstimator(const int type)
Get M-Estimator. 
 
std::condition_variable cv
 
 
 
 
  
  
      
        
          | JACOUSTICS::JPlatypus::~JPlatypus  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Destructor. 
Definition at line 114 of file JPlatypus_t.hh.
  119         unique_lock<mutex> lock(
in);
 
std::vector< std::thread > workers
 
std::condition_variable cv
 
 
 
 
  
  
      
        
          | size_t JACOUSTICS::JPlatypus::backlog  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Get number of pending data. 
- Returns
 - number of pending data 
 
Definition at line 137 of file JPlatypus_t.hh.
  142         unique_lock<mutex> lock(
in);
 
std::queue< JSuperEvt > input
 
 
 
 
  
  
      
        
          | void JACOUSTICS::JPlatypus::enqueue  | 
          ( | 
          const JSuperEvt &  | 
          evt | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Queue super event. 
- Parameters
 - 
  
  
 
Definition at line 154 of file JPlatypus_t.hh.
  159         unique_lock<mutex> lock(
in);
 
  162           throw runtime_error(
"The thread pool has been stopped.");
 
std::queue< JSuperEvt > input
 
std::condition_variable cv
 
 
 
 
  
  
      
        
          | std::vector<std::thread> JACOUSTICS::JPlatypus::workers | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | std::mutex JACOUSTICS::JPlatypus::in | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | std::mutex JACOUSTICS::JPlatypus::out | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | std::condition_variable JACOUSTICS::JPlatypus::cv | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | bool JACOUSTICS::JPlatypus::stop | 
         
       
   | 
  
private   | 
  
 
 
The documentation for this class was generated from the following files: