4 #ifndef ALIHLTCOMPSTATCOLLECTOR_H
5 #define ALIHLTCOMPSTATCOLLECTOR_H
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 *
10 /** @file AliHLTCompStatCollector.h
11 @author Matthias Richter
13 @brief Collector component for the component statistics information.
16 #include "AliHLTProcessor.h"
26 * @class AliHLTCompStatCollector
27 * Collector component for the statistics entries produced by the
28 * AliHLTComponent base class.
30 * <h2>General properties:</h2>
31 * This components collects all data blocks of types
32 * ::kAliHLTDataTypeComponentStatistics and ::kAliHLTDataTypeComponentTable
33 * which can be produced by the AliHLTComponent base class for every component
34 * and event. Component statistics entries are data blocks of
35 * ::AliHLTComponentStatistics arrays containing a couple of informations
36 * about each component. The information is extracted and stored into a
37 * TTree. The component table entries (AliHLTComponentTable structs) are sent
38 * on SOR and EOR events and are arranged in a TFolder hierarchy.
40 * Component ID: \b StatisticsCollector <br>
41 * Library: \b libAliHLTUtil.so <br>
42 * Input Data Types: kAliHLTDataTypeComponentStatistics <br>
43 * Output Data Types: kAliHLTDataTypeHistogram, kAliHLTDataTypeTNtuple <br>
45 * <h2>Mandatory arguments:</h2>
46 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
48 * <h2>Optional arguments:</h2>
50 * <h2>Configuration:</h2>
51 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
52 * Configuration by component arguments.
54 * <h2>Default CDB entries:</h2>
55 * The component loads no CDB entries.
57 * <h2>Performance:</h2>
59 * <h2>Memory consumption:</h2>
61 * <h2>Output size:</h2>
63 * @ingroup alihlt_util_components
65 class AliHLTCompStatCollector : public AliHLTProcessor
68 /** standard constructor */
69 AliHLTCompStatCollector();
71 virtual ~AliHLTCompStatCollector();
73 const char* GetComponentID() {return "StatisticsCollector";};
74 AliHLTComponent* Spawn() {return new AliHLTCompStatCollector;}
75 void GetInputDataTypes( vector<AliHLTComponentDataType>& );
76 AliHLTComponentDataType GetOutputDataType();
77 int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
78 void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
81 int DoInit( int argc, const char** argv );
83 int DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
85 using AliHLTProcessor::DoEvent;
88 /** not a valid copy constructor, defined according to effective C++ style */
89 AliHLTCompStatCollector(const AliHLTCompStatCollector&);
90 /** not a valid assignment op, but defined according to effective C++ style */
91 AliHLTCompStatCollector& operator=(const AliHLTCompStatCollector&);
94 * Reset all filling variables and lists.
96 void ResetFillingVariables();
99 * Fill the lists from the component statistics block.
101 int FillVariablesSorted(void* ptr, int size);
103 /** delete all internal objects */
107 * Remove entries from the parent list if they occur further down in the
110 int RemoveRecurrence(TFolder* pRoot) const;
112 /** event cycle timer */
113 TStopwatch* fpTimer; //!transient
116 TFolder* fpFolder; //!transient
118 /** statistics tree */
119 TTree* fpStatTree; //!transient
121 /** branch filling variable */
122 Float_t fCycleTime; //!transient
123 /** branch filling variable */
124 Int_t fNofSets; //!transient
126 UInt_t fArraySize; //!transient
127 /** current position */
128 UInt_t fPosition; //!transient
129 /** branch filling variable */
130 UInt_t* fpLevelArray; //!transient
131 /** branch filling variable */
132 UInt_t* fpSpecArray; //!transient
133 /** branch filling variable */
134 UInt_t* fpBlockNoArray; //!transient
135 /** branch filling variable */
136 UInt_t* fpIdArray; //!transient
137 /** branch filling variable */
138 UInt_t* fpTimeArray; //!transient
139 /** branch filling variable */
140 UInt_t* fpCTimeArray; //!transient
141 /** branch filling variable */
142 UInt_t* fpInputBlockCountArray; //!transient
143 /** branch filling variable */
144 UInt_t* fpTotalInputSizeArray; //!transient
145 /** branch filling variable */
146 UInt_t* fpOutputBlockCountArray; //!transient
147 /** branch filling variable */
148 UInt_t* fpTotalOutputSizeArray; //!transient
150 ClassDef(AliHLTCompStatCollector, 1)