From 50b244271a4f519d57667fea9a42ab2ed53590bd Mon Sep 17 00:00:00 2001 From: Markus Frank <Markus.Frank@cern.ch> Date: Fri, 31 Jan 2020 18:10:51 +0100 Subject: [PATCH] Remove DTD links from lcdd xml files. Add STD conditions checks for STP and NTP --- DDAlign/src/plugins/GlobalAlignmentParser.cpp | 4 ++ DDCore/src/plugins/Compact2Objects.cpp | 4 +- DDCore/src/plugins/StandardPlugins.cpp | 4 +- examples/AlignDet/compact/AlephTPC.xml | 4 +- examples/AlignDet/compact/Telescope.xml | 4 +- examples/AlignDet/compact/compact.xml | 4 +- examples/ClientTests/CMakeLists.txt | 20 ++++++- examples/ClientTests/compact/Assemblies.xml | 4 +- .../compact/Bitfield_SidesTest.xml | 4 +- .../compact/Bitfield_SidesTest2.xml | 4 +- examples/ClientTests/compact/BoxTrafos.xml | 4 +- .../compact/CaloEndcapReflection.xml | 4 +- examples/ClientTests/compact/CheckShape.xml | 6 +- examples/ClientTests/compact/Check_Air.xml | 5 +- .../ClientTests/compact/Check_Air_NTP.xml | 58 +++++++++++++++++++ .../ClientTests/compact/Check_Air_STP.xml | 58 +++++++++++++++++++ .../ClientTests/compact/Check_Handles.xml | 4 +- .../ClientTests/compact/DuplicateSysID.xml | 4 +- .../ClientTests/compact/FCC_HcalBarrel.xml | 4 +- .../ClientTests/compact/InhibitConstants.xml | 4 +- examples/ClientTests/compact/IronCylinder.xml | 4 +- examples/ClientTests/compact/LheD_tracker.xml | 4 +- examples/ClientTests/compact/MagnetFields.xml | 4 +- .../ClientTests/compact/MaterialTester.xml | 4 +- examples/ClientTests/compact/MiniTel.xml | 4 +- examples/ClientTests/compact/MiniTel_json.xml | 4 +- .../ClientTests/compact/MultiCollections.xml | 4 +- .../compact/MultiSegmentCollections.xml | 4 +- .../compact/MultiSegmentations.xml | 4 +- .../compact/NamespaceConstants.xml | 4 +- .../ClientTests/compact/NestedDetectors.xml | 4 +- examples/ClientTests/compact/NestedSimple.xml | 4 +- .../compact/SectorBarrelCalorimeter.xml | 4 +- .../SiBarrelMultiSensitiveDetector.xml | 4 +- .../SiBarrelMultiSensitiveLongVolID.xml | 4 +- examples/ClientTests/compact/SiliconBlock.xml | 4 +- .../ClientTests/compact/TrackingRegion.xml | 4 +- examples/ClientTests/compact/WorldVolume.xml | 4 +- .../src/ConditionExampleObjects.cpp | 4 +- examples/OpticalSurfaces/compact/OpNovice.xml | 4 +- .../OpticalSurfaces/compact/OpNovice_gdml.xml | 4 +- .../compact/ReadGDMLMatrices.xml | 4 +- .../compact/ReadMaterialProperties.xml | 4 +- .../compact/ReadOpticalSurfaces.xml | 4 +- 44 files changed, 183 insertions(+), 120 deletions(-) create mode 100644 examples/ClientTests/compact/Check_Air_NTP.xml create mode 100644 examples/ClientTests/compact/Check_Air_STP.xml diff --git a/DDAlign/src/plugins/GlobalAlignmentParser.cpp b/DDAlign/src/plugins/GlobalAlignmentParser.cpp index 60d273169..69455fbe4 100644 --- a/DDAlign/src/plugins/GlobalAlignmentParser.cpp +++ b/DDAlign/src/plugins/GlobalAlignmentParser.cpp @@ -58,6 +58,8 @@ using namespace std; using namespace dd4hep; using namespace dd4hep::align; +static long setup_Alignment(Detector& description, const xml_h& e); + /** Convert to enable/disable debugging. * * @author M.Frank @@ -196,6 +198,8 @@ template <> void Converter<include_file>::operator()(xml_h element) const { string tag = node.tag(); if ( tag == "alignment" ) Converter<alignment>(description,param,optional)(node); + else if ( tag == "global_alignment" ) + setup_Alignment(description, node); else if ( tag == "detelement" ) Converter<detelement>(description,param,optional)(node); else if ( tag == "subdetectors" || tag == "detelements" ) diff --git a/DDCore/src/plugins/Compact2Objects.cpp b/DDCore/src/plugins/Compact2Objects.cpp index 51060e6c2..4cc038079 100644 --- a/DDCore/src/plugins/Compact2Objects.cpp +++ b/DDCore/src/plugins/Compact2Objects.cpp @@ -480,8 +480,8 @@ template <> void Converter<Material>::operator()(xml_h e) const { mat->SetTemperature(temp_val); mat->SetPressure(pressure_val); printout(s_debug.materials ? ALWAYS : DEBUG, "Compact", - "++ Converting material %-16s Density: %9.7g Temperature:%9.7g Pressure:%9.7g.", - matname, dens_val, temp_val, pressure_val); + "++ Converting material %-16s Density: %9.7g Temperature:%9.7g [K] Pressure:%9.7g [hPa].", + matname, dens_val, temp_val/dd4hep::kelvin, pressure_val/dd4hep::pascal/100.0); mix->SetRadLen(0e0); #if ROOT_VERSION_CODE >= ROOT_VERSION(6,12,0) diff --git a/DDCore/src/plugins/StandardPlugins.cpp b/DDCore/src/plugins/StandardPlugins.cpp index 62e135789..7e760629f 100644 --- a/DDCore/src/plugins/StandardPlugins.cpp +++ b/DDCore/src/plugins/StandardPlugins.cpp @@ -512,8 +512,8 @@ static long root_materials(Detector& description, int argc, char** argv) { ::printf(" Aeff=%7.3f Zeff=%7.4f rho=%8.3f [g/mole] radlen=%8.3g [cm] intlen=%8.3g [cm] index=%3d\n", mat->GetA(), mat->GetZ(), mat->GetDensity(), mat->GetRadLen(), mat->GetIntLen(), mat->GetIndex()); - ::printf(" Temp=%.3g [Kelvin] Pressure=%.5g [pascal] state=%s\n", - mat->GetTemperature(), mat->GetPressure(), st); + ::printf(" Temp=%.3g [Kelvin] Pressure=%.5g [hPa] state=%s\n", + mat->GetTemperature(), mat->GetPressure()/dd4hep::pascal/100.0, st); return elt_h(0); } virtual void print(elt_h, TGeoElement* elt, double frac) { diff --git a/examples/AlignDet/compact/AlephTPC.xml b/examples/AlignDet/compact/AlephTPC.xml index a1eca27c2..06f003855 100644 --- a/examples/AlignDet/compact/AlephTPC.xml +++ b/examples/AlignDet/compact/AlephTPC.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="Alignment_aleph_tpc" title="Alignment test detector with ALPEH TPC like sectors" diff --git a/examples/AlignDet/compact/Telescope.xml b/examples/AlignDet/compact/Telescope.xml index f9940f03a..9cfc06104 100644 --- a/examples/AlignDet/compact/Telescope.xml +++ b/examples/AlignDet/compact/Telescope.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="TelescopeSensor" title="Simple emulation of the EU Telescope" diff --git a/examples/AlignDet/compact/compact.xml b/examples/AlignDet/compact/compact.xml index 60009b3a3..8d3ab2c69 100644 --- a/examples/AlignDet/compact/compact.xml +++ b/examples/AlignDet/compact/compact.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="alignment_boxes" title="Alignment test with 2 simple boxes" diff --git a/examples/ClientTests/CMakeLists.txt b/examples/ClientTests/CMakeLists.txt index 98348f4c7..ad85a0ce4 100644 --- a/examples/ClientTests/CMakeLists.txt +++ b/examples/ClientTests/CMakeLists.txt @@ -214,7 +214,25 @@ dd4hep_add_test_reg( ClientTests_Check_Temp_Pressure_Air EXEC_ARGS geoPluginRun -destroy -input file:${ClientTestsEx_INSTALL}/compact/Check_Air.xml -plugin DD4hep_MaterialTable -name Vacuum - REGEX_PASS "Temp=111 \\[Kelvin\\] Pressure=6.2415e-07 \\[pascal\\] state=Undefined" + REGEX_PASS "Temp=111 \\[Kelvin\\] Pressure=1e-12 \\[hPa\\] state=Undefined" + REGEX_FAIL "Exception;EXCEPTION;ERROR;Error;FATAL" ) +# +# Test Setting temperature and pressure to material +dd4hep_add_test_reg( ClientTests_Check_Temp_Pressure_Air_NTP + COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" + EXEC_ARGS geoPluginRun + -destroy -input file:${ClientTestsEx_INSTALL}/compact/Check_Air_NTP.xml + -plugin DD4hep_MaterialTable -name Vacuum + REGEX_PASS "Temp=293 \\[Kelvin\\] Pressure=1013.2 \\[hPa\\] state=Undefined" + REGEX_FAIL "Exception;EXCEPTION;ERROR;Error;FATAL" ) +# +# Test Setting temperature and pressure to material +dd4hep_add_test_reg( ClientTests_Check_Temp_Pressure_Air_STP + COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" + EXEC_ARGS geoPluginRun + -destroy -input file:${ClientTestsEx_INSTALL}/compact/Check_Air_STP.xml + -plugin DD4hep_MaterialTable -name Vacuum + REGEX_PASS "Temp=273 \\[Kelvin\\] Pressure=1000 \\[hPa\\] state=Undefined" REGEX_FAIL "Exception;EXCEPTION;ERROR;Error;FATAL" ) # # only if root version > 6.19: MaterialTester diff --git a/examples/ClientTests/compact/Assemblies.xml b/examples/ClientTests/compact/Assemblies.xml index 1299e8105..322901dcd 100644 --- a/examples/ClientTests/compact/Assemblies.xml +++ b/examples/ClientTests/compact/Assemblies.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <!-- #========================================================================== # AIDA Detector description implementation #========================================================================== diff --git a/examples/ClientTests/compact/Bitfield_SidesTest.xml b/examples/ClientTests/compact/Bitfield_SidesTest.xml index 8b4ab35a4..d9a0881b0 100644 --- a/examples/ClientTests/compact/Bitfield_SidesTest.xml +++ b/examples/ClientTests/compact/Bitfield_SidesTest.xml @@ -1,7 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <!-- #========================================================================== # AIDA Detector description implementation diff --git a/examples/ClientTests/compact/Bitfield_SidesTest2.xml b/examples/ClientTests/compact/Bitfield_SidesTest2.xml index 596350421..083c6af28 100644 --- a/examples/ClientTests/compact/Bitfield_SidesTest2.xml +++ b/examples/ClientTests/compact/Bitfield_SidesTest2.xml @@ -1,7 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <!-- #========================================================================== # AIDA Detector description implementation diff --git a/examples/ClientTests/compact/BoxTrafos.xml b/examples/ClientTests/compact/BoxTrafos.xml index 2f49744a6..b74063966 100644 --- a/examples/ClientTests/compact/BoxTrafos.xml +++ b/examples/ClientTests/compact/BoxTrafos.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <!-- #========================================================================== # AIDA Detector description implementation diff --git a/examples/ClientTests/compact/CaloEndcapReflection.xml b/examples/ClientTests/compact/CaloEndcapReflection.xml index 547f2d53d..a0be06938 100644 --- a/examples/ClientTests/compact/CaloEndcapReflection.xml +++ b/examples/ClientTests/compact/CaloEndcapReflection.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="clic_sid_cdr" title="CLIC Silicon Detector CDR" diff --git a/examples/ClientTests/compact/CheckShape.xml b/examples/ClientTests/compact/CheckShape.xml index 89176c114..c15280102 100644 --- a/examples/ClientTests/compact/CheckShape.xml +++ b/examples/ClientTests/compact/CheckShape.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name= "ShapeCheck" title= "Checking individual shapes in D4hep by comparing the mesh vertices" @@ -10,7 +8,7 @@ version="1.0"> <comment>Shape tester</comment> </info> - <steer open="false" close="false"/> + <geometry open="false" close="false"/> <includes> <gdmlFile ref="${DD4hepINSTALL}/DDDetectors/compact/elements.xml"/> diff --git a/examples/ClientTests/compact/Check_Air.xml b/examples/ClientTests/compact/Check_Air.xml index 9da3504f1..1a32e3fe4 100644 --- a/examples/ClientTests/compact/Check_Air.xml +++ b/examples/ClientTests/compact/Check_Air.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name= "ShapeCheck" title= "Checking individual shapes in D4hep by comparing the mesh vertices" @@ -10,7 +8,6 @@ version="1.0"> <comment>Shape tester</comment> </info> - <steer open="false" close="false"/> <debug> <type name="materials" value="1"/> diff --git a/examples/ClientTests/compact/Check_Air_NTP.xml b/examples/ClientTests/compact/Check_Air_NTP.xml new file mode 100644 index 000000000..3c324f0fd --- /dev/null +++ b/examples/ClientTests/compact/Check_Air_NTP.xml @@ -0,0 +1,58 @@ +<lccdd> + + <info name= "ShapeCheck" + title= "Checking individual shapes in D4hep by comparing the mesh vertices" + author= "Markus Frank" + url= "http://www.cern.ch/lhcb" + status= "development" + version="1.0"> + <comment>Shape tester</comment> + </info> + + <debug> + <type name="materials" value="1"/> + </debug> + + <includes> + <gdmlFile ref="${DD4hepINSTALL}/DDDetectors/compact/elements.xml"/> + </includes> + + <define> + <constant name="world_side" value="300*cm"/> + <constant name="world_x" value="world_side"/> + <constant name="world_y" value="world_side"/> + <constant name="world_z" value="world_side"/> + </define> + + <std_conditions type="NTP"/> + + <display> + <vis name="Box_vis" alpha="1.0" r="1" g="0" b="0" showDaughters="true" visible="true"/> + </display> + + <materials> + <material name="Air"> + <D type="density" unit="g/cm3" value="0.001214"/> + <fraction n="0.7494" ref="N"/> + <fraction n="0.2369" ref="O"/> + <fraction n="0.0129" ref="Ar"/> + <fraction n="0.0008" ref="H"/> + </material> + + <!-- We model vakuum just as very thin air --> + <material name="Vacuum"> + <D type="density" unit="g/cm3" value="0.0000000001" /> + <composite n="1" ref="Air"/> + </material> + </materials> + + <detectors> + <detector id="3" name="B1" type="DD4hep_BoxSegment" vis="Box_vis"> + <comment>Vertical box</comment> + <material name="Vacuum"/> + <box x="10" y="20" z="30"/> + <position x="-10" y="30" z="10"/> + <rotation x="0" y="0" z="0"/> + </detector> + </detectors> +</lccdd> diff --git a/examples/ClientTests/compact/Check_Air_STP.xml b/examples/ClientTests/compact/Check_Air_STP.xml new file mode 100644 index 000000000..df04fd988 --- /dev/null +++ b/examples/ClientTests/compact/Check_Air_STP.xml @@ -0,0 +1,58 @@ +<lccdd> + + <info name= "ShapeCheck" + title= "Checking individual shapes in D4hep by comparing the mesh vertices" + author= "Markus Frank" + url= "http://www.cern.ch/lhcb" + status= "development" + version="1.0"> + <comment>Shape tester</comment> + </info> + + <debug> + <type name="materials" value="1"/> + </debug> + + <includes> + <gdmlFile ref="${DD4hepINSTALL}/DDDetectors/compact/elements.xml"/> + </includes> + + <define> + <constant name="world_side" value="300*cm"/> + <constant name="world_x" value="world_side"/> + <constant name="world_y" value="world_side"/> + <constant name="world_z" value="world_side"/> + </define> + + <std_conditions type="STP"/> + + <display> + <vis name="Box_vis" alpha="1.0" r="1" g="0" b="0" showDaughters="true" visible="true"/> + </display> + + <materials> + <material name="Air"> + <D type="density" unit="g/cm3" value="0.001214"/> + <fraction n="0.7494" ref="N"/> + <fraction n="0.2369" ref="O"/> + <fraction n="0.0129" ref="Ar"/> + <fraction n="0.0008" ref="H"/> + </material> + + <!-- We model vakuum just as very thin air --> + <material name="Vacuum"> + <D type="density" unit="g/cm3" value="0.0000000001" /> + <composite n="1" ref="Air"/> + </material> + </materials> + + <detectors> + <detector id="3" name="B1" type="DD4hep_BoxSegment" vis="Box_vis"> + <comment>Vertical box</comment> + <material name="Vacuum"/> + <box x="10" y="20" z="30"/> + <position x="-10" y="30" z="10"/> + <rotation x="0" y="0" z="0"/> + </detector> + </detectors> +</lccdd> diff --git a/examples/ClientTests/compact/Check_Handles.xml b/examples/ClientTests/compact/Check_Handles.xml index 9330e47ce..10f03b8d2 100644 --- a/examples/ClientTests/compact/Check_Handles.xml +++ b/examples/ClientTests/compact/Check_Handles.xml @@ -1,7 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <!-- #========================================================================== # AIDA Detector description implementation diff --git a/examples/ClientTests/compact/DuplicateSysID.xml b/examples/ClientTests/compact/DuplicateSysID.xml index f8cf0d599..3874f9496 100644 --- a/examples/ClientTests/compact/DuplicateSysID.xml +++ b/examples/ClientTests/compact/DuplicateSysID.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="alignment_boxes" title="Alignment test with 2 simple boxes" diff --git a/examples/ClientTests/compact/FCC_HcalBarrel.xml b/examples/ClientTests/compact/FCC_HcalBarrel.xml index 4ba1d4314..b49ff6557 100644 --- a/examples/ClientTests/compact/FCC_HcalBarrel.xml +++ b/examples/ClientTests/compact/FCC_HcalBarrel.xml @@ -1,7 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <includes> <gdmlFile ref="${DD4hepINSTALL}/DDDetectors/compact/elements.xml"/> diff --git a/examples/ClientTests/compact/InhibitConstants.xml b/examples/ClientTests/compact/InhibitConstants.xml index 2db33f3c2..4f7b88b5d 100644 --- a/examples/ClientTests/compact/InhibitConstants.xml +++ b/examples/ClientTests/compact/InhibitConstants.xml @@ -1,7 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <define> <constant name="Detector_InhibitConstants" value="1"/>; diff --git a/examples/ClientTests/compact/IronCylinder.xml b/examples/ClientTests/compact/IronCylinder.xml index 5d87b2c79..660406293 100644 --- a/examples/ClientTests/compact/IronCylinder.xml +++ b/examples/ClientTests/compact/IronCylinder.xml @@ -1,7 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <includes> <gdmlFile ref="${DD4hepINSTALL}/DDDetectors/compact/elements.xml"/> diff --git a/examples/ClientTests/compact/LheD_tracker.xml b/examples/ClientTests/compact/LheD_tracker.xml index 29377080a..fcd399041 100644 --- a/examples/ClientTests/compact/LheD_tracker.xml +++ b/examples/ClientTests/compact/LheD_tracker.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="LHeD_cdr" title="LHe Detector - based on CLIC Silicon Detector CDR" diff --git a/examples/ClientTests/compact/MagnetFields.xml b/examples/ClientTests/compact/MagnetFields.xml index 6392c50ff..db55719d6 100644 --- a/examples/ClientTests/compact/MagnetFields.xml +++ b/examples/ClientTests/compact/MagnetFields.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="clic_sid_cdr" title="CLIC Silicon Detector CDR" diff --git a/examples/ClientTests/compact/MaterialTester.xml b/examples/ClientTests/compact/MaterialTester.xml index 936ecb934..4f04ea559 100644 --- a/examples/ClientTests/compact/MaterialTester.xml +++ b/examples/ClientTests/compact/MaterialTester.xml @@ -1,7 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <define> <constant name="world_size" value="30*m"/> diff --git a/examples/ClientTests/compact/MiniTel.xml b/examples/ClientTests/compact/MiniTel.xml index f51073fd5..f97ab7668 100644 --- a/examples/ClientTests/compact/MiniTel.xml +++ b/examples/ClientTests/compact/MiniTel.xml @@ -1,7 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="Sensor" title="Sensor for New experiment" diff --git a/examples/ClientTests/compact/MiniTel_json.xml b/examples/ClientTests/compact/MiniTel_json.xml index bcf4602bd..a59906350 100644 --- a/examples/ClientTests/compact/MiniTel_json.xml +++ b/examples/ClientTests/compact/MiniTel_json.xml @@ -1,7 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="Sensor" title="Sensor for New experiment" diff --git a/examples/ClientTests/compact/MultiCollections.xml b/examples/ClientTests/compact/MultiCollections.xml index 1b18f5cb5..4ca447f56 100644 --- a/examples/ClientTests/compact/MultiCollections.xml +++ b/examples/ClientTests/compact/MultiCollections.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="Nested_Detectors_test" title="Test for nested detector descriptions" diff --git a/examples/ClientTests/compact/MultiSegmentCollections.xml b/examples/ClientTests/compact/MultiSegmentCollections.xml index 599c8c598..af7849778 100644 --- a/examples/ClientTests/compact/MultiSegmentCollections.xml +++ b/examples/ClientTests/compact/MultiSegmentCollections.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="Nested_Detectors_test" title="Test for nested detector descriptions" diff --git a/examples/ClientTests/compact/MultiSegmentations.xml b/examples/ClientTests/compact/MultiSegmentations.xml index 2e086697f..d6e11bdde 100644 --- a/examples/ClientTests/compact/MultiSegmentations.xml +++ b/examples/ClientTests/compact/MultiSegmentations.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="Nested_Detectors_test" title="Test for nested detector descriptions" diff --git a/examples/ClientTests/compact/NamespaceConstants.xml b/examples/ClientTests/compact/NamespaceConstants.xml index 61a87f033..9a05242e0 100644 --- a/examples/ClientTests/compact/NamespaceConstants.xml +++ b/examples/ClientTests/compact/NamespaceConstants.xml @@ -1,7 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <define> <constant name="world_side" value="2*m"/> diff --git a/examples/ClientTests/compact/NestedDetectors.xml b/examples/ClientTests/compact/NestedDetectors.xml index 745335a10..8c1a03d1f 100644 --- a/examples/ClientTests/compact/NestedDetectors.xml +++ b/examples/ClientTests/compact/NestedDetectors.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="Nested_Detectors_test" title="Test for nested detector descriptions" diff --git a/examples/ClientTests/compact/NestedSimple.xml b/examples/ClientTests/compact/NestedSimple.xml index e0d86bfe7..8f56ca742 100644 --- a/examples/ClientTests/compact/NestedSimple.xml +++ b/examples/ClientTests/compact/NestedSimple.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="Nested_Detectors_test" title="Test for nested detector descriptions" diff --git a/examples/ClientTests/compact/SectorBarrelCalorimeter.xml b/examples/ClientTests/compact/SectorBarrelCalorimeter.xml index ab226ec84..a39e530b2 100644 --- a/examples/ClientTests/compact/SectorBarrelCalorimeter.xml +++ b/examples/ClientTests/compact/SectorBarrelCalorimeter.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="clic_sid_cdr" title="CLIC Silicon Detector CDR" diff --git a/examples/ClientTests/compact/SiBarrelMultiSensitiveDetector.xml b/examples/ClientTests/compact/SiBarrelMultiSensitiveDetector.xml index 03e38ae3d..781035c6f 100644 --- a/examples/ClientTests/compact/SiBarrelMultiSensitiveDetector.xml +++ b/examples/ClientTests/compact/SiBarrelMultiSensitiveDetector.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="Nested_Detectors_test" title="Test for nested detector descriptions" diff --git a/examples/ClientTests/compact/SiBarrelMultiSensitiveLongVolID.xml b/examples/ClientTests/compact/SiBarrelMultiSensitiveLongVolID.xml index d4f9af458..645ec5e0e 100644 --- a/examples/ClientTests/compact/SiBarrelMultiSensitiveLongVolID.xml +++ b/examples/ClientTests/compact/SiBarrelMultiSensitiveLongVolID.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="Nested_Detectors_test" title="Test for nested detector descriptions" diff --git a/examples/ClientTests/compact/SiliconBlock.xml b/examples/ClientTests/compact/SiliconBlock.xml index 0d42d9140..b6635d021 100644 --- a/examples/ClientTests/compact/SiliconBlock.xml +++ b/examples/ClientTests/compact/SiliconBlock.xml @@ -1,7 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="SiliconBlock" title="Test with 2 simple silicon boxes" diff --git a/examples/ClientTests/compact/TrackingRegion.xml b/examples/ClientTests/compact/TrackingRegion.xml index 19b7c297c..e6bb54ce0 100644 --- a/examples/ClientTests/compact/TrackingRegion.xml +++ b/examples/ClientTests/compact/TrackingRegion.xml @@ -1,7 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="SiliconBlock" title="Test with 2 simple silicon boxes" diff --git a/examples/ClientTests/compact/WorldVolume.xml b/examples/ClientTests/compact/WorldVolume.xml index 0899b54e5..698b0e2da 100644 --- a/examples/ClientTests/compact/WorldVolume.xml +++ b/examples/ClientTests/compact/WorldVolume.xml @@ -1,7 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="SiliconBlock" title="Test with 2 simple silicon boxes" diff --git a/examples/Conditions/src/ConditionExampleObjects.cpp b/examples/Conditions/src/ConditionExampleObjects.cpp index 6043d6231..8c8eaf235 100644 --- a/examples/Conditions/src/ConditionExampleObjects.cpp +++ b/examples/Conditions/src/ConditionExampleObjects.cpp @@ -51,8 +51,8 @@ Condition ConditionUpdate1::operator()(const ConditionKey& key, ConditionUpdateC void ConditionUpdate1::resolve(Condition target, ConditionUpdateContext& context) { vector<int>& data = target.get<vector<int> >(); Condition cond0 = context.condition(context.key(0)); - data.push_back(cond0.get<int>()); - data.push_back(cond0.get<int>()*2); + data.emplace_back(cond0.get<int>()); + data.emplace_back(cond0.get<int>()*2); } /// Interface to client Callback in order to update the condition diff --git a/examples/OpticalSurfaces/compact/OpNovice.xml b/examples/OpticalSurfaces/compact/OpNovice.xml index 9e84df55a..a69d13301 100644 --- a/examples/OpticalSurfaces/compact/OpNovice.xml +++ b/examples/OpticalSurfaces/compact/OpNovice.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="TestMaterialProperties" title="Test reading of TGeo's Material Properties" diff --git a/examples/OpticalSurfaces/compact/OpNovice_gdml.xml b/examples/OpticalSurfaces/compact/OpNovice_gdml.xml index 9ed6dc80f..3d4540cfc 100644 --- a/examples/OpticalSurfaces/compact/OpNovice_gdml.xml +++ b/examples/OpticalSurfaces/compact/OpNovice_gdml.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="gdml_import_test" title="GDML import test" diff --git a/examples/OpticalSurfaces/compact/ReadGDMLMatrices.xml b/examples/OpticalSurfaces/compact/ReadGDMLMatrices.xml index 21d518413..0f655971b 100644 --- a/examples/OpticalSurfaces/compact/ReadGDMLMatrices.xml +++ b/examples/OpticalSurfaces/compact/ReadGDMLMatrices.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="TestGDMLMatrices" title="Test reading of TGeo's GDML matrices" diff --git a/examples/OpticalSurfaces/compact/ReadMaterialProperties.xml b/examples/OpticalSurfaces/compact/ReadMaterialProperties.xml index 27a958969..b6f5f3b71 100644 --- a/examples/OpticalSurfaces/compact/ReadMaterialProperties.xml +++ b/examples/OpticalSurfaces/compact/ReadMaterialProperties.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="TestMaterialProperties" title="Test reading of TGeo's Material Properties" diff --git a/examples/OpticalSurfaces/compact/ReadOpticalSurfaces.xml b/examples/OpticalSurfaces/compact/ReadOpticalSurfaces.xml index 12b930419..f6863da19 100644 --- a/examples/OpticalSurfaces/compact/ReadOpticalSurfaces.xml +++ b/examples/OpticalSurfaces/compact/ReadOpticalSurfaces.xml @@ -1,6 +1,4 @@ -<lccdd xmlns:compact="http://www.lcsim.org/schemas/compact/1.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/compact/1.0/compact.xsd"> +<lccdd> <info name="TestOpticalSurfaces" title="Test reading of TGeo's Optical Surfaces" -- GitLab