Permalink
Browse files

Improve XML parsing interface

  • Loading branch information...
MarkusFrankATcernch committed Sep 4, 2018
1 parent 1c9253b commit 2eec49828defdef3da7c0cf5d8f06db93df07e53
@@ -508,6 +508,36 @@ namespace dd4hep {
double start() const;
/// Access attribute values: start
double start(double default_value) const;
/// Access attribute values: start_x
double start_x() const;
/// Access attribute values: start_x
double start_x(double default_value) const;
/// Access attribute values: start_y
double start_y() const;
/// Access attribute values: start_y
double start_y(double default_value) const;
/// Access attribute values: start_z
double start_z() const;
/// Access attribute values: start_z
double start_z(double default_value) const;
/// Access attribute values: step
double step() const;
/// Access attribute values: step
double step(double default_value) const;
/// Access attribute values: step_x
double step_x() const;
/// Access attribute values: step_x
double step_x(double default_value) const;
/// Access attribute values: step_y
double step_y() const;
/// Access attribute values: step_y
double step_y(double default_value) const;
/// Access attribute values: step_z
double step_z() const;
/// Access attribute values: step_z
double step_z(double default_value) const;
/// Access attribute values: end
double end() const;
/// Access attribute values: end
@@ -522,6 +552,10 @@ namespace dd4hep {
/// Access attribute values: show_daughters
bool show_daughters() const;
/// Access min/max parameters: correction
double correction() const;
/// Access min/max parameters: correction
double correction(double default_value) const;
/// Access min/max parameters: cut
double cut() const;
/// Access min/max parameters: cut
@@ -138,7 +138,15 @@ XML_ATTR_ACCESSOR(int, key_val)
XML_ATTR_ACCESSOR(int, key_value)
XML_ATTR_ACCESSOR(double, zstart)
XML_ATTR_ACCESSOR_DOUBLE(start)
XML_ATTR_ACCESSOR_DOUBLE(start_x)
XML_ATTR_ACCESSOR_DOUBLE(start_y)
XML_ATTR_ACCESSOR_DOUBLE(start_z)
XML_ATTR_ACCESSOR_DOUBLE(end)
XML_ATTR_ACCESSOR_DOUBLE(step)
XML_ATTR_ACCESSOR_DOUBLE(step_x)
XML_ATTR_ACCESSOR_DOUBLE(step_y)
XML_ATTR_ACCESSOR_DOUBLE(step_z)
XML_ATTR_ACCESSOR(double, thickness)
XML_ATTR_ACCESSOR(double, inner_stereo)
XML_ATTR_ACCESSOR(double, outer_stereo)
@@ -172,6 +180,7 @@ XML_ATTR_ACCESSOR(int, type)
XML_ATTR_ACCESSOR(bool, visible)
XML_ATTR_ACCESSOR(bool, show_daughters)
XML_ATTR_ACCESSOR_DOUBLE(correction)
XML_ATTR_ACCESSOR_DOUBLE(cut)
XML_ATTR_ACCESSOR_DOUBLE(threshold)
XML_ATTR_ACCESSOR_DOUBLE(lunit)
@@ -45,6 +45,7 @@ UNICODE (arg);
UNICODE (argument);
UNICODE (assembly);
UNICODE (atom);
UNICODE (attribute);
UNICODE (attributes);
UNICODE (aunit);
UNICODE (author);
@@ -72,25 +73,29 @@ UNICODE (cm);
UNICODE (coefficient);
UNICODE (coefficients);
UNICODE (color);
UNICODE (collections);
UNICODE (collection);
UNICODE (collections);
UNICODE (combine_hits);
UNICODE (combineHits);
UNICODE (comment);
UNICODE (component);
UNICODE (components);
UNICODE (composite);
UNICODE (composites);
UNICODE (cone);
UNICODE (config);
UNICODE (connected);
UNICODE (cons);
UNICODE (constant);
UNICODE (correction);
UNICODE (create);
UNICODE (crossing_angle);
UNICODE (cut);
UNICODE (d);
UNICODE (D);
UNICODE (daughter);
UNICODE (daughters);
UNICODE (debug);
UNICODE (define);
UNICODE (delta);
@@ -120,6 +125,7 @@ UNICODE (e);
UNICODE (E);
UNICODE (ecut);
UNICODE (element);
UNICODE (elements);
UNICODE (eltube);
UNICODE (end);
UNICODE (end_module);
@@ -141,12 +147,15 @@ UNICODE (field);
UNICODE (fields);
UNICODE (field_name);
UNICODE (file);
UNICODE (files);
UNICODE (first);
UNICODE (firstposition);
UNICODE (firstrotation);
UNICODE (formula);
UNICODE (fraction);
UNICODE (fractions);
UNICODE (frame);
UNICODE (frames);
UNICODE (funit);
UNICODE (g);
@@ -181,6 +190,8 @@ UNICODE (height);
UNICODE (hits_collections);
UNICODE (hits_collection);
UNICODE (hype);
UNICODE (hybrid);
UNICODE (hybrids);
UNICODE (i);
UNICODE (I);
@@ -206,7 +217,9 @@ UNICODE (intersection);
UNICODE (InvisibleNoDaughters);
UNICODE (InvisibleWithDaughters);
UNICODE (isotope);
UNICODE (isotopes);
UNICODE (item);
UNICODE (items);
UNICODE (j);
UNICODE (J);
@@ -369,6 +382,7 @@ UNICODE (rmin2);
UNICODE (RL);
UNICODE (rootFile);
UNICODE (row);
UNICODE (rows);
UNICODE (rpc);
UNICODE (RowID);
UNICODE (rowHeight);
@@ -388,12 +402,15 @@ UNICODE (second);
UNICODE (section);
UNICODE (segmentation);
UNICODE (sensitive);
UNICODE (sensitives);
UNICODE (sensitive_detector);
UNICODE (sensitive_detectors);
UNICODE (sensor);
UNICODE (sensors);
UNICODE (sequence);
UNICODE (setup);
UNICODE (shape);
UNICODE (shapes);
UNICODE (shield);
UNICODE (show_daughters);
UNICODE (showDaughters);
@@ -418,6 +435,11 @@ UNICODE (starttheta);
UNICODE (state);
UNICODE (stave);
UNICODE (staves);
UNICODE (step);
UNICODE (steps);
UNICODE (step_x);
UNICODE (step_y);
UNICODE (step_z);
UNICODE (store_secondaries);
UNICODE (strength);
UNICODE (structure);
@@ -446,6 +468,7 @@ UNICODE (tube);
UNICODE (tubes);
UNICODE (tubs);
UNICODE (type);
UNICODE (types);
UNICODE (tx);
UNICODE (ty);
UNICODE (tz);
@@ -477,12 +500,14 @@ UNICODE (v8x);
UNICODE (v8y);
UNICODE (Vacuum);
UNICODE (value);
UNICODE (values);
UNICODE (verbose);
UNICODE (version);
UNICODE (vis);
UNICODE (visible);
UNICODE (visref);
UNICODE (volume);
UNICODE (volumes);
UNICODE (volumeref);
UNICODE (w);
@@ -247,12 +247,12 @@ static Handle<TObject> create_BooleanShape(Detector&, xml_h element) {
if( e.hasChild( _U(position) ) ) {
usePos = true ;
xml_comp_t x_pos = e.position();
pos = Position( x_pos.x(),x_pos.y(),x_pos.z() );
pos = Position( x_pos.x(0.0),x_pos.y(0.0),x_pos.z(0.0) );
}
if( e.hasChild( _U(rotation) ) ) {
useRot = true ;
xml_comp_t x_rot = e.rotation();
rot = RotationZYX( x_rot.z(),x_rot.y(),x_rot.x() ) ;
rot = RotationZYX( x_rot.z(0.0),x_rot.y(0.0),x_rot.x(0.0) ) ;
}
if( op == "subtraction" ) {
@@ -15,7 +15,7 @@ dd4hep_package( DDG4
OPTIONAL ${CLHEP} [XercesC QUIET]
INCLUDE_DIRS include
INSTALL_INCLUDES include/DDG4 )
MESSAGE(STATUS "CLHEP_LIBRARIES ${CLHEP_LIBRARIES} ${CLHEP_LIBRARY}")
dd4hep_print ( "|++> CLHEP_LIBRARIES ${CLHEP_LIBRARIES} ${CLHEP_LIBRARY}" )
#---Add Library---------------------------------------------------------------------
dd4hep_add_package_library(DDG4 SOURCES src/*.cpp )
#--------------------------- Legacy libraries (for Frank) -------------------------
@@ -17,15 +17,21 @@ cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
include ( ${DD4hep_DIR}/cmake/DD4hep.cmake )
#------------------------------------------------------------------------------
dd4hep_configure_output ()
#
#---Trick to allow building with Geant4 internal CLHEP
if ( DD4HEP_USE_GEANT4 AND Geant4_builtin_clhep_FOUND)
set(CLHEP "")
else()
set(CLHEP CLHEP)
endif()
#
dd4hep_package( DDCMS
USES [DD4hep REQUIRED COMPONENTS DDCore]
[CLHEP REQUIRED]
[ROOT REQUIRED COMPONENTS Geom GenVector]
[ROOT REQUIRED COMPONENTS Geom GenVector]
OPTIONAL ${CLHEP}
INCLUDE_DIRS include
INSTALL_INCLUDES include/DDCMS)
#
#
# We only create only library for DDCMS. The whole package is a single component
# library. A priory there is no need to seperate the implementation from the
# plugins....

0 comments on commit 2eec498

Please sign in to comment.