LCOV - code coverage report
Current view: top level - HLT/BASE - AliHLTHOMERProxyHandler.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 1 100.0 %
Date: 2016-06-14 17:26:59 Functions: 1 8 12.5 %

          Line data    Source code
       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             : // -- -- -- -- -- -- -- 
      25             : #include "AliHLTLoggingVariadicFree.h"
      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             : 
      35             : class AliHLTHOMERProxyHandler : public TObject, public AliHLTLogging
      36             : {
      37             : public:
      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             : 
      62             :   /** Fill's source list, with entries 
      63             :    *  @return 0 on success, <0 for failure, 1 for no active service
      64             :    */
      65             :   Int_t FillSourceList(TList *srcList);
      66             : 
      67             :   ///////////////////////////////////////////////////////////////////////////////////
      68             : 
      69             : private:
      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 { 
      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 */
      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
     113             :    *  @return 0 on success, <0 for failure, 1 for no active service
     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         126 :   ClassDef(AliHLTHOMERProxyHandler, 0); // Handles HLT xml sources.
     145             : };
     146             : 
     147             : #endif

Generated by: LCOV version 1.11