]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/BASE/AliHLTTriggerMenuSymbol.cxx
- cleaning up debug output
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTTriggerMenuSymbol.cxx
1 // $Id$
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
29 ClassImp(AliHLTTriggerMenuSymbol)
30
31
32 AliHLTTriggerMenuSymbol::AliHLTTriggerMenuSymbol() :
33   TObject(),
34   fName(),
35   fType(),
36   fBlockType(kAliHLTAnyDataType),
37   fClass(),
38   fAssignExpr(),
39   fDefaultValue(),
40   fRealName()
41 {
42   // Default constructor.
43 }
44
45
46 AliHLTTriggerMenuSymbol::~AliHLTTriggerMenuSymbol()
47 {
48   // Default destructor.
49 }
50
51
52 void 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   {
59     cout << setw(15) << RealName() << " | "
60          << setw(20) << Type() << " | ";
61     fBlockType.Print("noendl");
62     cout << " | " << setw(20) << ObjectClass()
63          << " | " << setw(25) << AssignExpression()
64          << " | " << setw(25) << DefaultValue()
65          << setw(0) << endl;
66   }
67   else
68   {
69     cout << "                    Name = " << Name() << endl;
70     cout << "                RealName = " << RealName() << endl;
71     cout << "               Data type = " << Type() << endl;
72     cout << "              Block type = "; fBlockType.Print();
73     cout << "              Class type = " << ObjectClass() << endl;
74     cout << "   Assignment expression = " << AssignExpression() << endl;
75     cout << "Default value expression = " << DefaultValue() << endl;
76   }
77 }
78
79
80 const char* AliHLTTriggerMenuSymbol::RealName() const
81 {
82   // return the real name of the symbol which can contain '-'
83
84   // backward compatibility with old versions of the class
85   if (fRealName.IsNull()) return fName;
86   return fRealName;
87 }
88
89 void AliHLTTriggerMenuSymbol::Name(const char* value)
90 {
91   // sets the name and real name of the symbol
92   // replaces '-' of the real name with '_' in order to comply with
93   // C++ conventions
94   fRealName = value;
95   fName = value;
96   fName.ReplaceAll("-", "_");
97 }