CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Fit_Result_Vec.h
Go to the documentation of this file.
1 //
2 // $Id: Fit_Result_Vec.h,v 1.1 2011/05/26 09:46:53 mseidel Exp $
3 //
4 // File: hitfit/Fit_Result_Vec.h
5 // Purpose: Hold a set of Fit_Result structures.
6 // Created: Jul, 2000, sss, based on run 1 mass analysis code.
7 //
8 // This class holds pointers to a set of Fit_Result's, resulting from
9 // different jet permutation with some consistent selection.
10 // The results are ordered by increasing chisq values. A maximum
11 // length for the vector may be specified; when new results are added,
12 // those with the largest chisq fall off the end.
13 //
14 // The Fit_Result objects are reference counted, in order to allow them
15 // to be entered in multiple vectors.
16 //
17 // CMSSW File : interface/Fit_Result_Vec.h
18 // Original Author : Scott Stuart Snyder <snyder@bnl.gov> for D0
19 // Imported to CMSSW by Haryo Sumowidagdo <Suharyo.Sumowidagdo@cern.ch>
20 //
21 
45 #ifndef HITFIT_FIT_RESULT_VEC_H
46 #define HITFIT_FIT_RESULT_VEC_H
47 
48 
49 #include <vector>
50 #include <iosfwd>
51 
52 
53 namespace hitfit {
54 
55 
56 class Fit_Result;
57 
58 
72 //
73 // Purpose: Hold a set of Fit_Result structures.
74 //
75 {
76 public:
77  // Constructor, destructor. The maximum length of the vector
78  // is specified here.
79 
86 
90  ~Fit_Result_Vec ();
91 
92  // Copy constructor.
97  Fit_Result_Vec (const Fit_Result_Vec& vec);
98 
99  // Assignment.
105 
106  // Get back the number of results in the vector.
111 
112  // Get back the Ith result in the vector.
119 
120  // Add a new result to the list.
126  void push (Fit_Result* res);
127 
128  // Dump out the vector.
129  friend std::ostream& operator<< (std::ostream& s,
130  const Fit_Result_Vec& resvec);
131 
132 private:
133  // The object state.
134 
138  std::vector<Fit_Result*> _v;
139 
144 };
145 
146 
147 } // namespace hitfit
148 
149 
150 #endif // not HITFIT_FIT_RESULT_H
int i
Definition: DBlmapReader.cc:9
Hold the result of one kinematic fit.
Definition: Fit_Result.h:54
Fit_Result_Vec & operator=(const Fit_Result_Vec &vec)
Assignment operator.
~Fit_Result_Vec()
Destructor.
const Fit_Result & operator[](std::vector< Fit_Result * >::size_type i) const
Return the i-th element of the Fit_Result objects in the vector.
uint16_t size_type
void push(Fit_Result *res)
Add a new Fit_Result to the list.
Fit_Result_Vec(std::vector< Fit_Result * >::size_type max_len)
Constructor.
std::vector< Fit_Result * >::size_type _max_len
std::vector< Fit_Result * > _v
Holds pointers to a set of Fit_Result objects, resulting from different jet permutation with some con...
friend 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.
std::vector< Fit_Result * >::size_type size() const
Return the number of Fit_Result objects in the list.