]>
Commit | Line | Data |
---|---|---|
86665942 | 1 | /************************************************************************** |
93a75941 | 2 | * This file is property of and copyright by the ALICE HLT Project * |
86665942 | 3 | * All rights reserved. * |
4 | * * | |
5 | * Primary Authors: * | |
6 | * Indranil Das <indra.das@saha.ac.in> * | |
7 | * * | |
8 | * Permission to use, copy, modify and distribute this software and its * | |
9 | * documentation strictly for non-commercial purposes is hereby granted * | |
10 | * without fee, provided that the above copyright notice appears in all * | |
11 | * copies and that both the copyright notice and this permission notice * | |
12 | * appear in the supporting documentation. The authors make no claims * | |
93a75941 | 13 | * about the suitability of this software for any purpose. It is * |
86665942 | 14 | * provided "as is" without express or implied warranty. * |
15 | **************************************************************************/ | |
16 | ||
93a75941 | 17 | /* $Id$ */ |
18 | ||
19 | /** | |
20 | * \ingroup macros | |
21 | * \file CreateHitRecoLookupTables.C | |
22 | * \brief Macro used to generate lookup tables for the hit reconstructor components. | |
23 | * | |
24 | * This macro is used to generate the lookup tables for the hit reconstructor | |
25 | * component. All alignment and geometry data is taken from the CDB. | |
26 | * | |
27 | * \note The LUT files must be generated on the same platform / machine on which | |
28 | * they will be used, since they may not be binary compatible across platforms. | |
29 | * | |
30 | * To run this macro copy "rootlogon.C" from $ALICE_ROOT/HLT/MUON/macros | |
31 | * into the current directory, then from the shell command prompt run one of | |
32 | * the following commands: | |
33 | * \code | |
34 | * > aliroot $ALICE_ROOT/HLT/MUON/macros/CreateHitRecoLookupTables.C | |
35 | * \endcode | |
36 | * or | |
37 | * \code | |
38 | * > aliroot -b -q -l $ALICE_ROOT/HLT/MUON/macros/CreateHitRecoLookupTables.C+ | |
39 | * \endcode | |
40 | * | |
41 | * \author Indranil Das <indra.das@saha.ac.in> | |
42 | */ | |
43 | ||
44 | /* | |
86665942 | 45 | Purpose: A macro to generate LookupTable |
46 | in the following form | |
ee3678d3 | 47 | buspatchId+manuid+channelId buspatchId Ix IY X Y B/NB |
86665942 | 48 | |
49 | Created: 7/10/2005 | |
50 | Modified: 22/12/2005 | |
51 | Modified: 09/02/2006 | |
52 | Modified: 09/04/2007 | |
53 | Modified: 24/08/2007 (To adopt to AliRoot v4-06-Release) | |
54 | ||
93a75941 | 55 | Run Info: To run this macro copy "rootlogon.C" from $ALICE_ROOT/HLT/MUON/macros |
56 | into the current directory then compile and run from inside AliRoot using | |
57 | root [0] .x CreateHitRecoLookupTables.C+ | |
86665942 | 58 | |
59 | Author: Indranil Das, HEP, SINP, Kolkata | |
60 | Email: indra.das@saha.ac.in | |
86665942 | 61 | |
93a75941 | 62 | 18 Apr 2008: Moved lookup table generation code to the AliHLTMUONHitReconstructorComponent |
63 | component since it is required there anyway and we want to avoid code duplication. | |
64 | This also makes this macro much cleaner. | |
65 | -- Artur Szostak <artursz@iafrica.com> | |
66 | */ | |
67 | ||
68 | #if !defined(__CINT__) || defined(__MAKECINT__) | |
69 | #include "Riostream.h" | |
70 | #include "AliHLTMUONHitReconstructorComponent.h" | |
71 | #include "TSystem.h" | |
72 | #endif | |
73 | ||
74 | /** | |
75 | * Generates the ASCII lookup tables for the AliHLTMUONHitReconstructorComponent | |
76 | * components. The tables are generated from the CDB database information. | |
77 | * \param CDBPath This is the CDB path to use as the DB storage. | |
162637e4 | 78 | * (Default = local://$ALICE_ROOT/OCDB) |
93a75941 | 79 | * \param run This is the run number to use for the CDB (Default = 0). |
80 | */ | |
162637e4 | 81 | void CreateHitRecoLookupTables(const char* CDBPath = "local://$ALICE_ROOT/OCDB", Int_t run = 0) |
86665942 | 82 | { |
93a75941 | 83 | gSystem->Load("libAliHLTMUON.so"); |
84 | ||
85 | for (Int_t ddl = 12; ddl < 20; ddl++) | |
86 | { | |
87 | Char_t filename[64]; | |
88 | sprintf(filename, "Lut%d.dat", ddl+1); | |
89 | cout << "Generating LUT for DDL " << ddl+1 | |
90 | << " and writing output to file " << filename << endl; | |
91 | bool ok = AliHLTMUONHitReconstructorComponent::GenerateLookupTable( | |
92 | ddl, filename, CDBPath, run | |
93 | ); | |
94 | if (! ok) return; | |
95 | } | |
86665942 | 96 | |
93a75941 | 97 | cout << "Lookup tables have been generated successfully." << endl; |
86665942 | 98 | } |