GeoModelXml improvements: remove the automatic insertion of NameTags and Identifiers, expand Examples.
This MR removes the automatic insertion of NameTag and Identifier GeoModel nodes when processing <logvol>
XML entities in GeoModelXml.
Now, NameTags and Identifiers are inserted only when requested; i.e., when the relevant, optional flags are specified in the corresponding XML entity.
It also fixes a crash on hardcoded position of PV, by commenting call to the not-used addAlignable
function (at the moment, it only prints log msgs).
Merge request reports
Activity
added CMake configuration GeoModelExamples GeoModelTools labels
enabled an automatic merge when the pipeline for b3bd7f03 succeeds
mentioned in commit 05fc4d75
mentioned in issue #43
mentioned in merge request !155 (merged)
169 237 gmxUtil.positionIndex.setCopyNo(m_map[name].id++); 170 238 gmxUtil.positionIndex.indices(index, gmxUtil.eval); 171 239 sensId = gmxUtil.gmxInterface()->sensorId(index); 172 // toAdd.push_back(new GeoIdentifierTag(m_map[name].id)); // Normal copy number 173 toAdd.push_back(new GeoIdentifierTag(sensId)); 240 if(hasIdentifier) { //TODO: check if all "sensitive" volumes must have an identifier. If that's the case, then we can remove this "if" here Thanks, @nstyles ! So, I think we can remove the "if" there and make all sensitive volumes have an identifier
58 64 // 59 65 if (alignable) { 60 66 int level; 61 alignable_tmp = XMLString::transcode("alignable"); 67 alignable_tmp = XMLString::transcode("alignable"); 62 68 istringstream(XMLString::transcode(element->getAttribute(alignable_tmp))) >> level; 63 69 map<string, int> index; 64 70 gmxUtil.positionIndex.incrementLevel(); // Logvol has unfortunately already decremented this; temp. restore it 65 71 gmxUtil.positionIndex.indices(index, gmxUtil.eval); 66 // ****** Using "[2]" is an ugly way to reach the PV. Define const int in LogvolProcessor? 67 gmxUtil.gmxInterface()->addAlignable(level, index, (GeoVFullPhysVol *) objectsToAdd[2], 68 (GeoAlignableTransform *) toAdd.back()); 72 73 // the call to addAlignable below only prints log messages, it is not very useful at the moment. Hi @rbianchi - I see this was commented as "useless" as it only prints a message - however this is only the case for the base GmxInterface class. For the derived classes in Athena it does do something, see here for example:
Now without this call the AlignableTransforms will not get added, which is important as we are currently trying to get alignment for the ITk working in the master branch of Athena.
Ah! I see now its use. I must admit, I didn't check the use of that on the Athena side. Thanks for letting me know about that, @nstyles
mentioned in issue #53