ROOT logo
//-*- Mode: C++ -*-
// $Id$
#ifndef ALIHLTCOMPONENTCONFIGURATION_H
#define ALIHLTCOMPONENTCONFIGURATION_H
//* This file is property of and copyright by the ALICE HLT Project        * 
//* ALICE Experiment at CERN, All rights reserved.                         *
//* See cxx source for full Copyright notice                               *

/// @file   AliHLTComponentConfiguration.h
/// @author Matthias Richter
/// @date   2010-11-26
/// @brief  HLT configuration description for a single component.
/// @note   The class is used in Offline (AliRoot) context

#include "AliHLTConfiguration.h"

/**
 * @class AliHLTComponentConfiguration
 * @brief Description of an HLT component configuration.
 *
 * In addition to the base class AliHLTConfiguration the additional online
 * component parameters are available in this class
 * - node name
 * - shared memory settings
 *
 * This class is only used in the HLT offline environment, see @ref alihlt_system
 * for more details.
 *
 * @ingroup alihlt_system
 */
class AliHLTComponentConfiguration : public AliHLTConfiguration {
 public:
  /**
   * standard constructor. The configuration is automatically registered in the
   * global configuration manager
   */
  AliHLTComponentConfiguration();
  /**
   * constructor. The configuration is automatically registered in the
   * global configuration manager
   * @param id         unique id of the configuration
   * @param component  component id
   * @param sources    blank separated list of source configuration ids
   * @param arguments  argument string passed to the component at initialization
   */
  AliHLTComponentConfiguration(const char* id, const char* component,
		      const char* sources, const char* arguments);
  /** copy constructor */
  AliHLTComponentConfiguration(const AliHLTComponentConfiguration& src);
  /** assignment op */
  AliHLTComponentConfiguration& operator=(const AliHLTComponentConfiguration& src);
  /** destructor */
  virtual ~AliHLTComponentConfiguration();

  /**
   * Return the component library.
   */
  const char* GetComponentLibrary() const {return fLibrary.Data();}

  /**
   * Return the online command.
   */
  const char* GetOnlineCommand() const {return fOnlineCommand.Data();}

  /**
   * Return the online nodes.
   */
  const char* GetNodeSettings() const {return fNodeNames.Data();}
  
  void SetComponentLibrary(const char* library) {fLibrary=library;}

  void SetNodeNames(const char* nodes) {fNodeNames=nodes;}

  void AddNode(const char* node) {
    if (!node) return;
    if (!fNodeNames.IsNull()) fNodeNames+=" "; fNodeNames+=node;
  }

  /// set the online command string
  void SetOnlineCommand(const char* cmd);

  /**
   * overloaded from AliHLTConfiguration
   */
  virtual void PrintStatus() const;

  /**
   * overloaded from AliHLTConfiguration
   * options:
   *   status  - print status
   */
  virtual void Print(const char* option="") const;


 protected:
  
 private:
  /// component library
  TString fLibrary; // component library

  /// list of nodes of the component instances
  TString fNodeNames; // list of node names

  /// original command in the online configuration
  TString fOnlineCommand; // original online command

  ClassDef(AliHLTComponentConfiguration, 1);
};

#endif
 AliHLTComponentConfiguration.h:1
 AliHLTComponentConfiguration.h:2
 AliHLTComponentConfiguration.h:3
 AliHLTComponentConfiguration.h:4
 AliHLTComponentConfiguration.h:5
 AliHLTComponentConfiguration.h:6
 AliHLTComponentConfiguration.h:7
 AliHLTComponentConfiguration.h:8
 AliHLTComponentConfiguration.h:9
 AliHLTComponentConfiguration.h:10
 AliHLTComponentConfiguration.h:11
 AliHLTComponentConfiguration.h:12
 AliHLTComponentConfiguration.h:13
 AliHLTComponentConfiguration.h:14
 AliHLTComponentConfiguration.h:15
 AliHLTComponentConfiguration.h:16
 AliHLTComponentConfiguration.h:17
 AliHLTComponentConfiguration.h:18
 AliHLTComponentConfiguration.h:19
 AliHLTComponentConfiguration.h:20
 AliHLTComponentConfiguration.h:21
 AliHLTComponentConfiguration.h:22
 AliHLTComponentConfiguration.h:23
 AliHLTComponentConfiguration.h:24
 AliHLTComponentConfiguration.h:25
 AliHLTComponentConfiguration.h:26
 AliHLTComponentConfiguration.h:27
 AliHLTComponentConfiguration.h:28
 AliHLTComponentConfiguration.h:29
 AliHLTComponentConfiguration.h:30
 AliHLTComponentConfiguration.h:31
 AliHLTComponentConfiguration.h:32
 AliHLTComponentConfiguration.h:33
 AliHLTComponentConfiguration.h:34
 AliHLTComponentConfiguration.h:35
 AliHLTComponentConfiguration.h:36
 AliHLTComponentConfiguration.h:37
 AliHLTComponentConfiguration.h:38
 AliHLTComponentConfiguration.h:39
 AliHLTComponentConfiguration.h:40
 AliHLTComponentConfiguration.h:41
 AliHLTComponentConfiguration.h:42
 AliHLTComponentConfiguration.h:43
 AliHLTComponentConfiguration.h:44
 AliHLTComponentConfiguration.h:45
 AliHLTComponentConfiguration.h:46
 AliHLTComponentConfiguration.h:47
 AliHLTComponentConfiguration.h:48
 AliHLTComponentConfiguration.h:49
 AliHLTComponentConfiguration.h:50
 AliHLTComponentConfiguration.h:51
 AliHLTComponentConfiguration.h:52
 AliHLTComponentConfiguration.h:53
 AliHLTComponentConfiguration.h:54
 AliHLTComponentConfiguration.h:55
 AliHLTComponentConfiguration.h:56
 AliHLTComponentConfiguration.h:57
 AliHLTComponentConfiguration.h:58
 AliHLTComponentConfiguration.h:59
 AliHLTComponentConfiguration.h:60
 AliHLTComponentConfiguration.h:61
 AliHLTComponentConfiguration.h:62
 AliHLTComponentConfiguration.h:63
 AliHLTComponentConfiguration.h:64
 AliHLTComponentConfiguration.h:65
 AliHLTComponentConfiguration.h:66
 AliHLTComponentConfiguration.h:67
 AliHLTComponentConfiguration.h:68
 AliHLTComponentConfiguration.h:69
 AliHLTComponentConfiguration.h:70
 AliHLTComponentConfiguration.h:71
 AliHLTComponentConfiguration.h:72
 AliHLTComponentConfiguration.h:73
 AliHLTComponentConfiguration.h:74
 AliHLTComponentConfiguration.h:75
 AliHLTComponentConfiguration.h:76
 AliHLTComponentConfiguration.h:77
 AliHLTComponentConfiguration.h:78
 AliHLTComponentConfiguration.h:79
 AliHLTComponentConfiguration.h:80
 AliHLTComponentConfiguration.h:81
 AliHLTComponentConfiguration.h:82
 AliHLTComponentConfiguration.h:83
 AliHLTComponentConfiguration.h:84
 AliHLTComponentConfiguration.h:85
 AliHLTComponentConfiguration.h:86
 AliHLTComponentConfiguration.h:87
 AliHLTComponentConfiguration.h:88
 AliHLTComponentConfiguration.h:89
 AliHLTComponentConfiguration.h:90
 AliHLTComponentConfiguration.h:91
 AliHLTComponentConfiguration.h:92
 AliHLTComponentConfiguration.h:93
 AliHLTComponentConfiguration.h:94
 AliHLTComponentConfiguration.h:95
 AliHLTComponentConfiguration.h:96
 AliHLTComponentConfiguration.h:97
 AliHLTComponentConfiguration.h:98
 AliHLTComponentConfiguration.h:99
 AliHLTComponentConfiguration.h:100
 AliHLTComponentConfiguration.h:101
 AliHLTComponentConfiguration.h:102
 AliHLTComponentConfiguration.h:103
 AliHLTComponentConfiguration.h:104
 AliHLTComponentConfiguration.h:105
 AliHLTComponentConfiguration.h:106
 AliHLTComponentConfiguration.h:107
 AliHLTComponentConfiguration.h:108
 AliHLTComponentConfiguration.h:109
 AliHLTComponentConfiguration.h:110