]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/BASE/AliHLTTriggerMenuSymbol.cxx
Why the h*ll do we make a remote commit when pulling?
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTTriggerMenuSymbol.cxx
CommitLineData
f48dcb4e 1// $Id$
52f67e50 2/**************************************************************************
3 * This file is property of and copyright by the ALICE HLT Project *
4 * ALICE Experiment at CERN, All rights reserved. *
5 * *
6 * Primary Authors: Artur Szostak <artursz@iafrica.com> *
7 * for The ALICE HLT Project. *
8 * *
9 * Permission to use, copy, modify and distribute this software and its *
10 * documentation strictly for non-commercial purposes is hereby granted *
11 * without fee, provided that the above copyright notice appears in all *
12 * copies and that both the copyright notice and this permission notice *
13 * appear in the supporting documentation. The authors make no claims *
14 * about the suitability of this software for any purpose. It is *
15 * provided "as is" without express or implied warranty. *
16 **************************************************************************/
17
18/// @file AliHLTTriggerMenuSymbol.cxx
19/// @author Artur Szostak <artursz@iafrica.com>
20/// @date 28 Dec 2008
21/// @brief Implementation of the AliHLTTriggerMenuSymbol class.
22///
23/// The AliHLTTriggerMenuSymbol contains information about a symbol used in the
24/// global HLT trigger menu.
25
26#include "AliHLTTriggerMenuSymbol.h"
27#include "Riostream.h"
28
29ClassImp(AliHLTTriggerMenuSymbol)
30
31
32AliHLTTriggerMenuSymbol::AliHLTTriggerMenuSymbol() :
33 TObject(),
34 fName(),
35 fType(),
36 fBlockType(kAliHLTAnyDataType),
37 fClass(),
38 fAssignExpr(),
f48dcb4e 39 fDefaultValue(),
40 fRealName()
52f67e50 41{
42 // Default constructor.
43}
44
45
46AliHLTTriggerMenuSymbol::~AliHLTTriggerMenuSymbol()
47{
48 // Default destructor.
49}
50
51
52void AliHLTTriggerMenuSymbol::Print(Option_t* option) const
53{
54 // Prints the contents of the trigger menu item.
55
56 TString opt = option;
57 if (opt.Contains("compact"))
58 {
f925a066 59 cout << "{fRealName = \"" << fRealName.Data()
60 << "\", fType = \"" << fType.Data()
61 << "\", fBlockType = \"";
52f67e50 62 fBlockType.Print("noendl");
f925a066 63 cout << "\", fClass = \"" << fClass
64 << "\", fAssignExpr = \"" << fAssignExpr
65 << "\", fDefaultValue = \"" << fDefaultValue
66 << "\"}" << endl;
52f67e50 67 }
68 else
69 {
f48dcb4e 70 cout << " Name = " << Name() << endl;
71 cout << " RealName = " << RealName() << endl;
72 cout << " Data type = " << Type() << endl;
52f67e50 73 cout << " Block type = "; fBlockType.Print();
f48dcb4e 74 cout << " Class type = " << ObjectClass() << endl;
75 cout << " Assignment expression = " << AssignExpression() << endl;
76 cout << "Default value expression = " << DefaultValue() << endl;
52f67e50 77 }
78}
79
f48dcb4e 80
81const char* AliHLTTriggerMenuSymbol::RealName() const
82{
83 // return the real name of the symbol which can contain '-'
84
85 // backward compatibility with old versions of the class
86 if (fRealName.IsNull()) return fName;
87 return fRealName;
88}
89
90void AliHLTTriggerMenuSymbol::Name(const char* value)
91{
92 // sets the name and real name of the symbol
1788d826 93 // replaces '-' and '.' in the real name with '_' in order to comply with
94 // C++ conventions.
f48dcb4e 95 fRealName = value;
96 fName = value;
97 fName.ReplaceAll("-", "_");
1788d826 98 fName.ReplaceAll(".", "_");
f48dcb4e 99}