OpenWalnut  1.5.0dev
WConverterIndexes.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 WCONVERTERINDEXES_H
26 #define WCONVERTERINDEXES_H
27 
28 #include <memory>
29 
30 
31 #include "WProtonData.h"
32 
33 
34 /**
35  * Holds the indexes of the columns and is able to update them.
36  */
38 {
39 public:
40  /**
41  * A shared_ptr to this class.
42  */
43  typedef std::shared_ptr< WConverterIndexes > SPtr;
44 
45  /**
46  * Empty constructor for class creation.
47  */
49 
50  /**
51  * Updates the indexes based on the data given.
52  * \param protonData The data which contains the columns.
53  */
54  void update( WProtonData::SPtr protonData );
55 
56  /**
57  * Gets the parentID index as integer.
58  * \return int The parentID index.
59  */
60  int getParentID();
61 
62  /**
63  * Gets the posX index as integer.
64  * \return int The posX index.
65  */
66  int getPosX();
67 
68 
69  /**
70  * Gets the posY index as integer.
71  * \return int The posY index.
72  */
73  int getPosY();
74 
75  /**
76  * Gets the posZ index as integer.
77  * \return int The posZ index.
78  */
79  int getPosZ();
80 
81  /**
82  * Gets the edep index as integer.
83  * \return int The edep index.
84  */
85  int getEdep();
86 
87  /**
88  * Gets the PDGEncoding index as integer.
89  * \return int The PDGEncoding index.
90  */
91  int getPDGEncoding();
92 
93  /**
94  * Gets the eventID index as integer.
95  * \return int The eventID index.
96  */
97  int getEventID();
98 
99 private:
100  int m_parentID = -1; //!< The parentID index.
101 
102  int m_posX = -1; //!< The posX index.
103 
104  int m_posY = -1; //!< The posY index.
105 
106  int m_posZ = -1; //!< The posZ index.
107 
108  int m_edep = -1; //!< The edep index.
109 
110  int m_PDGEncoding = -1; //!< The PDGEncoding index.
111 
112  int m_eventID = -1; //!< The eventID index.
113 };
114 
115 #endif // WCONVERTERINDEXES_H
Holds the indexes of the columns and is able to update them.
int getPosY()
Gets the posY index as integer.
int m_posZ
The posZ index.
int getParentID()
Gets the parentID index as integer.
int getEventID()
Gets the eventID index as integer.
WConverterIndexes()
Empty constructor for class creation.
int m_parentID
The parentID index.
int m_posY
The posY index.
int getPosZ()
Gets the posZ index as integer.
int getEdep()
Gets the edep index as integer.
int getPosX()
Gets the posX index as integer.
int m_eventID
The eventID index.
std::shared_ptr< WConverterIndexes > SPtr
A shared_ptr to this class.
int m_posX
The posX index.
void update(WProtonData::SPtr protonData)
Updates the indexes based on the data given.
int getPDGEncoding()
Gets the PDGEncoding index as integer.
int m_PDGEncoding
The PDGEncoding index.
int m_edep
The edep index.
std::shared_ptr< WProtonData > SPtr
shared_ptr that points to itself
Definition: WProtonData.h:52