Falaise  4.0.1
SuperNEMO Software Toolkit
tracker_trajectory_data.h
Go to the documentation of this file.
1 /// \file falaise/snemo/datamodels/tracker_trajectory_data.h
2 /* Author (s) : François Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2012-03-19
4  * Last modified: 2014-01-27
5  *
6  * Description: SuperNEMO Tracker trajectory data model
7  *
8  * History:
9  *
10  */
11 
12 #ifndef FALAISE_SNEMO_DATAMODELS_TRACKER_TRAJECTORY_DATA_H
13 #define FALAISE_SNEMO_DATAMODELS_TRACKER_TRAJECTORY_DATA_H 1
14 
15 // Third party:
16 // - Boost:
17 #include <boost/serialization/access.hpp>
18 // - Bayeux/datatools:
19 #include <datatools/i_clear.h>
21 #include <datatools/i_tree_dump.h>
22 #include <datatools/properties.h>
23 
24 // This project::
26 
27 namespace snemo {
28 
29 namespace datamodel {
30 
31 /// SuperNEMO Tracker trajectory data model
34  public datatools::i_clear {
35  public:
36  /// Collection of handles on tracker trajectory solutions
37  typedef std::vector<tracker_trajectory_solution::handle_type> solution_col_type;
38 
39  /// Default constructor
41 
42  /// Destructor:
43  virtual ~tracker_trajectory_data();
44 
45  /// Check if there are some trajectory solutions
46  bool has_solutions() const;
47 
48  /// Returns the number of solutions
49  size_t get_number_of_solutions() const;
50 
51  /// Add a trajectory solution
53  bool default_solution_ = false);
54 
55  // tracker_trajectory_solution & grab_solution(int i_);
56 
57  /// Return a non mutable reference to a trajectory solution by index
58  const tracker_trajectory_solution& get_solution(int i_) const;
59 
60  /// Reset the trajectory solutions
61  void invalidate_solutions();
62 
63  /// Check if there is some default trajectory solution
64  bool has_default_solution() const;
65 
67 
69 
70  /// Return a non mutable reference to the default trajectory solution is any
72 
73  /// Reset the default trajectory solution is any
75 
76  /// Set the default trajectory solution
77  void set_default_solution(int index_);
78 
79  /// Reset the internals
80  void reset();
81 
82  /// Return a mutable reference on the container of auxiliary properties
84 
85  /// Return a non mutable reference on the container of auxiliary properties
87 
88  /// Clear the object
89  virtual void clear();
90 
91  /// Smart print
92  virtual void tree_dump(std::ostream& out_ = std::clog, const std::string& title_ = "",
93  const std::string& indent_ = "", bool inherit_ = false) const;
94 
95  private:
96  solution_col_type _solutions_; //!< Collection of tracker trajectory solution handles
98  _default_solution_; //!< Handle to the default/best solution
99  datatools::properties _auxiliaries_; //!< Auxiliary properties
100 
102 
103 }; // end of class tracker_trajectory_data
104 
105 } // end of namespace datamodel
106 
107 } // end of namespace snemo
108 
109 #include <boost/serialization/export.hpp>
110 BOOST_CLASS_EXPORT_KEY2(snemo::datamodel::tracker_trajectory_data,
111  "snemo::datamodel::tracker_trajectory_data")
112 
113 #endif // FALAISE_SNEMO_DATAMODELS_TRACKER_TRAJECTORY_DATA_H
114 
115 /*
116 ** Local Variables: --
117 ** mode: c++ --
118 ** c-file-style: "gnu" --
119 ** tab-width: 2 --
120 ** End: --
121 */
SuperNEMO Tracker trajectory data model.
Definition: tracker_trajectory_data.h:32
const tracker_trajectory_solution & get_solution(int i_) const
Return a non mutable reference to a trajectory solution by index.
virtual void clear()
Clear the object.
virtual ~tracker_trajectory_data()
Destructor:
const tracker_trajectory_solution & get_default_solution() const
Return a non mutable reference to the default trajectory solution is any.
tracker_trajectory_data::solution_col_type & grab_solutions()
void invalidate_default_solution()
Reset the default trajectory solution is any.
void invalidate_solutions()
Reset the trajectory solutions.
A collection of tracker clusters , solution of a trajectory algorithm.
Definition: tracker_trajectory_solution.h:33
size_t get_number_of_solutions() const
Returns the number of solutions.
void add_solution(const tracker_trajectory_solution::handle_type &handle_, bool default_solution_=false)
Add a trajectory solution.
#define DATATOOLS_SERIALIZATION_DECLARATION()
void reset()
Reset the internals.
tracker_trajectory_data()
Default constructor.
std::vector< tracker_trajectory_solution::handle_type > solution_col_type
Collection of handles on tracker trajectory solutions.
Definition: tracker_trajectory_data.h:37
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
Definition: calo_tapered_scin_box_model.h:54
const tracker_trajectory_data::solution_col_type & get_solutions() const
datatools::properties & grab_auxiliaries()
Return a non mutable reference on the container of auxiliary properties.
bool has_default_solution() const
Check if there is some default trajectory solution.
bool has_solutions() const
Check if there are some trajectory solutions.
const datatools::properties & get_auxiliaries() const
Return a mutable reference on the container of auxiliary properties.
void set_default_solution(int index_)
Set the default trajectory solution.