31 std::vector<TString> vPaths;
37 TString nodePath = path + (path.IsNull() ?
"" :
"/") + pNode->GetName();
38 std::string nodeName{pNode->GetName()};
40 if (std::regex_search(nodeName, sMatch, component)) {
41 if (nodePath.Contains(detector, TString::kIgnoreCase)) {
42 vPaths.push_back(nodePath);
46 for (
int iNode = 0; iNode < pNode->GetNdaughters(); ++iNode) {
47 TGeoNode* pDaughter = pNode->GetDaughter(iNode);
48 auto daughterPaths =
CollectNodes(detector, component, nodePath, pDaughter);
49 vPaths.insert(vPaths.end(), daughterPaths.begin(), daughterPaths.end());
static std::vector< TString > CollectNodes(const TString &detector, const std::regex &component, const TString &path, TGeoNode *pNode)
Collects paths of the components.
static std::vector< TString > CollectNodes(const TString &detector, const std::regex &component, const TString &path, TGeoNode *pNode)
Collects paths of the components.