Line data Source code
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 */
28 126 : ClassImp(AliHLTConfiguration)
29 :
30 : AliHLTComponentConfiguration::AliHLTComponentConfiguration()
31 0 : : AliHLTConfiguration()
32 0 : , fLibrary()
33 0 : , fNodeNames()
34 0 : , fOnlineCommand()
35 0 : {
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 0 : }
42 :
43 : AliHLTComponentConfiguration::AliHLTComponentConfiguration(const char* id,
44 : const char* component,
45 : const char* sources,
46 : const char* arguments)
47 0 : : AliHLTConfiguration(id, component, sources, arguments)
48 0 : , fLibrary()
49 0 : , fNodeNames()
50 0 : , fOnlineCommand()
51 0 : {
52 : // constructor
53 0 : }
54 :
55 : AliHLTComponentConfiguration::AliHLTComponentConfiguration(const AliHLTComponentConfiguration& src)
56 0 : : AliHLTConfiguration(src)
57 0 : , fLibrary(src.fLibrary)
58 0 : , fNodeNames(src.fNodeNames)
59 0 : , fOnlineCommand(src.fOnlineCommand)
60 0 : {
61 : // copy constructor
62 0 : }
63 :
64 : AliHLTComponentConfiguration& AliHLTComponentConfiguration::operator=(const AliHLTComponentConfiguration& src)
65 : {
66 : // assignment operator
67 0 : if (this==&src) return *this;
68 0 : AliHLTConfiguration::operator=(src);
69 0 : fLibrary=src.fLibrary;
70 0 : fNodeNames=src.fNodeNames;
71 0 : fOnlineCommand=src.fOnlineCommand;
72 0 : return *this;
73 0 : }
74 :
75 0 : AliHLTComponentConfiguration::~AliHLTComponentConfiguration()
76 0 : {
77 : // destructor
78 0 : }
79 :
80 : void AliHLTComponentConfiguration::SetOnlineCommand(const char* cmd)
81 : {
82 : // set the online command string
83 :
84 0 : fOnlineCommand=cmd;
85 0 : }
86 :
87 : void AliHLTComponentConfiguration::PrintStatus() const
88 : {
89 : // see header file for function documentation
90 0 : HLTLogKeyword("configuration status");
91 0 : if (!fLibrary.IsNull()) HLTMessage(" - component library: \"%s\"",
92 : fLibrary.Data());
93 0 : else HLTMessage(" - component library missing");
94 0 : if (!fOnlineCommand.IsNull()) HLTMessage(" - online command: \"%s\"",
95 : fOnlineCommand.Data());
96 0 : else HLTMessage(" - online command missing");
97 0 : if (!fNodeNames.IsNull()) HLTMessage(" - online nodes: \"%s\"",
98 : fNodeNames.Data());
99 0 : else HLTMessage(" - no online nodes");
100 0 : }
101 :
102 : void AliHLTComponentConfiguration::Print(const char* option) const
103 : {
104 : // print information
105 0 : AliHLTConfiguration::Print(option);
106 0 : if (option && strcmp(option, "status")==0) {
107 0 : PrintStatus();
108 0 : }
109 : else {
110 0 : HLTLogKeyword("configuration");
111 0 : HLTMessage("component library %s, online command %s, online nodes %s",
112 : GetComponentLibrary(),
113 : GetOnlineCommand(),
114 : GetNodeSettings()
115 : );
116 0 : }
117 0 : }
|