Constructor.
151 :
154 {
157
159
160 for (size_t i = 0; i < ns; ++i) {
161
162 thread worker([this, storage, option]() {
163
165
166 regressor.parameters.resize(5);
167
173
176
177 for ( ; ; ) {
178
179 {
180 unique_lock<mutex> lock(
in);
181
183
185 return;
186 }
187
189
190
191
192 data.clear();
193
194
195
196 if (option != 2 || evt->status) {
197 for (map_type::const_iterator p = evt->data.begin(); p != evt->data.end(); ++p) {
198 copy(p->second.begin(), p->second.end(), back_inserter(data));
199 }
200 }
201
202 value = evt->value;
203 }
204
206
207 const double chi2 = regressor(value,
data.begin(),
data.end());
208
209 {
210 unique_lock<mutex> lock(
out);
211
213 }
214 }
215 }
216 });
217
218 workers.emplace_back(std::move(worker));
219 }
220 }
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