Migration to root 6¶
- Table of contents
- Migration to root 6
- Release Candidates rc4, rc5, and rc6
- Release Candidates rc1, rc2, and rc3
- Known issues and changes
- Migration tools
- Problems not yet resolved
Release Candidates rc4, rc5, and rc6¶
- Release candidate v06_00_00_rc4 builds on the previous candidates, but moves ahead to art 2.00.02
- A memory leak was identified and fixed in root 6. rc5 and rc6 use art 2.00.03
- Because this release candidate has more refactoring, it is on the v06_00_00_art2 branch.
- Changes are provided for the the experiment code, but users may need to run UpdateToLArSoftObj.sh
v06_00_00_rc5 is in sync with larsoft v05_13_00¶
Guide to new products¶
Several products have been split into separate parts. The new products make a suite, larsoftobj, that does not depend on art.
|art 1.xx||art 2.xx||notes|
|art||art, canvas||Release Notes 2.00.02|
|nutools||nutools, nusimdata||nusimdata contains SimulationBase|
|larcore||larcore, larcoreobj||larcoreobj contains SimpleTypesAndConstants and SummaryData|
|lardata||lardata, lardataobj||lardataobj contains AnalysisBase, MCBase, OpticalDetectorData, RawData, RecoBase, and part of Utilities|
|larsim||larsim, larsimobj||larsimobj contains part of Simulation|
Release Candidates rc1, rc2, and rc3¶Code for building with root 6 and art v1_18_05 will be found in the v06_00_00_rc branch of the following repositories. Release candidate tags will only be made for the larsoft repositories.
v06_00_00_rc3 is in sync with larsoft v05_11_01¶
v06_00_00_rc2 is in sync with larsoft v05_10_00¶
v06_00_00_rc1 is in sync with larsoft v05_08_00¶
Known issues and changes¶
gdml breaking change¶
- Root 6 does not parse mathematical expressions in GDML (!??)
- These were used throughout the GDML fles used by the experiments
- Root 6 silently ignores mathematical expressions and just takes the first number it encounters, resulting in some odd geometry definitions.
- Complaints about illegal geometry most likely mean that an expression was not translated.
- Have corrected those in core LArSoft packages and experiment repositories
- but NOT for lar1ndcode
- Perl scripts that generate gdml have not been corrected
- Experiments should fix their own scripts
- scripts which are no longer used should be removed
- The correct units are g/cm3, not g/cc
- root 5 allowed g/cc, but root 6 does not
- The gdml files were fixed with an editor prior to removing expressions
- Fast cloning will not work when reading certain products in root 5 input files. Since it is difficult to diagnose this problem, we recommend turning off fast cloning when reading pre root 6 files. If you see an error similar to the one below, you need to add "fastCloning: false" to the output module configuration in the relevant FHiCL file(s). See Facilitating Schema Evolution for Data Products
%MSG-s ArtException: PostOpenFile 12-May-2016 12:55:49 CDT BeforeEvents cet::exception caught in art ---- FatalRootError BEGIN Fatal Root Error: @SUB=TTreeCloner::CollectBranches One of the export sub-branches (simb::GTruths_generator__GenieGen.obj.fFShadSystP4) is not present in the import TTree. cet::exception caught in EventProcessor and rethrown ---- FatalRootError END %MSG
- Root 6 needs to find all classes and enums defined by included headers at runtime. This is handled by defining ROOT_INCLUDE_PATH.
- cetbuildtools v4_19_04 or later is required.
- For the time being, larcore sets ROOT_INCLUDE_PATH to include art, fhicl, cetlib, and boost.
- Root 6 recognizes enums as explicit types. This means that they must be included in the dictionaries.
- This error message most likely means that an enum has not been specified.
---- DictionaryNotFound BEGIN No dictionary found for the following classes: geo::_plane_sigtype Most likely they were never generated, but it may be that they were generated in the wrong package. Please add (or move) the specification <class name="MyClassName"/> to the appropriate classes_def.xml file. If the class is a template instance, you may need to define a dummy variable of this type in classes.h. Also, if this class has any transient members, you need to specify them in classes_def.xml. ---- DictionaryNotFound END
- Add the line to the appropriate dictionary:
<enum name="geo::_plane_sigtype" />
- For art::Assns, the dictionary must include BOTH art::Assns of a, b AND art::Assns of b, a.
- Unfortunately, this problem is not spotted during dictionary generation and will result in a segfault.
- There will be a fix in art 1.19.00 to report the error as early as possible.
- We must make sure that both definitions are included in the xml files.
- see check_dictionaries.sh in the tools section
With root 6, it is no longer necessary to include template instantiations in classes.h.
The templates are instantiated when they are used.
Removing all template instantiations from the classes.h files results in much faster loading of root dictionaries.
TFormula discovered integral math¶
ROOT 6 implementation of
TFormula performs integral math evaluation in a fashion more similar to the C language. For example,
"1/2" evaluates to
"1./2." evaluates to
ROOT 5 used to convert all operands to floating point and then perform floating point math: both
"1./2." did evaluate to
TFormula is internally used in many ROOT classes (e.g.
TF1, etc.). All the instances should be checked to make sure that they yield the expected result.
This new feature has been reported as JIRA issue 8110, but no official response has been produced yet. For what we know so far, ROOT 6's one might be either a buggy behaviour that will be fixed and disappear, or the new official behaviour of
TFormula bug on missing parameter in expression¶
See JIRA issue 8182.
In short, if your expression omits a parameter, parameters gets assigned as if you hadn't. This means that some parameters are assigned values that some others should have been assigned.
|wrong formula||interpreted as||bad effects|
|@SetParameter(5, 5.) has no effect (there is no parameter 5)|
This script is in larsoft. RemoveMathFromGDML.py uses root 5 to translate expressions and must be run with root 5.34.32. You must setup an appropriate larsoft v05_xx_yy release.
setup larsoft v05_09_00 or later cd to the gdml directory RemoveMathFromGDML.py *.gdml the original gdml files will be named xxx.gdml.bak
verification of RemoveMathFromGDML.py¶
- The redmine project parsegdml uses root 5 to read a gdml file and export the parsed file.
- xxx.gdml is exported as xxx_reparsed.gdml
- note that xxx_reparsed.gdml is not very readable
- Verification process
- Run parsegdml on the gdml files in develop and in the v06_00_00_rc branch
- compare the output of parsegdml
- larcore/larcore/Geometry/gdml - OK
- dunetpc/dune/Geometry/gdml - OK
- lariatsoft/Geo/gdml - OK
- uboonecode/uboone/Geometry/gdml - OK
USAGE: check_dictionaries.sh [-h] <directory> -h (this help) look for classes_def.xml under the specified directory If no directory is specified, search this directory
- TFormula gaus is now gaus(x), where the default value of x is 0.
- Root 6 is meant to be backwards compatible and translate all existing calls to "gaus" to "gaus(0)".
- However, there is a bug: https://sft.its.cern.ch/jira/browse/ROOT-8105
- We believe we have translated all calls in the fcl files, but the script is available if needed.
- Some libraries and headers have been moved from larcore to larcoreobj, lardata to lardataobj, and from larsim to larsimobj.
- This script also makes changes needed by the move to nutools 2 and art 2.
All known problems are resolved.