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