]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/trigger/AliHLTTriggerMenuSymbol.cxx
Finished code for global HLT trigger and the trigger menu implementation.
[u/mrichter/AliRoot.git] / HLT / trigger / AliHLTTriggerMenuSymbol.cxx
1 /**************************************************************************
2  * This file is property of and copyright by the ALICE HLT Project        *
3  * ALICE Experiment at CERN, All rights reserved.                         *
4  *                                                                        *
5  * Primary Authors: Artur Szostak <artursz@iafrica.com>                   *
6  *                  for The ALICE HLT Project.                            *
7  *                                                                        *
8  * Permission to use, copy, modify and distribute this software and its   *
9  * documentation strictly for non-commercial purposes is hereby granted   *
10  * without fee, provided that the above copyright notice appears in all   *
11  * copies and that both the copyright notice and this permission notice   *
12  * appear in the supporting documentation. The authors make no claims     *
13  * about the suitability of this software for any purpose. It is          *
14  * provided "as is" without express or implied warranty.                  *
15  **************************************************************************/
16
17 /// @file   AliHLTTriggerMenuSymbol.cxx
18 /// @author Artur Szostak <artursz@iafrica.com>
19 /// @date   28 Dec 2008
20 /// @brief  Implementation of the AliHLTTriggerMenuSymbol class.
21 ///
22 /// The AliHLTTriggerMenuSymbol contains information about a symbol used in the
23 /// global HLT trigger menu.
24
25 #include "AliHLTTriggerMenuSymbol.h"
26 #include "Riostream.h"
27
28 ClassImp(AliHLTTriggerMenuSymbol)
29
30
31 AliHLTTriggerMenuSymbol::AliHLTTriggerMenuSymbol() :
32   TObject(),
33   fName(),
34   fType(),
35   fBlockType(kAliHLTAnyDataType),
36   fClass(),
37   fAssignExpr(),
38   fDefaultValue()
39 {
40   // Default constructor.
41 }
42
43
44 AliHLTTriggerMenuSymbol::~AliHLTTriggerMenuSymbol()
45 {
46   // Default destructor.
47 }
48
49
50 void AliHLTTriggerMenuSymbol::Print(Option_t* option) const
51 {
52   // Prints the contents of the trigger menu item.
53   
54   TString opt = option;
55   if (opt.Contains("compact"))
56   {
57     cout << setw(15) << fName << " | "
58          << setw(20) << fType << " | ";
59     fBlockType.Print("noendl");
60     cout << " | " << setw(20) << fClass.Data()
61          << " | " << setw(25) << fAssignExpr.Data()
62          << " | " << setw(25) << fDefaultValue.Data()
63          << setw(0) << endl;
64   }
65   else
66   {
67     cout << "                    Name = " << fName.Data() << endl;
68     cout << "               Data type = " << fType.Data() << endl;
69     cout << "              Block type = "; fBlockType.Print();
70     cout << "              Class type = " << fClass.Data() << endl;
71     cout << "   Assignment expression = " << fAssignExpr.Data() << endl;
72     cout << "Default value expression = " << fDefaultValue.Data() << endl;
73   }
74 }
75