OpenWalnut  1.5.0dev
WOutputPropertyHandler.h
1 //---------------------------------------------------------------------------
2 //
3 // Project: OpenWalnut ( http://www.openwalnut.org )
4 //
5 // Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6 // For more information see http://www.openwalnut.org/copying
7 //
8 // This file is part of OpenWalnut.
9 //
10 // OpenWalnut is free software: you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // OpenWalnut is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public License
21 // along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
22 //
23 //---------------------------------------------------------------------------
24 
25 #ifndef WOUTPUTPROPERTYHANDLER_H
26 #define WOUTPUTPROPERTYHANDLER_H
27 
28 #include "../WProtonData.h"
29 
30 /**
31  * Creates, updates and handles the output properties.
32  */
34 {
35 public:
36  /**
37  * shared_ptr that points to itself.
38  */
39  typedef std::shared_ptr< WOutputPropertyHandler > SPtr;
40 
41  /**
42  * Function typedf for updating the data.
43  */
44  typedef boost::function< void() > CallbackPtr;
45 
46  /**
47  * constructor
48  *
49  * \param protonData Pointer to the content and header of the CSV.
50  * \param properties A property variable that is generated by the WModul.
51  * \param dataUpdate A function variable that reinitializes the WDataSets.
52  */
54 
55  /**
56  * creates the group property and the subroperties.
57  */
58  void createProperties();
59 
60  /**
61  * update current group property and the subproperties.
62  */
63  void updateProperties();
64 
65  /**
66  * Getter
67  * \return WPropBool of the energy deposition.
68  */
69  WPropBool getEnergyDeposition();
70 
71  /**
72  * Getter
73  * \return WPropBool of the eventID.
74  */
75  WPropBool getEventID();
76 
77 private:
78  WProtonData::SPtr m_protonData; //!< Pointer to the content and header of the CSV.
79  WPropertyGroup::SPtr m_properties; //!< A property variable that is generated by the WModul.
80  WOutputPropertyHandler::CallbackPtr m_dataUpdate; //!< A function variable that reinitializes the WDataSets.
81 
82  WPropBool m_energyDeposition; //!< Whether to send the energy deposition or not.
83  WPropBool m_eventID; //!< Whether to send the eventID or not.
84 };
85 
86 #endif // WOUTPUTPROPERTYHANDLER_H
Creates, updates and handles the output properties.
boost::function< void() > CallbackPtr
Function typedf for updating the data.
WPropBool m_eventID
Whether to send the eventID or not.
WPropBool getEnergyDeposition()
Getter.
std::shared_ptr< WOutputPropertyHandler > SPtr
shared_ptr that points to itself.
WOutputPropertyHandler(WProtonData::SPtr protonData, WPropertyGroup::SPtr properties, WOutputPropertyHandler::CallbackPtr dataUpdate)
constructor
WOutputPropertyHandler::CallbackPtr m_dataUpdate
A function variable that reinitializes the WDataSets.
WPropBool m_energyDeposition
Whether to send the energy deposition or not.
void createProperties()
creates the group property and the subroperties.
WPropertyGroup::SPtr m_properties
A property variable that is generated by the WModul.
WProtonData::SPtr m_protonData
Pointer to the content and header of the CSV.
void updateProperties()
update current group property and the subproperties.
std::shared_ptr< WPropertyGroup > SPtr
shared pointer to object of this type
std::shared_ptr< WProtonData > SPtr
shared_ptr that points to itself
Definition: WProtonData.h:52