OpenWalnut  1.5.0dev
WConverterIndexes.cpp
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 #include "WConverterIndexes.h"
26 
27 
29 {
30 }
31 
33 {
34  m_parentID = protonData->getColumnIndexBySelection( "Parent id" );
35  m_posX = protonData->getColumnIndexBySelection( "X" );
36  m_posY = protonData->getColumnIndexBySelection( "Y" );
37  m_posZ = protonData->getColumnIndexBySelection( "Z" );
38  m_edep = protonData->getColumnIndexBySelection( "Energy deposition" );
39  m_PDGEncoding = protonData->getColumnIndexBySelection( "Particle Data Group" );
40  m_eventID = protonData->getColumnIndexBySelection( "Event id" );
41 }
42 
44 {
45  return m_parentID;
46 }
47 
49 {
50  return m_posX;
51 }
52 
54 {
55  return m_posY;
56 }
57 
59 {
60  return m_posZ;
61 }
62 
64 {
65  return m_edep;
66 }
67 
69 {
70  return m_PDGEncoding;
71 }
72 
74 {
75  return m_eventID;
76 }
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.
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