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

[REFAC #60] resolve stylecheck errors

parent d32a8f15
......@@ -106,30 +106,29 @@ boost::shared_ptr< std::vector<unsigned char> > WMCsvConverter::sampleTransferFu
void WMCsvConverter::normalizeEdeps( SPFloatVector edeps, SPFloatVector colorArray, float maxEdep )
{
if(m_protonData->isColumnAvailable("edep"))
if( m_protonData->isColumnAvailable( "edep" ) )
{
if (m_propertyStatus->getVisualizationPropertyHandler()->getColorFromEdep()->get())
if( m_propertyStatus->getVisualizationPropertyHandler()->getColorFromEdep()->get() )
{
boost::shared_ptr< std::vector< unsigned char > > data = sampleTransferFunction();
boost::shared_ptr<std::vector<unsigned char> > data = sampleTransferFunction();
setTransferFunction(data);
setTransferFunction( data );
for (std::vector<float>::iterator currentEdep = edeps->begin();
for( std::vector< float >::iterator currentEdep = edeps->begin();
currentEdep != edeps->end();
currentEdep++)
currentEdep++ )
{
int clusterSize = 9.0 * ((2.4 * (pow(*currentEdep, 0.338))) / 4.0);
int clusterSize = 9.0 * ( ( 2.4 * ( pow( *currentEdep, 0.338 ) ) ) / 4.0 );
float r = data->at(clusterSize * 4) / 255.0;
float g = data->at(clusterSize * 4 + 1) / 255.0;
float b = data->at(clusterSize * 4 + 2) / 255.0;
float a = data->at(clusterSize * 4 + 3) / 255.0;
float r = data->at( clusterSize * 4 ) / 255.0;
float g = data->at( clusterSize * 4 + 1 ) / 255.0;
float b = data->at( clusterSize * 4 + 2 ) / 255.0;
float a = data->at( clusterSize * 4 + 3 ) / 255.0;
colorArray->push_back(r);
colorArray->push_back(g);
colorArray->push_back(b);
colorArray->push_back(a);
colorArray->push_back( r );
colorArray->push_back( g );
colorArray->push_back( b );
colorArray->push_back( a );
}
}
}
......
......@@ -47,7 +47,7 @@ void WMProtonData::setCSVHeader( WDataSetCSV::ContentSPtr csvHeader )
// TODO(robin.eschbach) change csvheader type to vector< string > or maybe to map
std::vector< std::string > header = m_csvHeader->at( 0 );
for( long unsigned int i = 0; i < header.size(); i++ )
for( size_t i = 0; i < header.size(); i++ )
{
m_columnMap[header[i]] = i;
}
......@@ -97,7 +97,7 @@ bool WMProtonData::isRequiredDataAvailable()
"posX", "posY", "posZ"
};
for( long unsigned int i = 0; i < sizeof( necessaryColumns ) / sizeof( std::string ); i++ )
for( size_t i = 0; i < sizeof( necessaryColumns ) / sizeof( std::string ); i++ )
{
std::string column = necessaryColumns[i];
if( getColumnIndex( column ) < 0 )
......@@ -115,7 +115,7 @@ bool WMProtonData::isNonrequiredDataAvailable()
"PDGEncoding", "edep", "trackID", "parentID", "eventID"
};
for( long unsigned int i = 0; i < sizeof( unNecessaryColumns ) / sizeof( std::string ); i++ )
for( size_t i = 0; i < sizeof( unNecessaryColumns ) / sizeof( std::string ); i++ )
{
std::string column = unNecessaryColumns[i];
if( getColumnIndex( column ) < 0 )
......@@ -139,7 +139,7 @@ void WMProtonData::updateAvailabilityOfColumns()
};
std::cout << std::endl;
for( long unsigned int i = 0; i < sizeof( necessaryColumns ) / sizeof( std::string ); i++ )
for( size_t i = 0; i < sizeof( necessaryColumns ) / sizeof( std::string ); i++ )
{
std::string column = necessaryColumns[i];
if( getColumnIndex( column ) < 0 )
......
......@@ -22,9 +22,9 @@
//
//---------------------------------------------------------------------------
#include <regex>
#include <string>
#include <vector>
#include <regex>
#include "WMFilterPropertyHandler.h"
......@@ -92,7 +92,7 @@ void WMFilterPropertyHandler::searchPDGTypes()
return;
}
for( auto idx = 0; idx < m_protonData->getCSVData()->size(); idx++)
for( size_t idx = 0; idx < m_protonData->getCSVData()->size(); idx++)
{
std::vector< std::string > row = m_protonData->getCSVData()->at( idx );
int currentParticleID = std::stoi( row.at( pdgColumnIndex ) );
......@@ -107,7 +107,7 @@ void WMFilterPropertyHandler::searchPDGTypes()
void WMFilterPropertyHandler::createMultiSelectionForPDG()
{
WPropertyBase::PropertyChangeNotifierType pdgEncodingnotifier = boost::bind(
&WMFilterPropertyHandler::updateSelectedPDGTypes, this, boost::placeholders::_1 );
&WMFilterPropertyHandler::updateSelectedPDGTypes, this );
boost::shared_ptr< WItemSelection > possibleSelection = WItemSelection::SPtr( new WItemSelection() );
......@@ -135,7 +135,7 @@ void WMFilterPropertyHandler::createMultiSelectionForPDG()
WPropertyHelper::PC_NOTEMPTY::addTo( m_multiSelection );
}
void WMFilterPropertyHandler::updateSelectedPDGTypes( WPropertyBase::SPtr property )
void WMFilterPropertyHandler::updateSelectedPDGTypes()
{
m_selectedPDGTypes.clear();
......@@ -143,7 +143,7 @@ void WMFilterPropertyHandler::updateSelectedPDGTypes( WPropertyBase::SPtr proper
{
WItemSelector selectedItems = m_multiSelection->get( true );
for( int i = 0; i < selectedItems.size(); ++i )
for( size_t i = 0; i < selectedItems.size(); ++i )
{
m_selectedPDGTypes.push_back( getPdgFromName( selectedItems.at( i )->getName() ) );
}
......@@ -154,7 +154,7 @@ void WMFilterPropertyHandler::updateSelectedPDGTypes( WPropertyBase::SPtr proper
bool WMFilterPropertyHandler::isPDGTypeSelected( int pdgType )
{
for( auto idx = 0; idx < m_selectedPDGTypes.size(); idx++ )
for( size_t idx = 0; idx < m_selectedPDGTypes.size(); idx++ )
{
if(pdgType == m_selectedPDGTypes[idx] )
{
......
......@@ -133,7 +133,7 @@ private:
/**
* update the m_selectedPDGTypes
*/
void updateSelectedPDGTypes( WPropertyBase::SPtr property );
void updateSelectedPDGTypes();
/**
* create the Checkbox for primaries and secondaries
......
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