Commit 86747f1a authored by Jens Kroeger's avatar Jens Kroeger
Browse files

EventLoaderEUDAQ2: implemented lower_case transformation of detector and plane...

EventLoaderEUDAQ2: implemented lower_case transformation of detector and plane name before string comparison
parent ca1d5d06
......@@ -187,8 +187,12 @@ void EventLoaderEUDAQ2::store_data(std::shared_ptr<Clipboard> clipboard, std::sh
// Concatenate plane name according to naming convention: sensor_type + "_" + int
auto plane_name = plane.Sensor() + "_" + std::to_string(i_plane);
if(m_detector->name() != plane_name) {
LOG(DEBUG) << "Wrong plane: " << m_detector->name() << "!=" << plane_name << ". Continue.";
auto detector_name = m_detector->name();
// Convert to lower case before string comparison to avoid spelling errors by the user:
std::transform(plane_name.begin(), plane_name.end(), plane_name.begin(), ::tolower);
std::transform(detector_name.begin(), detector_name.end(), detector_name.begin(), ::tolower);
if(detector_name != plane_name) {
LOG(DEBUG) << "Wrong plane: " << detector_name << "!=" << plane_name << ". Continue.";
continue;
}
......
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