]>
Commit | Line | Data |
---|---|---|
8e0220c2 | 1 | /************************************************************************** |
2 | * This file is property of and copyright by the ALICE HLT Project * | |
3 | * All rights reserved. * | |
4 | * * | |
5 | * Primary Authors: * | |
6 | * Artur Szostak <artursz@iafrica.com> * | |
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 * | |
13 | * about the suitability of this software for any purpose. It is * | |
14 | * provided "as is" without express or implied warranty. * | |
15 | **************************************************************************/ | |
16 | ||
17 | // $Id: $ | |
18 | ||
94135365 | 19 | #if !defined(__CINT__) || defined(__MAKECINT__) |
20 | #include "AliHLTReconstructorBase.h" | |
21 | #include "AliHLTConfiguration.h" | |
22 | #include "AliReconstruction.h" | |
23 | #include <iostream> | |
24 | using std::cerr; | |
25 | using std::endl; | |
26 | #endif | |
27 | ||
8e0220c2 | 28 | /** |
29 | * @file HLToutputTodHLTRootObjects.C | |
30 | * @brief Macro for converting dHLT output in HLTOUT into ROOT objects or dumping to file. | |
31 | * | |
32 | * This macro converts dHLT output data blocks in HLTOUT to dHLT ROOT | |
33 | * objects which can be used for dHLT specific analysis or debugging. | |
34 | * Alternatively the dHLT data blocks are dumped to file in raw binary format. | |
35 | * | |
36 | * @note The macro must be run in the directory with the raw0, raw1 etc | |
37 | * directories. Also no reconstructed ROOT files should be in this directory | |
38 | * either. Backup any reconstructed AliESDs.root files if you want, and then | |
39 | * delete all root files in the directory where you will run this macro. | |
40 | * | |
41 | * @author Artur Szostak <artursz@iafrica.com> | |
42 | * @ingroup alihlt_dimuon_macros | |
43 | */ | |
44 | void HLToutputTodHLTRootObjects(bool dumpBinary = false) | |
45 | { | |
46 | // setup of the HLT system | |
47 | gSystem->Load("libHLTrec.so"); | |
48 | AliHLTSystem* sys = AliHLTReconstructorBase::GetInstance(); | |
49 | if (sys == NULL) | |
50 | { | |
51 | cerr << "FATAL ERROR: Cannot get HLT system instance." << endl; | |
52 | return; | |
53 | } | |
54 | ||
55 | // Configure the chain. | |
56 | AliHLTConfiguration pub("Pub", "AliHLTOUTPublisher" , NULL, "-origin 'MUON'"); | |
57 | TString sources = "Pub"; | |
58 | if (dumpBinary) | |
59 | { | |
60 | AliHLTConfiguration sink("dhlt-output-dump", "FileWriter", sources, "-datafile output.dat -specfmt"); | |
61 | } | |
62 | else | |
63 | { | |
64 | AliHLTConfiguration convert("convert", "MUONRootifier", sources, ""); | |
65 | AliHLTConfiguration sink("dhlt-output-dump", "ROOTFileWriter", "convert", "-concatenate-events -datafile output.root -specfmt"); | |
66 | } | |
67 | ||
68 | // Setup the reconstruction and run. | |
69 | AliReconstruction rec; | |
70 | rec.SetInput("./"); | |
71 | rec.SetRunLocalReconstruction("HLT"); | |
72 | rec.SetRunTracking(""); | |
73 | rec.SetFillESD(""); | |
74 | rec.SetRunQA(kFALSE); | |
75 | rec.SetFillTriggerESD(kFALSE); | |
76 | rec.SetRunVertexFinder(kFALSE); | |
77 | rec.SetOption("HLT", "libAliHLTMUON.so loglevel=0x78 chains=dhlt-output-dump"); | |
78 | rec.Run(); | |
79 | } |