]>
Commit | Line | Data |
---|---|---|
5e377ba0 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | // $Id$ | |
17 | // | |
18 | // Macro for generating the geometry data files: | |
7120ee1e | 19 | // (volpaths.dat, transform.dat, svmap.dat). |
5e377ba0 | 20 | // To be run from aliroot: |
21 | // .x MUONGenerateGeometryData.C | |
22 | // | |
23 | // The generated files do not replace the existing ones | |
24 | // but have different names (with extension ".out"). | |
5e377ba0 | 25 | // |
26 | // Author: I. Hrivnacova, IPN Orsay | |
27 | ||
7120ee1e | 28 | void MUONGenerateGeometryData(Bool_t volpaths = true, |
29 | Bool_t transforms = true, | |
30 | Bool_t svmaps = true) | |
5e377ba0 | 31 | { |
32 | // Initialize | |
d3467161 | 33 | gAlice->Init("$ALICE_ROOT/MUON/Config.C"); |
5e377ba0 | 34 | cout << "Init done " << endl; |
35 | ||
36 | // Get MUON detector | |
37 | AliMUON* muon = (AliMUON*)gAlice->GetModule("MUON"); | |
38 | if (!muon) { | |
39 | AliFatal("MUON detector not defined."); | |
40 | return 0; | |
41 | } | |
42 | ||
43 | // Get geometry builder | |
44 | AliMUONGeometryBuilder* builder = muon ->GetGeometryBuilder(); | |
7120ee1e | 45 | |
46 | if (volpaths) { | |
47 | cout << "Generating volpath file ..." << endl; | |
48 | builder->GetTransformer()->WriteVolumePaths("volpath.dat.out"); | |
49 | } | |
5e377ba0 | 50 | |
51 | if (transforms) { | |
7120ee1e | 52 | cout << "Generating transformation file ..." << endl; |
53 | builder->GetTransformer()->WriteTransformations("transform.dat.out"); | |
5e377ba0 | 54 | } |
55 | ||
56 | if (svmaps) { | |
7120ee1e | 57 | cout << "Generating svmaps file ..." << endl; |
5e377ba0 | 58 | builder->WriteSVMaps(); |
59 | } | |
60 | } |