Hello everyone,
is it possible to have something like a vector consisting of several TiXmlElements?
I am currently working on the TRestRawVetoAnalysisProcess and would like to define several veto groups in the rml-file like for example:
<vetoGroup name="top" signalIDs="1,2,3" />
<vetoGroup name="bottom" signalIDs="4,5,6" />
...
To read them from the file, I use something like
TiXmlElement* vetoGroup1 = GetElementWithName("vetoGroup", "top");
TiXmlElement* vetoGroup2 = GetElementWithName("vetoGroup", "bottom");
...
To read the parameters from the elements like here signalIDs
, I cannot use an iteration, but have to write a block with GetFieldValue...
for each TiXmlElement.
It would be better to have something like
vector<TiXmlElement> vetoGroup;
...
vetoGroup[0] = GetElementWithName("vetoGroup", "top");
...
Like this, it doesn’t work, but is there a way to get similar results?
It is not a critical issue, but it would improve the readability of the code and I could make it more “dynamic”.