Commit 6a324226 authored by Nick Draper's avatar Nick Draper
Browse files

clang formatting

parent c67a6f25
......@@ -44,7 +44,7 @@ class MANTID_API_DLL LogManager {
public:
// Gets the correct log name for the matching invalid values log for a given
// log name
static std::string getInvalidValuesFilterLogName(const std::string& logName);
static std::string getInvalidValuesFilterLogName(const std::string &logName);
LogManager();
LogManager(const LogManager &other);
......@@ -189,12 +189,12 @@ public:
void clearLogs();
// returns true if the log has a matching invalid values log filter
bool hasInvalidValuesFilter(const std::string& logName) const;
bool hasInvalidValuesFilter(const std::string &logName) const;
// returns the invalid values log if the log has a matching invalid values log
// filter
Kernel::TimeSeriesProperty<bool> *
getInvalidValuesFilter(const std::string& logName) const;
getInvalidValuesFilter(const std::string &logName) const;
bool operator==(const LogManager &other) const;
bool operator!=(const LogManager &other) const;
......
......@@ -555,19 +555,19 @@ void LogManager::clearLogs() { m_manager->clear(); }
/// Gets the correct log name for the matching invalid values log for a given
/// log name
std::string
LogManager::getInvalidValuesFilterLogName(const std::string& logName) {
LogManager::getInvalidValuesFilterLogName(const std::string &logName) {
return PropertyManager::getInvalidValuesFilterLogName(logName);
}
/// returns true if the log has a matching invalid values log filter
bool LogManager::hasInvalidValuesFilter(const std::string& logName) const {
bool LogManager::hasInvalidValuesFilter(const std::string &logName) const {
return hasProperty(getInvalidValuesFilterLogName(logName));
}
/// returns the invalid values log if the log has a matching invalid values log
/// filter
Kernel::TimeSeriesProperty<bool> *
LogManager::getInvalidValuesFilter(const std::string& logName) const {
LogManager::getInvalidValuesFilter(const std::string &logName) const {
try {
auto log = getLogData(getInvalidValuesFilterLogName(logName));
if (auto tsp = dynamic_cast<TimeSeriesProperty<bool> *>(log)) {
......
......@@ -293,10 +293,8 @@ std::unique_ptr<Kernel::Property> createTimeSeries(::NeXus::File &file,
* @returns A pointer to a new property containing the time series filter or
* null
*/
std::unique_ptr<Kernel::Property>
createTimeSeriesValidityFilter(::NeXus::File &file,
const Kernel::Property &prop,
Kernel::Logger &log) {
std::unique_ptr<Kernel::Property> createTimeSeriesValidityFilter(
::NeXus::File &file, const Kernel::Property &prop, Kernel::Logger &log) {
const auto tsProp = dynamic_cast<const Kernel::ITimeSeriesProperty *>(&prop);
const auto times = tsProp->timesAsVector();
std::vector<int> values;
......@@ -347,7 +345,8 @@ createTimeSeriesValidityFilter(::NeXus::File &file,
}
if (invalidDataFound) {
log.warning() << "Some \"" << prop.name() << "\" log data is invalid!\n";
const auto tspName = API::LogManager::getInvalidValuesFilterLogName(prop.name());
const auto tspName =
API::LogManager::getInvalidValuesFilterLogName(prop.name());
auto tsp = std::make_unique<TimeSeriesProperty<bool>>(tspName);
tsp->create(times, boolValues);
log.debug() << " done reading \"value_valid\" array\n";
......
......@@ -44,10 +44,10 @@ public:
static const std::string INVALID_VALUES_SUFFIX;
// Gets the correct log name for the matching invalid values log for a given
// log name
static std::string getInvalidValuesFilterLogName(const std::string& logName);
static std::string getInvalidValuesFilterLogName(const std::string &logName);
static std::string
getLogNameFromInvalidValuesFilter(const std::string& logName);
static bool isAnInvalidValuesFilterLog(const std::string& logName);
getLogNameFromInvalidValuesFilter(const std::string &logName);
static bool isAnInvalidValuesFilterLog(const std::string &logName);
PropertyManager();
PropertyManager(const PropertyManager &);
......
......@@ -41,11 +41,11 @@ const std::string PropertyManager::INVALID_VALUES_SUFFIX = "_invalid_values";
/// Gets the correct log name for the matching invalid values log for a given
/// log name
std::string
PropertyManager::getInvalidValuesFilterLogName(const std::string& logName) {
PropertyManager::getInvalidValuesFilterLogName(const std::string &logName) {
return logName + PropertyManager::INVALID_VALUES_SUFFIX;
}
std::string
PropertyManager::getLogNameFromInvalidValuesFilter(const std::string& logName) {
PropertyManager::getLogNameFromInvalidValuesFilter(const std::string &logName) {
std::string retVal = "";
if (PropertyManager::isAnInvalidValuesFilterLog(logName)) {
retVal = logName.substr(
......@@ -53,7 +53,7 @@ PropertyManager::getLogNameFromInvalidValuesFilter(const std::string& logName) {
}
return retVal;
}
bool PropertyManager::isAnInvalidValuesFilterLog(const std::string& logName) {
bool PropertyManager::isAnInvalidValuesFilterLog(const std::string &logName) {
const auto fullString = logName;
const auto ending = PropertyManager::INVALID_VALUES_SUFFIX;
if (fullString.length() >= ending.length()) {
......@@ -220,8 +220,7 @@ void PropertyManager::filterByProperty(
if (this->existsProperty(PropertyManager::getInvalidValuesFilterLogName(
currentProp->name()))) {
// add the filter to the passed in filters
auto logFilter =
std::make_unique<LogFilter>(filter);
auto logFilter = std::make_unique<LogFilter>(filter);
auto filterProp =
getPointerToProperty(PropertyManager::getInvalidValuesFilterLogName(
currentProp->name()));
......
Supports Markdown
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