--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+// $Id$
+//
+// Macro for generating the geometry data files:
+// (transform_*.dat, svmap_*.dat).
+// To be run from aliroot:
+// .x MUONGenerateGeometryData.C
+//
+// The generated files do not replace the existing ones
+// but have different names (with extension ".out").
+// To compare/replace the existing files with generated ones
+// run the scripts in MUON/data:
+// compare_data [transform] [svmaps]
+// reset_data [transform] [svmaps]
+//
+// Author: I. Hrivnacova, IPN Orsay
+
+void MUONGenerateGeometryData(Bool_t transforms = true, Bool_t svmaps = true)
+{
+ // Initialize
+ gAlice->Init("./Config_MUON_test.C");
+ cout << "Init done " << endl;
+
+ // Get MUON detector
+ AliMUON* muon = (AliMUON*)gAlice->GetModule("MUON");
+ if (!muon) {
+ AliFatal("MUON detector not defined.");
+ return 0;
+ }
+
+ // Get geometry builder
+ AliMUONGeometryBuilder* builder = muon ->GetGeometryBuilder();
+
+ if (transforms) {
+ cout << "Generating transformation files ..." << endl;
+ builder->WriteTransformations();
+ }
+
+ if (svmaps) {
+ cout << "Generating svmaps files ..." << endl;
+ builder->WriteSVMaps();
+ }
+}
--- /dev/null
+#!/bin/sh
+# $Id$
+#
+# by I. Hrivnacova, IPN Orsay
+
+# Script to compare existing transformation/svmap data files
+# with generated ones.
+#
+# Usage: compare_data which_data
+# which_data = transform, svmap
+
+if [ $# != 1 ] ; then
+ echo " Usage: compare_data which_data"
+ echo " which_data = transform, svmap"
+ exit 1
+fi
+
+if [ "$1" != "transform" -a "$1" != "svmap" ] ; then
+ echo " Usage: reset_data which_data"
+ echo " which_data = transform, svmap"
+ exit 1
+fi
+
+DATATYPE=$1
+
+for builder in st1 st1V2 st2 slat trigger
+do
+ if [ -f $DATATYPE"_"$builder".dat.out" ] ; then
+ echo "Comparing $DATATYPE"_"$builder".dat $DATATYPE"_"$builder.dat.out ...
+ diff $DATATYPE"_"$builder.dat $DATATYPE"_"$builder.dat.out
+ fi
+done