Commit ed245f90 authored by daniel.bub's avatar daniel.bub
Browse files

[REFAC #132] rename WDatatype to WDataType

parent 375bbe0b
......@@ -24,24 +24,24 @@
#include <string>
#include "WDatatype.h"
#include "WDataType.h"
std::string WDatatype::getInt()
std::string WDataType::getInt()
{
return "int";
}
std::string WDatatype::getDouble()
std::string WDataType::getDouble()
{
return "double";
}
std::string WDatatype::getString()
std::string WDataType::getString()
{
return "string";
}
std::string WDatatype::getDefault()
std::string WDataType::getDefault()
{
return "default";
}
\ No newline at end of file
......@@ -30,7 +30,7 @@
/**
* Holds the datatypes as string
*/
class WDatatype
class WDataType
{
public:
/**
......
......@@ -138,11 +138,11 @@ void WProtonData::detectColumnTypesFromCsvData( WDataSetCSV::ContentSPtr csvData
for( size_t idx = 0; idx < m_columnTypes->size(); idx++ )
{
if( m_columnTypes->at( idx ) == WDatatype::getDouble() )
if(m_columnTypes->at( idx ) == WDataType::getDouble() )
{
if( checkIfDoubleColumnCanBeInteger( idx ) )
{
m_columnTypes->at( idx ) = WDatatype::getInt();
m_columnTypes->at( idx ) = WDataType::getInt();
}
}
}
......@@ -155,15 +155,15 @@ std::string WProtonData::determineColumnTypeByString( std::string cellValue )
if( std::regex_search( cellValue, regexInt ) )
{
return WDatatype::getInt();
return WDataType::getInt();
}
else if( std::regex_search( cellValue, regexDouble ) )
{
return WDatatype::getDouble();
return WDataType::getDouble();
}
else
{
return WDatatype::getString();
return WDataType::getString();
}
}
......@@ -192,7 +192,7 @@ std::vector< std::string > WProtonData::getHeaderFromType( std::string typeName
std::vector< std::string > columnTypes = *m_columnTypes;
std::vector< std::string > filterHeader;
if( typeName == WDatatype::getDefault() )
if(typeName == WDataType::getDefault() )
{
return header;
}
......
......@@ -31,7 +31,7 @@
#include <vector>
#include "core/dataHandler/WDataSetCSV.h"
#include "WDatatype.h"
#include "WDataType.h"
/**
......
......@@ -25,7 +25,7 @@
#include <list>
#include <string>
#include "WDatatype.h"
#include "WDataType.h"
#include "WSingleSelectorName.h"
std::string WSingleSelectorName::getX()
......@@ -66,67 +66,67 @@ std::string WSingleSelectorName::getParentId()
WSingleSelectorName::NameDescriptionSearchTyp WSingleSelectorName::getXwithDescription()
{
return WSingleSelectorName::NameDescriptionSearchTyp(
getX(),
"Choose the column which should be used to determine the x coordinate.",
"posX",
WDatatype::getDouble() );
getX(),
"Choose the column which should be used to determine the x coordinate.",
"posX",
WDataType::getDouble() );
}
WSingleSelectorName::NameDescriptionSearchTyp WSingleSelectorName::getYwithDescription()
{
return WSingleSelectorName::NameDescriptionSearchTyp(
getY(),
"Choose the column which should be used to determine the y coordinate.",
"posY",
WDatatype::getDouble() );
getY(),
"Choose the column which should be used to determine the y coordinate.",
"posY",
WDataType::getDouble() );
}
WSingleSelectorName::NameDescriptionSearchTyp WSingleSelectorName::getZwithDescription()
{
return WSingleSelectorName::NameDescriptionSearchTyp(
getZ(),
"Choose the column which should be used to determine the z coordinate.",
"posZ",
WDatatype::getDefault() );
getZ(),
"Choose the column which should be used to determine the z coordinate.",
"posZ",
WDataType::getDefault() );
}
WSingleSelectorName::NameDescriptionSearchTyp WSingleSelectorName::getPDGwithDescription()
{
return WSingleSelectorName::NameDescriptionSearchTyp(
getPDG(),
"Choose the column which should be used to determine the particle data group.",
"PDGEncoding",
WDatatype::getInt() );
getPDG(),
"Choose the column which should be used to determine the particle data group.",
"PDGEncoding",
WDataType::getInt() );
}
WSingleSelectorName::NameDescriptionSearchTyp WSingleSelectorName::getEdepWithDescription()
{
return WSingleSelectorName::NameDescriptionSearchTyp(
getEdep(),
"Choose the column which should be used to determine the energy deposition.",
"edep",
WDatatype::getDouble() );
getEdep(),
"Choose the column which should be used to determine the energy deposition.",
"edep",
WDataType::getDouble() );
}
WSingleSelectorName::NameDescriptionSearchTyp WSingleSelectorName::getEventIdWithDescription()
{
return WSingleSelectorName::NameDescriptionSearchTyp(
getEventId(),
getEventId(),
"Choose the column which should be used to determine the event id."
"Tracks will be drawn based on the the event id, all particles with the same event id will be connected.",
"eventID",
WDatatype::getInt() );
"eventID",
WDataType::getInt() );
}
WSingleSelectorName::NameDescriptionSearchTyp WSingleSelectorName::getParentIdWithDescription()
{
return WSingleSelectorName::NameDescriptionSearchTyp(
getParentId(),
getParentId(),
"Choose the column which should be used to determine the parent id."
"Primaries and secondaries filtering is based on that id, if a "
"particle has the parent id 0 it is a primary otherwise it is a secondary.",
"parentID",
WDatatype::getInt() );
"parentID",
WDataType::getInt() );
}
std::list< WSingleSelectorName::NameDescriptionSearchTyp > WSingleSelectorName::getListOfSelectorContent()
......
......@@ -29,7 +29,7 @@
#include <list>
#include <string>
#include "WDatatype.h"
#include "WDataType.h"
/**
......
......@@ -119,7 +119,7 @@ WPropSelection WColumnPropertyHandler::addHeaderProperty( WColumnPropertyHandler
if( indexSingleSelector < 0 )
{
indexSingleSelector = index;
type = WDatatype::getDefault();
type = WDataType::getDefault();
}
m_protonData->setStateIndex( columnName, index );
......
......@@ -35,7 +35,7 @@
#include "core/common/WItemSelectionItemTyped.h"
#include "../WDatatype.h"
#include "../WDataType.h"
#include "../WProtonData.h"
#include "../WSingleSelectorName.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment