]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveHLT/AliEveHOMERManager.cxx
From Svein Lindal:
[u/mrichter/AliRoot.git] / EVE / EveHLT / AliEveHOMERManager.cxx
1 //-*- Mode: C++ -*-
2
3 // $Id$
4 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
5 // Author: Jochen Thaeder <thaeder@kip.uni-heidelberg.de>                *
6 //         for The ALICE HLT Project.                                    *
7
8
9
10 /** @file   AliEveHOMERManager.cxx
11     @author Jochen Thaeder
12     @date
13     @brief  Manger for HOMER in offline
14 */
15
16 #if __GNUC__>= 3
17    using namespace std;
18 #endif
19
20 #include "AliEveHOMERManager.h"
21
22
23 ClassImp(AliEveHOMERManager)
24   
25 /*
26  * ---------------------------------------------------------------------------------
27  *                            Constructor / Destructor
28  * ---------------------------------------------------------------------------------
29  */
30   
31 //##################################################################################
32 AliEveHOMERManager::AliEveHOMERManager() :
33   AliHLTHOMERManager(), 
34   TEveElementList("Homer Manager"),
35   fSrcList(NULL) {
36   // see header file for class documentation
37   // or
38   // refer to README to build package
39   // or
40   // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
41 }
42
43 //##################################################################################
44 AliEveHOMERManager::~AliEveHOMERManager() {
45  // see header file for class documentation 
46
47   if (fSrcList)
48     delete fSrcList;
49   fSrcList = NULL;
50 }
51
52 /*
53  * ---------------------------------------------------------------------------------
54  *                                 Source Handling
55  * ---------------------------------------------------------------------------------
56  */
57
58 //##################################################################################
59 Int_t AliEveHOMERManager::CreateEveSourcesList() {
60   // see header file for class documentation
61
62   DestroyElements();
63
64   Int_t iResult = CreateSourcesList();
65   
66   fStateHasChanged = kTRUE;
67   
68   if ( iResult )
69     return iResult;
70
71   if (fSrcList)
72     delete fSrcList;
73   fSrcList = NULL;
74
75   // -- Create new AliEVE sources list 
76   fSrcList = new AliEveHOMERSourceList("HLT Sources");
77   fSrcList->SetManager(this);
78     
79   AddElement(fSrcList);
80   fSrcList->CreateByType();
81     
82   return iResult;
83  
84 }
85
86
87 //##################################################################################
88 Int_t AliEveHOMERManager::ConnectEVEtoHOMER() {
89   // see header file for class documentation
90
91   Int_t iResult = 0;
92   
93   fStateHasChanged = fSrcList->GetSelectedSources();
94   
95   cout<<"In ConnectEVEtoHOMER"<<endl;
96
97   iResult = ConnectHOMER();
98
99   
100   return iResult;
101  
102 }