Opened 10 years ago
Closed 10 years ago
#11 closed defect (fixed)
The last key value pair in the ceres.rc is not be taken into account when it is the last line of the fiel
Reported by: | smueller | Owned by: | Sebastian |
---|---|---|---|
Priority: | blocker | Milestone: | milestone: |
Component: | component1 | Version: | |
Keywords: | Cc: |
Description
In Mars v18002 the Menv class which parses the config file like e.g. ceres.rc does ignore the last command/key value pair completely when it is the last line of the config text file.
This was found while adding an additional key value pair to ceres.rc which was not recognized.
I checked in the CERN Root c-interpreter launched in the Mars directory:
MEnv env("ceres.rc");
This instantiates a Menv Class called env which parses the config text file ceres.rc.
env.Print()
Here I use the build in printing to show all the key value pairs which have been found.
It is not only not present in the env.Print() but really not in the class during runtime.
It turns out:
WHEN THE LAST COMMAND IN THE CONFIG FILE IS WRITTEN IN THE LAST LINE OF THE FILE IT IS IGNORED!!!
In the ceres.rc for the trunk version v18002 this means, that we ignore the final cut
233 >> # Does not trigger anyway
234 >> ContEmpty3.Condition: MPhotonEvent.GetNumPhotons<10
Maybe this also happens in the other .rc files. Not tested yet
A simple solution to this bug is to add an additional line to the text file.
r18018 solves this ticket, I believe.
Might need some beautifying in the future, but for the moment it at least makes sure nobody assumes a line is parsed, that is actually ignored.