Holds pointers to a set of Fit_Result objects, resulting from different jet permutation with some consistent selection. The results are ordered by increasing values. A maximum length for the list of Fit_Result objects may be specified; when new results, those with the largest value fall off the end. More...
#include <Fit_Result_Vec.h>
Public Member Functions | |
Fit_Result_Vec (const Fit_Result_Vec &vec) | |
Copy constructor. More... | |
Fit_Result_Vec (std::vector< std::shared_ptr< Fit_Result >>::size_type max_len) | |
Constructor. More... | |
Fit_Result_Vec & | operator= (const Fit_Result_Vec &vec) |
Assignment operator. More... | |
const Fit_Result & | operator[] (std::vector< std::shared_ptr< Fit_Result >>::size_type i) const |
Return the i-th element of the Fit_Result objects in the vector. More... | |
void | push (std::shared_ptr< Fit_Result > res) |
Add a new Fit_Result to the list. More... | |
std::vector< std::shared_ptr< Fit_Result > >::size_type | size () const |
Return the number of Fit_Result objects in the list. More... | |
~Fit_Result_Vec () | |
Destructor. More... | |
Private Attributes | |
std::vector< std::shared_ptr< Fit_Result > >::size_type | _max_len |
std::vector< std::shared_ptr< Fit_Result > > | _v |
Friends | |
std::ostream & | operator<< (std::ostream &s, const Fit_Result_Vec &resvec) |
Output stream operator, print the content of this Fit_Result_Vec to an output stream. More... | |
Holds pointers to a set of Fit_Result objects, resulting from different jet permutation with some consistent selection. The results are ordered by increasing values. A maximum length for the list of Fit_Result objects may be specified; when new results, those with the largest value fall off the end.
The Fit_Result object are reference counted, in order to allow then to be entered in multiple vectors.
Definition at line 67 of file Fit_Result_Vec.h.
hitfit::Fit_Result_Vec::Fit_Result_Vec | ( | std::vector< std::shared_ptr< Fit_Result >>::size_type | max_len | ) |
Constructor.
max_len | The maximum length of the list. Must be a positive integer. |
Definition at line 48 of file Fit_Result_Vec.cc.
References _v, and cms::cuda::assert().
hitfit::Fit_Result_Vec::~Fit_Result_Vec | ( | ) |
hitfit::Fit_Result_Vec::Fit_Result_Vec | ( | const Fit_Result_Vec & | vec | ) |
Fit_Result_Vec & hitfit::Fit_Result_Vec::operator= | ( | const Fit_Result_Vec & | vec | ) |
const Fit_Result & hitfit::Fit_Result_Vec::operator[] | ( | std::vector< std::shared_ptr< Fit_Result >>::size_type | i | ) | const |
Return the i-th element of the Fit_Result objects in the vector.
i | The index of the desired Fit_Result object. |
Definition at line 102 of file Fit_Result_Vec.cc.
References cms::cuda::assert(), and mps_fire::i.
void hitfit::Fit_Result_Vec::push | ( | std::shared_ptr< Fit_Result > | res | ) |
Add a new Fit_Result to the list.
res | The new Fit_Result object to be added into the list of Fit_Result object. |
Definition at line 131 of file Fit_Result_Vec.cc.
References _max_len, _v, and cuda_std::lower_bound().
std::vector< std::shared_ptr< Fit_Result > >::size_type hitfit::Fit_Result_Vec::size | ( | void | ) | const |
Return the number of Fit_Result objects in the list.
Definition at line 91 of file Fit_Result_Vec.cc.
References _v.
Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().
|
friend |
Output stream operator, print the content of this Fit_Result_Vec to an output stream.
s | The output stream to which to write. |
resvec | The instance of Fit_Result_Vec to be printed. |
Definition at line 159 of file Fit_Result_Vec.cc.
|
private |
Maximum number of Fit_Result pointers in the list.
Definition at line 138 of file Fit_Result_Vec.h.
Referenced by operator=(), and push().
|
private |
The list of Fit_Result pointers.
Definition at line 133 of file Fit_Result_Vec.h.
Referenced by Fit_Result_Vec(), hitfit::operator<<(), operator=(), push(), and size().