]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/exa/HOMERManager.C
* Bugfixes for 64Bit - 32Bit machines in the Source/Block Desc
[u/mrichter/AliRoot.git] / HLT / exa / HOMERManager.C
CommitLineData
06272c83 1//-*- Mode: C++ -*-
2// $Id: HOMERManager.C $
3/**
4 * @file HOMERManager.C
5 * @brief Sample macro for the use of the HOMERManager
6 *
7 * Usage:
8 * <pre>
9 * aliroot -l HOMERManager.C
10 * </pre>
11 *
12 * This macro illustrates the usage of the AliHLTHOMERManager in order
13 * to on-line read events outside the HLT.
14 *
15 * This macro can be run inside the
16 * <ul>
17 * <li>DAQ/DCS(ACR) network</li>
18 * <li>HLT network</li>
19 * <li>CERN GPN network</li>
20 * </ul>
21 *
22 * See AliHLTHOMERManager for detailed description.
23 *
24 * @author Jochen Thaeder
25 * @ingroup alihlt_tutorial
26 * @ingroup alihlt_homer
27 */
28
29Int_t HOMERManager() {
30
31 Int_t iResult = 0;
32
33 // -- Create new hM object
34 AliHLTHOMERManager *hM = new AliHLTHOMERManager();
35
36 printf( "== INITIALIZE ==\n" );
37
38 iResult = hM->Initialize();
39 if (iResult) return iResult;
40
41 printf( "== CREATE SOURCE LIST ==\n" );
42
43 iResult = hM->CreateSourcesList();
44 if (iResult) return iResult;
45
46 printf( "== CONNECT HOMER ==\n" );
47
9e78371d 48 // Empty argument should connect to all
49 //iResult = hM->ConnectHOMER();
50 iResult = hM->ConnectHOMER("HLT");
06272c83 51 if (iResult) return iResult;
52
4faff50e 53 printf( "== NEXT EVENT ==\n" );
06272c83 54
55 iResult = hM->NextEvent();
56 if (iResult) return iResult;
57
4faff50e 58 printf( "== LOOP OVER BLOCKS ==\n" );
59
60 TObject * object = NULL;
61
62 TIter next(hM->GetBlockList());
63 AliHLTHOMERBlockDesc* block = NULL;
64
65 while ((block = (AliHLTHOMERBlockDesc*)next())) {
66
d8691591 67 printf ( "Detector : %s\n" ,block->GetDetector().Data() );
4faff50e 68 printf ( "Datatype : %s\n" ,block->GetDataType().Data() );
69
d8691591 70 if ( block->IsTObject() ) {
4faff50e 71 object = block->GetTObject();
d8691591 72
73 printf("ClassName %s\n", block->GetClassName().Data() );
74 }
4faff50e 75 }
06272c83 76
77 // -- Destroy hM object
78 if (hM)
79 delete hM;
80 hM = NULL;
81
82 return iResult;;
83}