Data structure for set of track fit results.
More...
#include <JEvt.hh>
|
| JEvt () |
| Default constructor.
|
|
template<class JSelector_t > |
void | select (const JSelector_t &selector) |
| Select fits.
|
|
template<class JComparator_t > |
void | select (const size_t number_of_fits, const JComparator_t &comparator) |
| Select fits.
|
|
| ClassDef (JEvt, 5) |
|
|
std::ostream & | operator<< (std::ostream &out, const JEvt &event) |
| Write event to output.
|
|
Data structure for set of track fit results.
Definition at line 375 of file JReconstruction/JEvt.hh.
◆ JEvt()
◆ select() [1/2]
template<class JSelector_t >
void JFIT::JEvt::select |
( |
const JSelector_t & | selector | ) |
|
|
inline |
Select fits.
- Parameters
-
Definition at line 393 of file JReconstruction/JEvt.hh.
394 {
396
397 if (!empty()) {
398
399 iterator __end = partition(this->begin(), this->end(), selector);
400
401 this->erase(__end, this->end());
402 }
403 }
◆ select() [2/2]
template<class JComparator_t >
void JFIT::JEvt::select |
( |
const size_t | number_of_fits, |
|
|
const JComparator_t & | comparator ) |
|
inline |
Select fits.
- Parameters
-
number_of_fits | maximal number of best fits to select |
comparator | quality comparator |
Definition at line 413 of file JReconstruction/JEvt.hh.
415 {
417
418 if (!empty()) {
419
421
422 if (number_of_fits > 0 && number_of_fits < this->size()) {
423
424 advance(__end = this->begin(), number_of_fits);
425
426 partial_sort(this->begin(), __end, this->end(), comparator);
427
428 } else {
429
430 sort(this->begin(), __end, comparator);
431 }
432
433 this->erase(__end, this->end());
434 }
435 }
counter_type advance(counter_type &counter, const counter_type value, const counter_type limit=std::numeric_limits< counter_type >::max())
Advance counter.
◆ ClassDef()
JFIT::JEvt::ClassDef |
( |
JEvt | , |
|
|
5 | ) |
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & | out, |
|
|
const JEvt & | event ) |
|
friend |
Write event to output.
- Parameters
-
out | output stream |
event | event |
- Returns
- output stream
Definition at line 445 of file JReconstruction/JEvt.hh.
446 {
448
449 out << "Event: " << endl;
450
451 for (JEvt::const_iterator fit = event.begin(); fit != event.end(); ++fit) {
452 out << *fit;
453 }
454
455 return out;
456 }
The documentation for this class was generated from the following file: