]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/BASE/AliHLTHOMERProxyHandler.h
Adding new data type.
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTHOMERProxyHandler.h
CommitLineData
06272c83 1//-*- Mode: C++ -*-
2
3// $Id: AliHLTHOMERProxyHandler.h $
4
5#ifndef ALIHLTHOMERPROXYHANDLER_H
6#define ALIHLTHOMERPROXYHANDLER_H
7
8/* This file is property of and copyright by the ALICE HLT Project *
9 * ALICE Experiment at CERN, All rights reserved. *
10 * See cxx source for full Copyright notice
11 */
12
13/** @file AliHLTHOMERProxyHandler.h
14 @author Jochen Thaeder
15 @date
16 @brief HOMER proxy handler for HomerManger
17*/
18
19#include "TString.h"
20#include "TList.h"
21#include "TXMLNode.h"
22// -- -- -- -- -- -- --
23#include "AliHLTHOMERSourceDesc.h"
24// -- -- -- -- -- -- --
b6bb7ca3 25#include "AliHLTLoggingVariadicFree.h"
06272c83 26
27/**
28 * @class AliHLTHOMERProxyHandler
29 * This Class should handle the communication with the proxy
30 * and fill the source list.
31 *
32 * @ingroup alihlt_homer
33 */
34
b6bb7ca3 35class AliHLTHOMERProxyHandler : public TObject, public AliHLTLogging
06272c83 36{
37public:
38
39 /*
40 * ---------------------------------------------------------------------------------
41 * Constructor / Destructor
42 * ---------------------------------------------------------------------------------
43 */
44
45 /** constructor */
46 AliHLTHOMERProxyHandler();
47
48 /** destructor */
49 virtual ~AliHLTHOMERProxyHandler();
50
51 /** Initialize
52 * @return 0 on success, <0 for failure
53 */
54 Int_t Initialize();
55
56 /*
57 * ---------------------------------------------------------------------------------
58 * Source List - public
59 * ---------------------------------------------------------------------------------
60 */
61
ae17e63c 62 /** Fill's source list, with entries
63 * @return 0 on success, <0 for failure, 1 for no active service
64 */
06272c83 65 Int_t FillSourceList(TList *srcList);
66
67 ///////////////////////////////////////////////////////////////////////////////////
68
69private:
70
71 /** copy constructor prohibited */
72 AliHLTHOMERProxyHandler(const AliHLTHOMERProxyHandler&); // Not implemented.
73
74 /** assignment operator prohibited */
75 AliHLTHOMERProxyHandler& operator=(const AliHLTHOMERProxyHandler&); // Not implemented.
76
77 /*
78 * ---------------------------------------------------------------------------------
79 * Realms - private
80 * ---------------------------------------------------------------------------------
81 */
82
83 /** Realms */
84 enum HOMERRealms_t {
cfa641b1 85 kHLT, /**< HLT realm */
86 kACR, /**< ACR realm */
87 kGPN, /**< GPN realm */
88 kKIP, /**< KIP realm */
89 kLoc, /**< Local realm. needs ssh tunnel */
90 kHOMERRealmsMax /**< Number of enum entries */
06272c83 91 };
92
93 /** Array of proxy nodes per realm */
94 static const Char_t *fgkHOMERProxyNode[];
95
96 /** Indentifies the realm and sets it
97 * @return 0 on success, <0 for failure
98 */
99 void IdentifyRealm();
100
101 /*
102 * ---------------------------------------------------------------------------------
103 * Proxy Communication - private
104 * ---------------------------------------------------------------------------------
105 */
106
107 /** Get xmlrpc response from the proxy
108 * @return 0 on success, <0 for failure
109 */
110 Int_t RequestXmlRpcResponse();
111
112 /** process xmlrpc response and fill the source list
ae17e63c 113 * @return 0 on success, <0 for failure, 1 for no active service
06272c83 114 */
115 Int_t ProcessXmlRpcResponse();
116
117 /*
118 * ---------------------------------------------------------------------------------
119 * Source Resolving - private
120 * ---------------------------------------------------------------------------------
121 */
122
123 /** Add a new Service to list
124 * @param xmlNode Ptr to service node
125 * @return 0 on sucess, <0 for failure
126 */
127 Int_t AddService(TXMLNode *innerNode);
128
129 /*
130 * ---------------------------------------------------------------------------------
131 * Members - private
132 * ---------------------------------------------------------------------------------
133 */
134
135 /** Realm, which can be ACR, GPN, HLT, KIP */
136 Int_t fRealm; // see above
137
138 /** xmlRPC response */
139 TString fXmlRpcResponse; // see above
140
141 /** List to HOMER sources */
142 TList* fSourceList; //! transient
143
144 ClassDef(AliHLTHOMERProxyHandler, 0); // Handles HLT xml sources.
145};
146
147#endif