From 696192a9a6068ef6af04a971de5e38a4fc0cee01 Mon Sep 17 00:00:00 2001
From: Markus Frank <markus.frank@cern.ch>
Date: Fri, 22 Feb 2013 17:14:46 +0000
Subject: [PATCH] Have a common representation for all unicode macros.

---
 DDCore/include/XML/UnicodeValues.h | 436 +++++++++++++++++++++++++++++
 cmake/thisdd4hep.sh                |   8 +-
 doc/release.notes                  |  12 +
 doc/setup.sh                       |  29 +-
 4 files changed, 464 insertions(+), 21 deletions(-)
 create mode 100644 DDCore/include/XML/UnicodeValues.h

diff --git a/DDCore/include/XML/UnicodeValues.h b/DDCore/include/XML/UnicodeValues.h
new file mode 100644
index 000000000..138a4ea45
--- /dev/null
+++ b/DDCore/include/XML/UnicodeValues.h
@@ -0,0 +1,436 @@
+
+namespace DD4hep   { namespace XML  {
+
+    extern const Tag_t Unicode_NULL;
+    extern const Tag_t Unicode_empty;
+    extern const Tag_t Unicode_star;
+    extern const Tag_t Unicode_PI;
+    extern const Tag_t Unicode_TWOPI;
+
+  UNICODE(value);
+  UNICODE(radian);
+  UNICODE(ref);
+
+
+  UNICODE(0);
+  UNICODE(1);
+  UNICODE(2);
+  UNICODE(3);
+  UNICODE(4);
+  UNICODE(5);
+  UNICODE(6);
+  UNICODE(7);
+  UNICODE(8);
+  UNICODE(9);
+
+
+  UNICODE(a);
+  UNICODE(A);
+  UNICODE(Air);
+  UNICODE(angle);
+  UNICODE(alignment);
+  UNICODE(alignments);
+  UNICODE(alpha);
+  UNICODE(alpha1);
+  UNICODE(alpha2);
+  UNICODE(alpha3);
+  UNICODE(alpha4);
+  UNICODE(assembly);
+  UNICODE(atom);
+  UNICODE(attributes);
+  UNICODE(aunit);
+  UNICODE(author);
+
+  UNICODE(b);
+  UNICODE(B);
+  UNICODE(box);
+  UNICODE(barrel);
+  UNICODE(barrel_envelope);
+  UNICODE(beampipe);
+  UNICODE(beta);
+
+  UNICODE(c);
+  UNICODE(C);
+  UNICODE(calorimeter);
+  UNICODE(cartesian_grid_xy);
+  UNICODE(chamber);
+  UNICODE(chambers);
+  UNICODE(check);
+  UNICODE(checksum);
+  UNICODE(cm);
+  UNICODE(color);
+  UNICODE(combine_hits);
+  UNICODE(combineHits);
+  UNICODE(comment);
+  UNICODE(component);
+  UNICODE(composite);
+  UNICODE(cone);
+  UNICODE(constant);
+  UNICODE(crossing_angle);
+  UNICODE(cut);
+
+  UNICODE(d);
+  UNICODE(D);
+  UNICODE(define);
+  UNICODE(deltaphi);
+  UNICODE(deltatheta);
+  UNICODE(depth);
+  UNICODE(desnity);
+  UNICODE(detector);
+  UNICODE(detectors);
+  UNICODE(dim_r);
+  UNICODE(dim_x);
+  UNICODE(dim_y);
+  UNICODE(dim_z);
+  UNICODE(dimensions);
+  UNICODE(dipole_coeff);
+  UNICODE(disk);
+  UNICODE(disks);
+  UNICODE(display);
+  UNICODE(dr);
+  UNICODE(drawing_style);
+  UNICODE(drawingStyle);
+  UNICODE(dx);
+  UNICODE(dy);
+  UNICODE(dz);
+
+  UNICODE(e);
+  UNICODE(E);
+  UNICODE(ecut);
+  UNICODE(element);
+  UNICODE(eltube);
+  UNICODE(end);
+  UNICODE(end_module);
+  UNICODE(end_modules);
+  UNICODE(endcap);
+  UNICODE(endphi);
+  UNICODE(eunit);
+  UNICODE(end_x);
+  UNICODE(end_y);
+  UNICODE(end_z);
+
+  UNICODE(f);
+  UNICODE(F);
+  UNICODE(false);
+  UNICODE(field);
+  UNICODE(fields);
+  UNICODE(field_name);
+  UNICODE(file);
+  UNICODE(first);
+  UNICODE(firstposition);
+  UNICODE(firstrotation);
+  UNICODE(formula);
+  UNICODE(fraction);
+  UNICODE(funit);
+
+  UNICODE(g);
+  UNICODE(G);
+  UNICODE(gamma);
+  UNICODE(gap);
+  UNICODE(gas);
+  UNICODE(generator);
+  UNICODE(gdml);
+  UNICODE(gdmlFile);
+  UNICODE(glass);
+  UNICODE(global);
+  UNICODE(global_grid_xy);
+  UNICODE(grid_size_x);
+  UNICODE(grid_size_y);
+  UNICODE(grid_size_z);
+  UNICODE(grid_size_phi);
+  UNICODE(grid_xyz);
+  UNICODE(gridSizePhi);
+  UNICODE(gridSizeX);
+  UNICODE(gridSizeY);
+  UNICODE(gridSizeZ);
+
+  UNICODE(h);
+  UNICODE(H);
+  UNICODE(half_x);
+  UNICODE(half_y);
+  UNICODE(half_z);
+  UNICODE(header);
+  UNICODE(height);
+  UNICODE(hits_collection);
+
+  UNICODE(i);
+  UNICODE(I);
+  UNICODE(id);
+  UNICODE(iddict);
+  UNICODE(identity_rot);
+  UNICODE(identity_pos);
+  UNICODE(idfield);
+  UNICODE(idspec);
+  UNICODE(idspecref);
+  UNICODE(includes);
+  UNICODE(incoming_r);
+  UNICODE(info);
+  UNICODE(inner);
+  UNICODE(inner_field);
+  UNICODE(inner_r);
+  UNICODE(inner_radius);
+  UNICODE(inner_z);
+  UNICODE(insideTrackingVolume);
+  UNICODE(intersection);
+  UNICODE(InvisibleNoDaughters);
+  UNICODE(InvisibleWithDaughters);
+
+  UNICODE(j);
+  UNICODE(J);
+
+  UNICODE(k);
+  UNICODE(K);
+
+  UNICODE(l);
+  UNICODE(L);
+  UNICODE(label);
+  UNICODE(ladder);
+  UNICODE(layer);
+  UNICODE(layers);
+  UNICODE(lcdd);
+  UNICODE(lccdd);
+  UNICODE(length);
+  UNICODE(limit);
+  UNICODE(limits);
+  UNICODE(limitset);
+  UNICODE(limitsetref);
+  UNICODE(line_style);
+  UNICODE(lineStyle);
+  UNICODE(local);
+  UNICODE(lunit);
+
+  UNICODE(m);
+  UNICODE(M);
+  UNICODE(material);
+  UNICODE(materialref);
+  UNICODE(materials);
+  UNICODE(MeV);
+  UNICODE(mm);
+  UNICODE(module);
+  UNICODE(modules);
+  UNICODE(module_component);
+  UNICODE(module_envelope);
+  UNICODE(moduleHeight);
+  UNICODE(modulePitch);
+  UNICODE(modulePosX);
+  UNICODE(modulePosY);
+  UNICODE(moduleWidth);
+
+  UNICODE(n);
+  UNICODE(N);
+  UNICODE(NIL);
+  UNICODE(name);
+  UNICODE(nmodules);
+  UNICODE(nModules);
+  UNICODE(nonprojective_cylinder);
+  UNICODE(nPads);
+  UNICODE(nphi);
+  UNICODE(ntheta);
+  UNICODE(number);
+  UNICODE(numsides);
+  UNICODE(nz);
+
+  UNICODE(o);
+  UNICODE(O);
+  UNICODE(offset);
+  UNICODE(overlap);
+  UNICODE(outer);
+  UNICODE(outer_field);
+  UNICODE(outer_r);
+  UNICODE(outer_radius);
+  UNICODE(outer_z);
+  UNICODE(outgoing_r);
+
+  UNICODE(p);
+  UNICODE(P);
+  UNICODE(padPitch);
+  UNICODE(pads);
+  UNICODE(para);
+  UNICODE(paraboloid);
+  UNICODE(param);
+  UNICODE(params);
+  UNICODE(particles);
+  UNICODE(phi);
+  UNICODE(phi0);
+  UNICODE(phi_tilt);
+  UNICODE(phiBins);
+  UNICODE(phi_size_max);
+  UNICODE(physvol);
+  UNICODE(physvolid);
+  UNICODE(polyhedra);
+  UNICODE(polycone);
+  UNICODE(position);
+  UNICODE(positionref);
+  UNICODE(projective_cylinder);
+  UNICODE(projective_zplane);
+  UNICODE(properties);
+  UNICODE(psi);
+
+  UNICODE(q);
+  UNICODE(Q);
+
+  UNICODE(r);
+  UNICODE(R);
+  UNICODE(r_size);
+  UNICODE(r0);
+  UNICODE(radius);
+  UNICODE(radiator);
+  UNICODE(rbg);
+  UNICODE(rc);
+  UNICODE(readout);
+  UNICODE(readouts);
+  UNICODE(reflect);
+  UNICODE(reflect_rot);
+  UNICODE(region);
+  UNICODE(regions);
+  UNICODE(regionref);
+  UNICODE(repeat);
+  UNICODE(rhi);
+  UNICODE(ring);
+  UNICODE(rlo);
+  UNICODE(rmax);
+  UNICODE(rmax1);
+  UNICODE(rmax2);
+  UNICODE(rmin);
+  UNICODE(rmin1);
+  UNICODE(rmin2);
+  UNICODE(RL);
+  UNICODE(row);
+  UNICODE(rpc);
+  UNICODE(RowID);
+  UNICODE(rowHeight);  
+  UNICODE(rowPitch);
+  UNICODE(rphi_layout);
+  UNICODE(rotation);
+  UNICODE(rotationref);
+  UNICODE(rtor);
+
+  UNICODE(s);
+  UNICODE(S);
+  UNICODE(scintillator);
+  UNICODE(sd);
+  UNICODE(sdref);
+  UNICODE(second);
+  UNICODE(segmentation);
+  UNICODE(sensitive);
+  UNICODE(sensitive_detector);
+  UNICODE(sensitive_detectors);
+  UNICODE(sensor);
+  UNICODE(setup);
+  UNICODE(signed);
+  UNICODE(solidref);
+  UNICODE(sphere);
+  UNICODE(show_daughters);
+  UNICODE(showDaughters);
+  UNICODE(slice);
+  UNICODE(slices);
+  UNICODE(solid);
+  UNICODE(solids);
+  UNICODE(spacer);
+  UNICODE(status);
+  UNICODE(start);
+  UNICODE(start_x);
+  UNICODE(start_y);
+  UNICODE(start_z);
+  UNICODE(startphi);
+  UNICODE(starttheta);
+  UNICODE(stave);
+  UNICODE(staves);
+  UNICODE(store_secondaries);
+  UNICODE(strength);
+  UNICODE(structure);
+  UNICODE(subtraction);
+  UNICODE(support);
+  UNICODE(system);
+
+  UNICODE(t);
+  UNICODE(T);
+  UNICODE(theta);
+  UNICODE(thetaBins);
+  UNICODE(thickness);
+  UNICODE(threshold);
+  UNICODE(title);
+  UNICODE(tube);
+  UNICODE(tubes);
+  UNICODE(torus);
+  UNICODE(tracker);
+  UNICODE(tracking_cylinder);
+  UNICODE(tracking_volume);
+  UNICODE(trap);
+  UNICODE(trd);
+  UNICODE(true);
+  UNICODE(tubs);
+  UNICODE(type);
+
+  UNICODE(u);
+  UNICODE(U);
+  UNICODE(union);
+  UNICODE(unit);
+  UNICODE(useForHitPosition);
+  UNICODE(url);
+
+  UNICODE(v);
+  UNICODE(V);
+  UNICODE(Vacuum);
+  UNICODE(verbose);
+  UNICODE(version);
+  UNICODE(vis);
+  UNICODE(visible);
+  UNICODE(visref);
+  UNICODE(volume);
+  UNICODE(volumeref);
+
+  UNICODE(w);
+  UNICODE(W);
+  UNICODE(wedge);
+  UNICODE(width);
+  UNICODE(world);
+  UNICODE(world_box);
+  UNICODE(world_volume);
+
+  UNICODE(x);
+  UNICODE(X);
+  UNICODE(x_offset);
+  UNICODE(x0);
+  UNICODE(x1);
+  UNICODE(X1);
+  UNICODE(x2);
+  UNICODE(X2);
+  UNICODE(x3);
+  UNICODE(x4);
+  UNICODE(xhalf);
+  UNICODE(xmin);
+  UNICODE(xmax);
+
+  UNICODE(y);
+  UNICODE(Y);
+  UNICODE(y0);
+  UNICODE(y1);
+  UNICODE(Y1);
+  UNICODE(y2);
+  UNICODE(Y2);
+  UNICODE(y3);
+  UNICODE(y4);
+  UNICODE(yhalf);
+  UNICODE(ymin);
+  UNICODE(ymax);
+  UNICODE(y_offset);
+
+  UNICODE(z);
+  UNICODE(Z);
+  UNICODE(z_layout);
+  UNICODE(z_length);
+  UNICODE(z_offset);
+  UNICODE(z0);
+  UNICODE(z1);
+  UNICODE(z2);
+  UNICODE(z3);
+  UNICODE(z4);
+  UNICODE(zhalf);
+  UNICODE(zmin);
+  UNICODE(zmax);
+  UNICODE(zplane);
+  UNICODE(zstart); 
+
+
+}}
diff --git a/cmake/thisdd4hep.sh b/cmake/thisdd4hep.sh
index 502464d88..5f25bdee6 100644
--- a/cmake/thisdd4hep.sh
+++ b/cmake/thisdd4hep.sh
@@ -25,16 +25,16 @@ fi
 
 #----LD_LIBRARY_PATH-----------------------------------------------------------------
 if [ -z "${LD_LIBRARY_PATH}" ]; then
-  LD_LIBRARY_PATH=@LIBRARY_OUTPUT_PATH@:@XERCESC_ROOT_DIR@/lib; export LD_LIBRARY_PATH       # Linux, ELF HP-UX
+  LD_LIBRARY_PATH=@LIBRARY_OUTPUT_PATH@:@XERCESC_ROOT_DIR@/lib:@ROOT_LIBRARY_DIR@; export LD_LIBRARY_PATH       # Linux, ELF HP-UX
 else
-  LD_LIBRARY_PATH=@LIBRARY_OUTPUT_PATH@:@XERCESC_ROOT_DIR@/lib:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
+  LD_LIBRARY_PATH=@LIBRARY_OUTPUT_PATH@:@XERCESC_ROOT_DIR@/lib:@ROOT_LIBRARY_DIR@:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
 fi
 
 #----DYLD_LIBRARY_PATH---------------------------------------------------------------
 if [ -z "${DYLD_LIBRARY_PATH}" ]; then
-  DYLD_LIBRARY_PATH=@LIBRARY_OUTPUT_PATH@:@XERCESC_ROOT_DIR@/lib; export DYLD_LIBRARY_PATH   # Mac OS X
+  DYLD_LIBRARY_PATH=@LIBRARY_OUTPUT_PATH@:@XERCESC_ROOT_DIR@/lib:@ROOT_LIBRARY_DIR@; export DYLD_LIBRARY_PATH   # Mac OS X
 else
-  DYLD_LIBRARY_PATH=@LIBRARY_OUTPUT_PATH@:@XERCESC_ROOT_DIR@/lib:$DYLD_LIBRARY_PATH; export DYLD_LIBRARY_PATH
+  DYLD_LIBRARY_PATH=@LIBRARY_OUTPUT_PATH@:@XERCESC_ROOT_DIR@/lib:@ROOT_LIBRARY_DIR@:$DYLD_LIBRARY_PATH; export DYLD_LIBRARY_PATH
 fi
 
 #----PYTHONPATH---------------------------------------------------------------
diff --git a/doc/release.notes b/doc/release.notes
index 0ed869c83..87922d5f0 100644
--- a/doc/release.notes
+++ b/doc/release.notes
@@ -2,6 +2,18 @@ DD4hep  ----  Release Notes
 =================================
 
 
+2013/22/02    Markus Frank
+--------------------------
+  1) Today a decision was taken to remove all _X() and _A() macros 
+  accessing static unicode strings. A common macro will be used to
+  address both XML elements and XML attributes using the macro _U(...).
+  The original usage only created confusion.
+  All _X and _A macros were replaced by _U.
+
+  2) Improve the executables running the plugin mechanism in UtitlityApps.
+  They now complain if the plugin was not found.
+
+
 2013/21/02    Markus Frank
 --------------------------
   Require strict checks for the existence of xml attributes.
diff --git a/doc/setup.sh b/doc/setup.sh
index 60332485f..79ecb8e03 100644
--- a/doc/setup.sh
+++ b/doc/setup.sh
@@ -1,29 +1,24 @@
+#!/bin/bash
+#  Prerequisites:
+export ARCH=x86_64-slc5;
+export CMTCONFIG=${ARCH}-gcc46-dbg;
 #
-#  
-#  ++++ Prerequisites/compiler setup
-#  
-export CMTCONFIG=x86_64-slc5-gcc43-dbg
-. `which SetupProject.sh` Gaudi
-#
-. ./build/thisdd4hep.sh
-#
-#  ++++ Additional setup for ROOT, CLHEP, GEANT4 and XERCES
-#  
-export ROOTSYS=/afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.00/${CMTCONFIG}/root;
-export PATH=/afs/cern.ch/sw/lcg/external/CMake/2.8.6/x86_64-slc5-gcc43-opt/bin:${ROOTSYS}/bin:$PATH
-export LD_LIBRARY_PATH=${ROOTSYS}/lib:${LD_LIBRARY_PATH};
+. /afs/cern.ch/sw/lcg/external/gcc/4.6.2/${ARCH}/setup.sh /afs/cern.ch/sw/lcg/external;
+export ROOTSYS=/afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.04/${CMTCONFIG}/root;
+export PATH=/afs/cern.ch/sw/lcg/external/CMake/2.8.6/${ARCH}-gcc46-opt/bin:${ROOTSYS}/bin:$PATH;
+export LD_LIBRARY_PATH=${LD_LIBRARY_PATH};
+export XERCESCSYS=/afs/cern.ch/sw/lcg/external/XercesC/3.1.1p1/${ARCH}-gcc46-opt;
 export G4SYS=/afs/cern.ch/sw/lcg/external/geant4/9.5.p01/x86_64-slc5-gcc43
 export G4SYS=${HOME}/cmtuser/geant4/g4.9.5
-export CLHEPSYS=/afs/cern.ch/sw/lcg/external/clhep/2.1.2.3/x86_64-slc5-gcc43-opt
+export CLHEPSYS=/afs/cern.ch/sw/lcg/external/clhep/2.1.2.3/${CMTOPT}
 export LD_LIBRARY_PATH=${G4SYS}/lib64:${LD_LIBRARY_PATH};
 export PATH=${G4SYS}/bin:$PATH
-export XERCESCSYS=/afs/cern.ch/sw/lcg/external/XercesC/3.1.1p1/x86_64-slc5-gcc43-opt
 export G4LEDATA=${G4SYS}/share/Geant4-9.5.1/data/G4EMLOW6.23
 export G4LEVELGAMMADATA=${G4SYS}/share/Geant4-9.5.1/data/PhotonEvaporation2.2
 #
 # QT for Geant4:
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/afs/cern.ch/sw/lcg/external/qt/4.7.4/x86_64-slc5-gcc43-opt/lib
-#
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/afs/cern.ch/sw/lcg/external/qt/4.7.4/${CMTOPT}/lib
 #
+. ./build/thisdd4hep.sh
 #
 cd build
-- 
GitLab