1 /**************************************************************************
2 * This file is property of and copyright by the ALICE HLT Project *
3 * All rights reserved. *
6 * Artur Szostak <artursz@iafrica.com> *
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 CreateTriggerRecoLookupTables.C
22 * \brief Macro used to generate lookup tables for the trigger reconstructor components.
24 * This macro is used to generate the lookup tables for the trigger 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/CreateTriggerRecoLookupTables.C
38 * > aliroot -b -q -l $ALICE_ROOT/HLT/MUON/macros/CreateTriggerRecoLookupTables.C+
41 * \author Artur Szostak <artursz@iafrica.com>
44 #if !defined(__CINT__) || defined(__MAKECINT__)
45 #include "Riostream.h"
46 #include "AliHLTMUONTriggerReconstructorComponent.h"
51 * Generates the lookup tables for the AliHLTMUONTriggerReconstructorComponent
52 * components. The tables are generated from the CDB database information.
53 * \param CDBPath This is the CDB path to use as the DB storage.
54 * (Default = local://$ALICE_ROOT)
55 * \param run This is the run number to use for the CDB (Default = 0).
56 * \param useCrateId Indicates if the crate ID should be used for the lookup table
57 * indexing rather than just a sequencial number (Default = true).
59 void CreateTriggerRecoLookupTables(
60 const char* CDBPath = "local://$ALICE_ROOT",
62 bool useCrateId = true
65 gSystem->Load("libAliHLTMUON.so");
67 for (Int_t ddl = 20; ddl < 22; ddl++)
70 sprintf(filename, "Lut%d.dat", ddl+1);
71 cout << "Generating LUT for DDL " << ddl+1
72 << " and writing output to file " << filename << endl;
73 bool ok = AliHLTMUONTriggerReconstructorComponent::GenerateLookupTable(
74 ddl, filename, CDBPath, run, useCrateId
79 cout << "Lookup tables have been generated successfully." << endl;