]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/BASE/AliHLTComponentConfiguration.cxx
#97492 Request to: patch AliSimulation; port to Release; make tag on release; for...
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTComponentConfiguration.cxx
CommitLineData
1388e0c7 1// $Id$
2
3///**************************************************************************
4///* This file is property of and copyright by the ALICE HLT Project *
5///* ALICE Experiment at CERN, All rights reserved. *
6///* *
7///* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
8///* for The ALICE HLT Project. *
9///* *
10///* Permission to use, copy, modify and distribute this software and its *
11///* documentation strictly for non-commercial purposes is hereby granted *
12///* without fee, provided that the above copyright notice appears in all *
13///* copies and that both the copyright notice and this permission notice *
14///* appear in the supporting documentation. The authors make no claims *
15///* about the suitability of this software for any purpose. It is *
16///* provided "as is" without express or implied warranty. *
17///**************************************************************************/
18
19/// @file AliHLTComponentConfiguration.cxx
20/// @author Matthias Richter
21/// @date 2010-11-26
22/// @brief HLT configuration description for a single component.
23/// @note The class is used in Offline (AliRoot) context
24
25#include "AliHLTComponentConfiguration.h"
26
27/** ROOT macro for the implementation of ROOT specific class methods */
28ClassImp(AliHLTConfiguration)
29
30AliHLTComponentConfiguration::AliHLTComponentConfiguration()
31 : AliHLTConfiguration()
32 , fLibrary()
33 , fNodeNames()
34 , fOnlineCommand()
35{
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
43AliHLTComponentConfiguration::AliHLTComponentConfiguration(const char* id,
44 const char* component,
45 const char* sources,
46 const char* arguments)
47 : AliHLTConfiguration(id, component, sources, arguments)
48 , fLibrary()
49 , fNodeNames()
50 , fOnlineCommand()
51{
52 // constructor
53}
54
55AliHLTComponentConfiguration::AliHLTComponentConfiguration(const AliHLTComponentConfiguration& src)
56 : AliHLTConfiguration(src)
57 , fLibrary(src.fLibrary)
58 , fNodeNames(src.fNodeNames)
59 , fOnlineCommand(src.fOnlineCommand)
60{
61 // copy constructor
62}
63
64AliHLTComponentConfiguration& AliHLTComponentConfiguration::operator=(const AliHLTComponentConfiguration& src)
65{
66 // assignment operator
67 if (this==&src) return *this;
68 AliHLTConfiguration::operator=(src);
69 fLibrary=src.fLibrary;
70 fNodeNames=src.fNodeNames;
71 fOnlineCommand=src.fOnlineCommand;
72 return *this;
73}
74
75AliHLTComponentConfiguration::~AliHLTComponentConfiguration()
76{
77 // destructor
78}
79
80void AliHLTComponentConfiguration::SetOnlineCommand(const char* cmd)
81{
82 // set the online command string
83
1388e0c7 84 fOnlineCommand=cmd;
85}
86
f84fefa5 87void AliHLTComponentConfiguration::PrintStatus() const
88{
89 // see header file for function documentation
90 HLTLogKeyword("configuration status");
91 if (!fLibrary.IsNull()) HLTMessage(" - component library: \"%s\"",
92 fLibrary.Data());
93 else HLTMessage(" - component library missing");
94 if (!fOnlineCommand.IsNull()) HLTMessage(" - online command: \"%s\"",
95 fOnlineCommand.Data());
96 else HLTMessage(" - online command missing");
97 if (!fNodeNames.IsNull()) HLTMessage(" - online nodes: \"%s\"",
98 fNodeNames.Data());
99 else HLTMessage(" - no online nodes");
100}
101
1388e0c7 102void AliHLTComponentConfiguration::Print(const char* option) const
103{
104 // print information
1388e0c7 105 AliHLTConfiguration::Print(option);
f84fefa5 106 if (option && strcmp(option, "status")==0) {
107 PrintStatus();
108 }
109 else {
110 HLTLogKeyword("configuration");
111 HLTMessage("component library %s, online command %s, online nodes %s",
112 GetComponentLibrary(),
113 GetOnlineCommand(),
114 GetNodeSettings()
115 );
116 }
1388e0c7 117}