]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/BASE/AliHLTTriggerMenuSymbol.h
- moving AliHLTGlobalBarrelTrack to libAliHLTUtil to make it commonly
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTTriggerMenuSymbol.h
1 //-*- Mode: C++ -*-
2 // $Id:$
3 #ifndef ALIHLTTRIGGERMENUSYMBOL_H
4 #define ALIHLTTRIGGERMENUSYMBOL_H
5 /* This file is property of and copyright by the ALICE HLT Project        *
6  * ALICE Experiment at CERN, All rights reserved.                         *
7  * See cxx source for full Copyright notice                               */
8
9 /// @file   AliHLTTriggerMenuSymbol.h
10 /// @author Artur Szostak <artursz@iafrica.com>
11 /// @date   28 Dec 2008
12 /// @brief  Declaration of the AliHLTTriggerMenuSymbol class.
13
14 #include "TObject.h"
15 #include "TString.h"
16 #include "AliHLTDataTypes.h"
17 #include "AliHLTDomainEntry.h"
18
19 /**
20  * \class AliHLTTriggerMenuSymbol
21  * TODO
22  */
23 class AliHLTTriggerMenuSymbol : public TObject
24 {
25  public:
26   
27   /**
28    * Default constructor.
29    */
30   AliHLTTriggerMenuSymbol();
31   
32   /**
33    * Default destructor.
34    */
35   virtual ~AliHLTTriggerMenuSymbol();
36   
37   /**
38    * Inherited from TObject, this prints the contents of the symbol.
39    * \param option  Can be "compact", which will print in the compact format.
40    */
41   virtual void Print(Option_t* option = "") const;
42   
43   /**
44    * Returns the symbol name.
45    */
46   const char* Name() const { return fName.Data(); }
47   
48   /**
49    * Set the symbol name.
50    */
51   void Name(const char* value) { fName = value; }
52   
53   /**
54    * Returns the symbol data type.
55    */
56   const char* Type() const { return fType.Data(); }
57   
58   /**
59    * Set the symbol data type.
60    */
61   void Type(const char* value) { fType = value; }
62   
63   /**
64    * Returns the data block type and specification from which the symbol is fetched.
65    */
66   const AliHLTDomainEntry& BlockType() const { return fBlockType; }
67   
68   /**
69    * Set the data block type and specification from which the symbol is fetched.
70    * \param type  The data block type and origin to use.
71    */
72   void BlockType(const AliHLTComponentDataType& type)
73   {
74     fBlockType = AliHLTDomainEntry(type);
75   }
76   
77   /**
78    * Set the data block type and specification from which the symbol is fetched.
79    * \param blocktype  The data block type string of the data block. The value
80    *    kAliHLTAnyDataTypeID can be used to specify the any type wild card value.
81    * \param origin  The origin of the data block, such as the detector name.
82    *    The value kAliHLTDataOriginAny can be used to specify the any origin
83    *    wild card value.
84    */
85   void BlockType(const char* blocktype, const char* origin)
86   {
87     fBlockType = AliHLTDomainEntry(blocktype, origin);
88   }
89   
90   /**
91    * Set the data block type and specification from which the symbol is fetched.
92    * \param type  The data block type and origin to use.
93    * \param spec  The data block specification to use.
94    */
95   void BlockType(const AliHLTComponentDataType& type, UInt_t spec)
96   {
97     fBlockType = AliHLTDomainEntry(type, spec);
98   }
99   
100   /**
101    * Set the data block type and specification from which the symbol is fetched.
102    * \param blocktype  The data block type string of the data block. The value
103    *    kAliHLTAnyDataTypeID can be used to specify the any type wild card value.
104    * \param origin  The origin of the data block, such as the detector name.
105    *    The value kAliHLTDataOriginAny can be used to specify the any origin
106    *    wild card value.
107    * \param spec  The data block specification to use.
108    */
109   void BlockType(const char* blocktype, const char* origin, UInt_t spec)
110   {
111     fBlockType = AliHLTDomainEntry(blocktype, origin, spec);
112   }
113   
114   /**
115    * Returns the class name of the object in the data block.
116    */
117   const char* ObjectClass() const { return fClass.Data(); }
118   
119   /**
120    * Set the class name of the object in the data block.
121    */
122   void ObjectClass(const char* value) { fClass = value; }
123   
124   /**
125    * Returns the expression to assign the symbol value.
126    */
127   const char* AssignExpression() const { return fAssignExpr.Data(); }
128   
129   /**
130    * Set the expression to assign the symbol value.
131    * The keyword 'this' is used as the place holder of the object in the matched
132    * data block.
133    */
134   void AssignExpression(const char* value) { fAssignExpr = value; }
135   
136   /**
137    * Returns the default value expression.
138    */
139   const char* DefaultValue() const { return fDefaultValue.Data(); }
140   
141   /**
142    * Set the default value expression.
143    */
144   void DefaultValue(const char* value) { fDefaultValue = value; }
145
146  private:
147   
148   TString fName;  /// The name of the symbol (Must be a valid C++ variable name).
149   TString fType;  /// The data type of the symbol (Must be a valid C++ type name).
150   AliHLTDomainEntry fBlockType;  /// The data block type and specification this symbol is fetched from.
151   TString fClass;  /// The class name of the object to read from (Must be a valid C++ class name).
152   TString fAssignExpr;  /// The expression to assign to the symbol (Must be a valid C++ expression).
153   TString fDefaultValue;  /// The default value this symbol is set to (this must be a valid C++ expression).
154   
155   ClassDef(AliHLTTriggerMenuSymbol, 2) // Trigger menu item for global HLT trigger.
156 };
157
158 #endif // ALIHLTTRIGGERMENUSYMBOL_H
159