Constructor.
174 :
177 {
180
182
183 for (size_t i = 0; i < ns; ++i) {
184
185 thread worker([this, storage, option]() {
186
188
189 regressor.parameters.resize(5);
190
196
199
200 for ( ; ; ) {
201
202 {
203 unique_lock<mutex> lock(
in);
204
206
208 return;
209 }
210
212
213
214
215 data.clear();
216
217
218
219 if (option != 2 || evt->status) {
220 for (map_type::const_iterator p = evt->data.begin(); p != evt->data.end(); ++p) {
221 copy(p->second.begin(), p->second.end(), back_inserter(data));
222 }
223 }
224
225 value = evt->value;
226 }
227
229
230 const double chi2 = regressor(value,
data.begin(),
data.end());
231
232 {
233 unique_lock<mutex> lock(
out);
234
236 }
237 }
238 }
239 });
240
241 workers.emplace_back(std::move(worker));
242 }
243 }
static parameter_type pY()
static parameter_type pX()
static parameter_type pT()
Data structure for fit of straight line in positive z-direction.
static parameter_type pDY()
static parameter_type pDX()
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
void copy(const JFIT::JEvt::const_iterator __begin, const JFIT::JEvt::const_iterator __end, Evt &out)
Copy tracks.
Template definition of a data regressor of given model.
virtual const pointer_type & next() override
Get next element.
virtual bool hasNext() override
Check availability of next element.
void put(const double x)
Put value.
std::vector< std::thread > workers
std::condition_variable cv
static JMATH::JQuantile_t Q