Commit 62dfb09b authored by Hung Dang-Quoc's avatar Hung Dang-Quoc
Browse files

Merge branch 'sprint_5' into 'top2021s5/#125_warn_overwrite_file'

# Conflicts:
#   src/modules/filterProtonData/propertyHandler/WFilterPropertyHandler.cpp
parents 767a9a6f c0bf0a3e
......@@ -128,7 +128,7 @@ boost::shared_ptr< std::vector<unsigned char> > WCsvConverter::sampleTransferFun
void WCsvConverter::normalizeEdeps( SPFloatVector edeps, SPFloatVector colorArray, float maxEdep )
{
if( m_protonData->isColumnAvailable( WSingleSelectorName::getEDEP() ) )
if( m_protonData->isColumnAvailable( WSingleSelectorName::getEdep() ) )
{
boost::shared_ptr< std::vector< unsigned char > > data = sampleTransferFunction();
......@@ -168,7 +168,7 @@ bool WCsvConverter::checkConditionToPass( WDataSetCSV::Content::iterator dataRow
return false;
}
if( m_protonData->isColumnAvailable( WSingleSelectorName::getPARENTID() ) )
if( m_protonData->isColumnAvailable( WSingleSelectorName::getParentId() ) )
{
int PrimaryValue = stringToInt( dataRow->at( m_indexes->getParentID() ) );
......@@ -192,7 +192,7 @@ bool WCsvConverter::checkConditionToPass( WDataSetCSV::Content::iterator dataRow
}
}
if( m_protonData->isColumnAvailable( WSingleSelectorName::getEVENTID() ) )
if( m_protonData->isColumnAvailable( WSingleSelectorName::getEventId() ) )
{
if(dataRow->at( m_indexes->getEventID() ) == "NULL")
{
......@@ -219,7 +219,7 @@ void WCsvConverter::addVertex( WDataSetCSV::Content::iterator dataRow )
void WCsvConverter::addColor( WColor plainColor )
{
if( !m_protonData->isColumnAvailable( WSingleSelectorName::getEDEP() ) ||
if( !m_protonData->isColumnAvailable( WSingleSelectorName::getEdep() ) ||
!m_propertyStatus->getVisualizationPropertyHandler()->getColorFromEdep()->get() )
{
m_vectors->getColors()->push_back( plainColor[0] );
......@@ -230,7 +230,7 @@ void WCsvConverter::addColor( WColor plainColor )
void WCsvConverter::addEdepAndSize( WDataSetCSV::Content::iterator dataRow, float* maxEdep )
{
if( !m_protonData->isColumnAvailable( WSingleSelectorName::getEDEP() ) )
if( !m_protonData->isColumnAvailable( WSingleSelectorName::getEdep() ) )
{
return;
}
......@@ -246,7 +246,7 @@ void WCsvConverter::addEdepAndSize( WDataSetCSV::Content::iterator dataRow, floa
void WCsvConverter::calculateFibers()
{
if( !m_protonData->isColumnAvailable( WSingleSelectorName::getEVENTID() ) )
if( !m_protonData->isColumnAvailable( WSingleSelectorName::getEventId() ) )
{
return;
}
......@@ -280,7 +280,7 @@ void WCsvConverter::calculateFibers()
void WCsvConverter::createOutputPoints()
{
if( m_protonData->isColumnAvailable( WSingleSelectorName::getEDEP() ) )
if( m_protonData->isColumnAvailable( WSingleSelectorName::getEdep() ) )
{
if( m_propertyStatus->getVisualizationPropertyHandler()->getSizesFromEdep()->get() )
{
......@@ -305,7 +305,7 @@ void WCsvConverter::createOutputPoints()
void WCsvConverter::createOutputFibers()
{
calculateFibers();
if( !m_protonData->isColumnAvailable( WSingleSelectorName::getEVENTID() ) )
if( !m_protonData->isColumnAvailable( WSingleSelectorName::getEventId() ) )
{
m_fibers = boost::shared_ptr< WDataSetFibers >(
new WDataSetFibers(
......@@ -330,7 +330,7 @@ void WCsvConverter::createOutputFibers()
);
}
if( m_protonData->isColumnAvailable( WSingleSelectorName::getEDEP() ) )
if( m_protonData->isColumnAvailable( WSingleSelectorName::getEdep() ) )
{
if( m_propertyStatus->getVisualizationPropertyHandler()->getColorFromEdep()->get() )
{
......@@ -345,7 +345,7 @@ void WCsvConverter::createOutputFibers()
void WCsvConverter::createOutputPointsAndEventIDs()
{
if( m_protonData->isColumnAvailable( WSingleSelectorName::getEVENTID() ) )
if( m_protonData->isColumnAvailable( WSingleSelectorName::getEventId() ) )
{
m_selectedEventIDs = boost::shared_ptr < WDataSetPointsAndEventID >(
new WDataSetPointsAndEventID(
......@@ -359,7 +359,7 @@ void WCsvConverter::createOutputPointsAndEventIDs()
void WCsvConverter::addEventID( WDataSetCSV::Content::iterator dataRow )
{
if( m_protonData->isColumnAvailable( WSingleSelectorName::getEVENTID() ) )
if( m_protonData->isColumnAvailable( WSingleSelectorName::getEventId() ) )
{
if(dataRow->at( m_indexes->getEventID() ) == "NULL")
{
......
......@@ -47,17 +47,17 @@ std::string WSingleSelectorName::getPDG()
return "Particle Data Group";
}
std::string WSingleSelectorName::getEDEP()
std::string WSingleSelectorName::getEdep()
{
return "Energy deposition";
}
std::string WSingleSelectorName::getEVENTID()
std::string WSingleSelectorName::getEventId()
{
return "Event id";
}
std::string WSingleSelectorName::getPARENTID()
std::string WSingleSelectorName::getParentId()
{
return "Parent id";
}
......@@ -90,24 +90,24 @@ WSingleSelectorName::NameDescriptionSearch WSingleSelectorName::getPDGwithDescri
"PDGEncoding" );
}
WSingleSelectorName::NameDescriptionSearch WSingleSelectorName::getEDEPwithDescription()
WSingleSelectorName::NameDescriptionSearch WSingleSelectorName::getEdepWithDescription()
{
return WSingleSelectorName::NameDescriptionSearch( getEDEP(),
return WSingleSelectorName::NameDescriptionSearch( getEdep(),
"Choose the column which should be used to determine the energy deposition.",
"edep" );
}
WSingleSelectorName::NameDescriptionSearch WSingleSelectorName::getEVENTIDwithDescription()
WSingleSelectorName::NameDescriptionSearch WSingleSelectorName::getEventIdWithDescription()
{
return WSingleSelectorName::NameDescriptionSearch( getEVENTID(),
return WSingleSelectorName::NameDescriptionSearch( 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" );
}
WSingleSelectorName::NameDescriptionSearch WSingleSelectorName::getPARENTIDwithDescription()
WSingleSelectorName::NameDescriptionSearch WSingleSelectorName::getParentIdWithDescription()
{
return WSingleSelectorName::NameDescriptionSearch( getPARENTID(),
return WSingleSelectorName::NameDescriptionSearch( 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.",
......@@ -122,9 +122,9 @@ std::list< WSingleSelectorName::NameDescriptionSearch > WSingleSelectorName::get
list.push_back( getYwithDescription() );
list.push_back( getZwithDescription() );
list.push_back( getPDGwithDescription() );
list.push_back( getEDEPwithDescription() );
list.push_back( getEVENTIDwithDescription() );
list.push_back( getPARENTIDwithDescription() );
list.push_back( getEdepWithDescription() );
list.push_back( getEventIdWithDescription() );
list.push_back( getParentIdWithDescription() );
return list;
}
......@@ -72,19 +72,19 @@ public:
* getter
* \return the name of the single-selector (edep)
*/
static std::string getEDEP();
static std::string getEdep();
/**
* getter
* \return the name of the single-selector (Event id)
*/
static std::string getEVENTID();
static std::string getEventId();
/**
* getter
* \return the name of the single-selector (Parent id)
*/
static std::string getPARENTID();
static std::string getParentId();
/**
* getter
......@@ -114,19 +114,19 @@ public:
* getter
* \return the name of the single-selector (edep) with Description
*/
static WSingleSelectorName::NameDescriptionSearch getEDEPwithDescription();
static WSingleSelectorName::NameDescriptionSearch getEdepWithDescription();
/**
* getter
* \return the name of the single-selector (Event id) with Description
*/
static WSingleSelectorName::NameDescriptionSearch getEVENTIDwithDescription();
static WSingleSelectorName::NameDescriptionSearch getEventIdWithDescription();
/**
* getter
* \return the name of the single-selector (Parent id) with Description
*/
static WSingleSelectorName::NameDescriptionSearch getPARENTIDwithDescription();
static WSingleSelectorName::NameDescriptionSearch getParentIdWithDescription();
/**
* getter
......
......@@ -49,7 +49,7 @@ void WEventIDLimitationPropertyHandler::createProperties()
void WEventIDLimitationPropertyHandler::updateProperty()
{
if( m_protonData->isColumnAvailable( WSingleSelectorName::getEVENTID() ) )
if( m_protonData->isColumnAvailable( WSingleSelectorName::getEventId() ) )
{
m_minCap->setHidden( false );
m_maxCap->setHidden( false );
......@@ -76,7 +76,7 @@ void WEventIDLimitationPropertyHandler::updateMesh()
void WEventIDLimitationPropertyHandler::determineMinMaxEventID()
{
int eventIDIndex = m_protonData->getColumnIndexBySelection( WSingleSelectorName::getEVENTID() );
int eventIDIndex = m_protonData->getColumnIndexBySelection( WSingleSelectorName::getEventId() );
if(eventIDIndex < 0)
{
......
......@@ -52,7 +52,9 @@ void WFilterPropertyHandler::createProperties()
void WFilterPropertyHandler::updateProperty()
{
if( m_protonData->isColumnAvailable( WSingleSelectorName::getPARENTID() ) )
updatePDGProperties();
if( m_protonData->isColumnAvailable( WSingleSelectorName::getParentId() ) )
{
m_showPrimaries->setHidden( false );
m_showSecondaries->setHidden( false );
......
......@@ -64,7 +64,7 @@ void WVisualizationPropertyHandler::updateProperty()
if( m_protonData->isColumnAvailable( WSingleSelectorName::getX() ) &&
m_protonData->isColumnAvailable( WSingleSelectorName::getY() ) &&
m_protonData->isColumnAvailable( WSingleSelectorName::getZ() ) &&
m_protonData->isColumnAvailable( WSingleSelectorName::getEDEP() ) )
m_protonData->isColumnAvailable( WSingleSelectorName::getEdep() ) )
{
m_sizesFromEdep->setHidden( false );
m_colorFromEdep->setHidden( false );
......
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