Skip to content
Snippets Groups Projects
Commit 4b27c857 authored by Andre Sailer's avatar Andre Sailer
Browse files

Geant4RegexSensitivesConstruction: use regex_search so we do not have to fully match volume paths.

Speeds up by 50 percent the construction in fiber dual readout calorimeter with 580k volumes (108 s down to 68 s on my machine)
parent 0c668ca1
No related branches found
No related tags found
No related merge requests found
......@@ -104,7 +104,7 @@ Geant4RegexSensitivesConstruction::collect_volumes(std::set<Volume>& volumes,
if( !path.empty() ) {
for( const auto& match : matches ) {
std::smatch sm;
bool stat = std::regex_match(path, sm, match);
bool stat = std::regex_search(path, sm, match);
if( stat ) {
volumes.insert(pv.volume());
++count;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment