1 /**************************************************************************
2 * This file is property of and copyright by the ALICE HLT Project *
3 * All rights reserved. *
6 * Indranil Das <indra.das@saha.ac.in> *
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 *
13 * about the suitability of this software for any purpose. It is *
14 * provided "as is" without express or implied warranty. *
15 **************************************************************************/
21 * \file CreateHitRecoLookupTables.C
22 * \brief Macro used to generate lookup tables for the hit reconstructor components.
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.
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.
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:
34 * > aliroot $ALICE_ROOT/HLT/MUON/macros/CreateHitRecoLookupTables.C
38 * > aliroot -b -q -l $ALICE_ROOT/HLT/MUON/macros/CreateHitRecoLookupTables.C+
41 * \author Indranil Das <indra.das@saha.ac.in>
45 Purpose: A macro to generate LookupTable
47 buspatchId+manuid+channelId buspatchId Ix IY X Y B/NB
53 Modified: 24/08/2007 (To adopt to AliRoot v4-06-Release)
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+
59 Author: Indranil Das, HEP, SINP, Kolkata
60 Email: indra.das@saha.ac.in
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>
68 #if !defined(__CINT__) || defined(__MAKECINT__)
69 #include "Riostream.h"
70 #include "AliHLTMUONHitReconstructorComponent.h"
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.
78 * (Default = local://$ALICE_ROOT/OCDB)
79 * \param run This is the run number to use for the CDB (Default = 0).
81 void CreateHitRecoLookupTables(const char* CDBPath = "local://$ALICE_ROOT/OCDB", Int_t run = 0)
83 gSystem->Load("libAliHLTMUON.so");
85 for (Int_t ddl = 12; ddl < 20; ddl++)
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
97 cout << "Lookup tables have been generated successfully." << endl;