Falaise  4.0.1
SuperNEMO Software Toolkit
calibrated_data.h
Go to the documentation of this file.
1 // -*- mode: c++ ; -*-
2 /// \file falaise/snemo/datamodels/calibrated_data.h
3 /* Author(s) : Mathieu Bongrand <bongrand@lal.in2p3.fr>
4  * Creation date: 2011-02-08
5  * Last modified: 2014-01-27
6  *
7  * License:
8  *
9  * Description:
10  *
11  * SuperNEMO calibrated data model
12  *
13  *
14  * History:
15  *
16  */
17 
18 #ifndef FALAISE_SNEMO_DATAMODEL_CALIBRATED_DATA_H
19 #define FALAISE_SNEMO_DATAMODEL_CALIBRATED_DATA_H 1
20 
21 // Standard library:
22 #include <string>
23 #include <vector>
24 
25 // Third party:
26 // - Boost :
27 #include <boost/serialization/access.hpp>
28 // - Bayeux/datatools:
29 #include <datatools/handle.h>
30 #include <datatools/i_clear.h>
32 #include <datatools/i_tree_dump.h>
33 #include <datatools/properties.h>
34 
35 // This project :
38 
39 namespace snemo {
40 
41 namespace datamodel {
42 
43 /// \brief The data structure that hosts information about calibrated hits
46  public datatools::i_clear {
47  public:
48  /// Handle to a calibrated tracker hit
50 
51  /// Handle to a calibrated calorimeter hit
53 
54  /// Collection of handles on calibrated tracker hits
55  typedef std::vector<tracker_hit_handle_type> tracker_hit_collection_type;
56 
57  /// Collection of handles on calibrated calorimeter hits
58  typedef std::vector<calorimeter_hit_handle_type> calorimeter_hit_collection_type;
59 
60  /// Check if there are some hits
61  bool has_data() const;
62 
63  /// Check if there are some calibrated calorimeter hits
65 
66  /// Reset the collection of calorimeter hits
68 
69  /// Return the const collection of calorimeter hits
71 
72  /// Return the mutable collection of calorimeter hits
74 
75  /// Check if there are some calibrated tracker hits
76  bool has_calibrated_tracker_hits() const;
77 
78  /// Reset the collection of tracker hits
80 
81  /// Return the const collection of tracker hits
83 
84  /// Return the mutable collection of tracker hits
86 
87  /// Return the const container of properties
89 
90  /// Return the mutable container of properties
92 
93  /// Reset
94  void reset();
95 
96  /// Constructor
98 
99  /// Destructor
100  virtual ~calibrated_data();
101 
102  /// Clear attributes
103  virtual void clear();
104 
105  /// Smart print
106  virtual void tree_dump(std::ostream& a_out = std::clog, const std::string& a_title = "",
107  const std::string& a_indent = "", bool a_inherit = false) const;
108 
109  private:
111  _calibrated_calorimeter_hits_; //!< Collection of calibrated calorimeter hits
112  tracker_hit_collection_type _calibrated_tracker_hits_; //!< Collection of calibrated tracker hits
113  datatools::properties _properties_; //!< Auxiliary properties
114 
116 };
117 
118 } // end of namespace datamodel
119 
120 } // end of namespace snemo
121 
122 #include <boost/serialization/export.hpp>
123 BOOST_CLASS_EXPORT_KEY2(snemo::datamodel::calibrated_data, "snemo::datamodel::calibrated_data")
124 
125 // Class version:
126 #include <boost/serialization/version.hpp>
127 BOOST_CLASS_VERSION(snemo::datamodel::calibrated_data, 1)
128 
129 #endif // FALAISE_SNEMO_DATAMODEL_CALIBRATED_DATA_H
bool has_calibrated_tracker_hits() const
Check if there are some calibrated tracker hits.
bool has_data() const
Check if there are some hits.
void reset_calibrated_tracker_hits()
Reset the collection of tracker hits.
datatools::handle< calibrated_calorimeter_hit > calorimeter_hit_handle_type
Handle to a calibrated calorimeter hit.
Definition: calibrated_data.h:52
datatools::handle< calibrated_tracker_hit > tracker_hit_handle_type
Handle to a calibrated tracker hit.
Definition: calibrated_data.h:49
const calorimeter_hit_collection_type & calibrated_calorimeter_hits() const
Return the const collection of calorimeter hits.
virtual ~calibrated_data()
Destructor.
#define DATATOOLS_SERIALIZATION_DECLARATION()
std::vector< calorimeter_hit_handle_type > calorimeter_hit_collection_type
Collection of handles on calibrated calorimeter hits.
Definition: calibrated_data.h:58
bool has_calibrated_calorimeter_hits() const
Check if there are some calibrated calorimeter hits.
Definition: calo_tapered_scin_box_model.h:54
virtual void tree_dump(std::ostream &a_out=std::clog, const std::string &a_title="", const std::string &a_indent="", bool a_inherit=false) const
Smart print.
virtual void clear()
Clear attributes.
The data structure that hosts information about calibrated hits.
Definition: calibrated_data.h:44
const datatools::properties & get_properties() const
Return the const container of properties.
void reset_calibrated_calorimeter_hits()
Reset the collection of calorimeter hits.
const tracker_hit_collection_type & calibrated_tracker_hits() const
Return the const collection of tracker hits.
std::vector< tracker_hit_handle_type > tracker_hit_collection_type
Collection of handles on calibrated tracker hits.
Definition: calibrated_data.h:55
datatools::properties & grab_properties()
Return the mutable container of properties.