]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/SampleLib/AliHLTSampleMonitoringComponent.h
Changes for #90436: Misuse of TClonesArray containing AliESDMuonCluster
[u/mrichter/AliRoot.git] / HLT / SampleLib / AliHLTSampleMonitoringComponent.h
1 //-*- Mode: C++ -*-
2 // $Id$
3 #ifndef ALIHLTSAMPLEMONITORINGCOMPONENT_H
4 #define ALIHLTSAMPLEMONITORINGCOMPONENT_H
5
6 //* This file is property of and copyright by the ALICE HLT Project        * 
7 //* ALICE Experiment at CERN, All rights reserved.                         *
8 //* See cxx source for full Copyright notice                               */
9
10 /** @file   AliHLTSampleMonitoringComponent.h
11     @author Matthias Richter
12     @date   
13     @brief  A sample monitoring component for the HLT.
14 */
15
16 #include "AliHLTProcessor.h"
17
18 class TH1F;
19
20 /**
21  * @class AliHLTSampleMonitoringComponent
22  * An HLT sample component.
23  * This component does not any data processing at all. It just
24  * illustrates the existence of several components in ine library and
25  * allows to set up a very simple chain with different components.
26  *
27  * The component generates two histograms and accumulates random data
28  * as events are coming in. The two histograms are sent out via tree
29  * different approaches, see output data types.
30  *
31  * <h2>General properties:</h2>
32  *
33  * Component ID: \b Sample-MonitoringComponent <br>
34  * Library: \b libAliHLTSample.so     <br>
35  * Input Data Types: @ref kAliHLTAnyDataType <br>
36  *    in fact, the component ignores all incoming data blocks
37  *
38  * Output Data Types:
39  * \li {ROOT_TH1,EXPL}                                              <br>
40  *     one histogram per data block, specification identifies the
41  *     specific histogram.
42  * \li {ROOTOBJA,EXPL}                                              <br>
43  *     the two histograms are added to a TOBjArray which is pushed
44  *     to the output stream
45  * \li {ROOTTREE,EXPL}                                              <br>
46  *     the two histograms are added to a TTree which is pushed
47  *     to the output stream
48  *
49  * <h2>Mandatory arguments:</h2>
50  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
51  *
52  * <h2>Optional arguments:</h2>
53  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
54  * \li -push-histograms                              <br>
55  *      push histograms idividually
56  * \li -push-ttree (default)                         <br>
57  *      push histograms embedded in TTree
58  * \li -push-array                                   <br>
59  *      push histograms embedded in TObjArray
60  *
61  * <h2>Configuration:</h2>
62  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
63  *
64  * <h2>Default CDB entries:</h2>
65  * The component has no default CDB entry.
66  * It does not load any configuration from the global <tt>ConfigHLT</tt>
67  * folder.
68  * 
69  * For re-configuration/steering the component expects a TObjString object
70  * holding a string with the configuration parameters explained above.
71  *
72  * <h2>Performance:</h2>
73  * The component does not any event data processing.
74  *
75  * <h2>Memory consumption:</h2>
76  * The component does not any event data processing.
77  *
78  * <h2>Output size:</h2>
79  * The component has no output data.
80  *
81  * The component implements the @ref alihltcomponent-low-level-interface.
82  * for data processing.
83  *
84  * Using the latter case, a component can also be reconfigured. Special
85  * events are propageted through the chain in order to trigger the re-
86  * configuration. The component needs to implement the function
87  * @ref Reconfigure(). The simplest version of a configuration object is
88  * a string object (TObjString) containing configuration arguments.
89  *
90  * @ingroup alihlt_tutorial
91  */
92 class AliHLTSampleMonitoringComponent : public AliHLTProcessor {
93 public:
94   AliHLTSampleMonitoringComponent();
95   virtual ~AliHLTSampleMonitoringComponent();
96
97   // AliHLTComponent interface functions
98   const char* GetComponentID();
99   void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
100   AliHLTComponentDataType GetOutputDataType();
101   void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
102   AliHLTComponent* Spawn();
103
104  protected:
105   // AliHLTComponent interface functions
106   int DoInit( int argc, const char** argv );
107   int DoDeinit();
108   int DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
109   int Reconfigure(const char* cdbEntry, const char* chainId);
110
111   using AliHLTProcessor::DoEvent;
112
113 private:
114   /** copy constructor prohibited */
115   AliHLTSampleMonitoringComponent(const AliHLTSampleMonitoringComponent&);
116   /** assignment operator prohibited */
117   AliHLTSampleMonitoringComponent& operator=(const AliHLTSampleMonitoringComponent&);
118
119   /**
120    * Configure the component.
121    * Parse a string for the configuration arguments and set the component
122    * properties.
123    *
124    * This function illustrates the scanning of an argument string. The string
125    * was presumably fetched from the CDB.
126    */
127   int Configure(const char* arguments);
128
129   /** send histograms individually as data blocks */
130   bool fPushHistograms; // !transient
131
132   /** send histograms TTree embedded */
133   bool fPushTTree; // !transient
134
135   /** send histograms Object Array embedded */
136   bool fPushTObjArray; // !transient
137
138   /** test histogram */
139   TH1F* fHpx; //!transient
140
141   /** test histogram */
142   TH1F* fHpy; //!transient
143
144   ClassDef(AliHLTSampleMonitoringComponent, 0)
145 };
146 #endif