#ifndef ALIHLTTTREEPROCESSOR_H
#define ALIHLTTTREEPROCESSOR_H
#include <list>
#include <TString.h>
#include "AliHLTProcessor.h"
class TTree;
class TH1;
class TStopwatch;
class AliHLTTTreeProcessor : public AliHLTProcessor {
private:
enum EDefaults {
kMaxEntries = 1000,
kDefaultNBins = 200,
kInterval = 5
};
public:
AliHLTTTreeProcessor();
virtual ~AliHLTTTreeProcessor();
virtual AliHLTComponentDataType GetOutputDataType();
virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
protected:
int DoInit(int argc, const char** argv);
int DoDeinit();
int DoEvent(const AliHLTComponentEventData& evtData,
AliHLTComponentTriggerData& trigData);
using AliHLTProcessor::DoEvent;
virtual int ScanConfigurationArgument(int argc, const char** argv);
class AliHLTHistogramDefinition {
public:
AliHLTHistogramDefinition()
: fName(), fSize(0), fExpr(), fTitle(), fCut(), fOpt()
{
}
const TString& GetName()const{return fName;}
void SetName(const TString& name){fName = name;}
int GetSize()const{return fSize;}
void SetSize(int size){fSize = size;}
const TString& GetExpression()const{return fExpr;}
void SetExpression(const TString& expr){fExpr = expr;}
const TString& GetTitle()const{return fTitle;}
void SetTitle(const TString& title){fTitle = title;}
const TString& GetCut()const{return fCut;}
void SetCut(const TString& cut){fCut = cut;}
const TString& GetDrawOption()const{return fOpt;}
void SetDrawOption(const TString& opt){fOpt = opt;}
private:
TString fName;
int fSize;
TString fExpr;
TString fTitle;
TString fCut;
TString fOpt;
};
std::list<AliHLTHistogramDefinition> fDefinitions;
typedef std::list<AliHLTHistogramDefinition>::iterator list_iterator;
typedef std::list<AliHLTHistogramDefinition>::const_iterator list_const_iterator;
private:
virtual TTree* CreateTree(int argc, const char** argv) = 0;
virtual int FillTree(TTree* pTree, const AliHLTComponentEventData& evtData,
AliHLTComponentTriggerData& trigData ) = 0;
virtual AliHLTComponentDataType GetOriginDataType()const = 0;
virtual AliHLTUInt32_t GetDataSpec()const {return fUniqueId;}
virtual void FillHistogramDefinitions() = 0;
TH1* CreateHistogram(const AliHLTHistogramDefinition& def);
int ParseHistogramDefinition(int argc, const char** argv, int pos, AliHLTHistogramDefinition& dst)const;
TTree* fTree;
int fMaxEntries;
unsigned fPublishInterval;
unsigned fLastTime;
TStopwatch* fpEventTimer;
TStopwatch* fpCycleTimer;
AliHLTUInt32_t fMaxMemory;
AliHLTUInt32_t fMaxEventTime;
AliHLTUInt32_t fNofEventsForce;
AliHLTUInt32_t fForcedEventsCount;
AliHLTUInt32_t fSkippedEventsCount;
AliHLTUInt32_t fNewEventsCount;
AliHLTUInt32_t fUniqueId;
AliHLTUInt32_t fIgnoreCycleTime;
float fCycleTimeFactor;
static const AliHLTUInt32_t fgkTimeScale;
AliHLTTTreeProcessor(const AliHLTTTreeProcessor&);
AliHLTTTreeProcessor& operator = (const AliHLTTTreeProcessor&);
ClassDef(AliHLTTTreeProcessor, 0)
};
#endif
AliHLTTTreeProcessor.h:10 AliHLTTTreeProcessor.h:11 AliHLTTTreeProcessor.h:12 AliHLTTTreeProcessor.h:13 AliHLTTTreeProcessor.h:14 AliHLTTTreeProcessor.h:15 AliHLTTTreeProcessor.h:16 AliHLTTTreeProcessor.h:17 AliHLTTTreeProcessor.h:18 AliHLTTTreeProcessor.h:19 AliHLTTTreeProcessor.h:20 AliHLTTTreeProcessor.h:21 AliHLTTTreeProcessor.h:22 AliHLTTTreeProcessor.h:23 AliHLTTTreeProcessor.h:24 AliHLTTTreeProcessor.h:25 AliHLTTTreeProcessor.h:26 AliHLTTTreeProcessor.h:27 AliHLTTTreeProcessor.h:28 AliHLTTTreeProcessor.h:29 AliHLTTTreeProcessor.h:30 AliHLTTTreeProcessor.h:31 AliHLTTTreeProcessor.h:32 AliHLTTTreeProcessor.h:33 AliHLTTTreeProcessor.h:34 AliHLTTTreeProcessor.h:35 AliHLTTTreeProcessor.h:36 AliHLTTTreeProcessor.h:37 AliHLTTTreeProcessor.h:38 AliHLTTTreeProcessor.h:39 AliHLTTTreeProcessor.h:40 AliHLTTTreeProcessor.h:41 AliHLTTTreeProcessor.h:42 AliHLTTTreeProcessor.h:43 AliHLTTTreeProcessor.h:44 AliHLTTTreeProcessor.h:45 AliHLTTTreeProcessor.h:46 AliHLTTTreeProcessor.h:47 AliHLTTTreeProcessor.h:48 AliHLTTTreeProcessor.h:49 AliHLTTTreeProcessor.h:50 AliHLTTTreeProcessor.h:51 AliHLTTTreeProcessor.h:52 AliHLTTTreeProcessor.h:53 AliHLTTTreeProcessor.h:54 AliHLTTTreeProcessor.h:55 AliHLTTTreeProcessor.h:56 AliHLTTTreeProcessor.h:57 AliHLTTTreeProcessor.h:58 AliHLTTTreeProcessor.h:59 AliHLTTTreeProcessor.h:60 AliHLTTTreeProcessor.h:61 AliHLTTTreeProcessor.h:62 AliHLTTTreeProcessor.h:63 AliHLTTTreeProcessor.h:64 AliHLTTTreeProcessor.h:65 AliHLTTTreeProcessor.h:66 AliHLTTTreeProcessor.h:67 AliHLTTTreeProcessor.h:68 AliHLTTTreeProcessor.h:69 AliHLTTTreeProcessor.h:70 AliHLTTTreeProcessor.h:71 AliHLTTTreeProcessor.h:72 AliHLTTTreeProcessor.h:73 AliHLTTTreeProcessor.h:74 AliHLTTTreeProcessor.h:75 AliHLTTTreeProcessor.h:76 AliHLTTTreeProcessor.h:77 AliHLTTTreeProcessor.h:78 AliHLTTTreeProcessor.h:79 AliHLTTTreeProcessor.h:80 AliHLTTTreeProcessor.h:81 AliHLTTTreeProcessor.h:82 AliHLTTTreeProcessor.h:83 AliHLTTTreeProcessor.h:84 AliHLTTTreeProcessor.h:85 AliHLTTTreeProcessor.h:86 AliHLTTTreeProcessor.h:87 AliHLTTTreeProcessor.h:88 AliHLTTTreeProcessor.h:89 AliHLTTTreeProcessor.h:90 AliHLTTTreeProcessor.h:91 AliHLTTTreeProcessor.h:92 AliHLTTTreeProcessor.h:93 AliHLTTTreeProcessor.h:94 AliHLTTTreeProcessor.h:95 AliHLTTTreeProcessor.h:96 AliHLTTTreeProcessor.h:97 AliHLTTTreeProcessor.h:98 AliHLTTTreeProcessor.h:99 AliHLTTTreeProcessor.h:100 AliHLTTTreeProcessor.h:101 AliHLTTTreeProcessor.h:102 AliHLTTTreeProcessor.h:103 AliHLTTTreeProcessor.h:104 AliHLTTTreeProcessor.h:105 AliHLTTTreeProcessor.h:106 AliHLTTTreeProcessor.h:107 AliHLTTTreeProcessor.h:108 AliHLTTTreeProcessor.h:109 AliHLTTTreeProcessor.h:110 AliHLTTTreeProcessor.h:111 AliHLTTTreeProcessor.h:112 AliHLTTTreeProcessor.h:113 AliHLTTTreeProcessor.h:114 AliHLTTTreeProcessor.h:115 AliHLTTTreeProcessor.h:116 AliHLTTTreeProcessor.h:117 AliHLTTTreeProcessor.h:118 AliHLTTTreeProcessor.h:119 AliHLTTTreeProcessor.h:120 AliHLTTTreeProcessor.h:121 AliHLTTTreeProcessor.h:122 AliHLTTTreeProcessor.h:123 AliHLTTTreeProcessor.h:124 AliHLTTTreeProcessor.h:125 AliHLTTTreeProcessor.h:126 AliHLTTTreeProcessor.h:127 AliHLTTTreeProcessor.h:128 AliHLTTTreeProcessor.h:129 AliHLTTTreeProcessor.h:130 AliHLTTTreeProcessor.h:131 AliHLTTTreeProcessor.h:132 AliHLTTTreeProcessor.h:133 AliHLTTTreeProcessor.h:134 AliHLTTTreeProcessor.h:135 AliHLTTTreeProcessor.h:136 AliHLTTTreeProcessor.h:137 AliHLTTTreeProcessor.h:138 AliHLTTTreeProcessor.h:139 AliHLTTTreeProcessor.h:140 AliHLTTTreeProcessor.h:141 AliHLTTTreeProcessor.h:142 AliHLTTTreeProcessor.h:143 AliHLTTTreeProcessor.h:144 AliHLTTTreeProcessor.h:145 AliHLTTTreeProcessor.h:146 AliHLTTTreeProcessor.h:147 AliHLTTTreeProcessor.h:148 AliHLTTTreeProcessor.h:149 AliHLTTTreeProcessor.h:150 AliHLTTTreeProcessor.h:151 AliHLTTTreeProcessor.h:152 AliHLTTTreeProcessor.h:153 AliHLTTTreeProcessor.h:154 AliHLTTTreeProcessor.h:155 AliHLTTTreeProcessor.h:156 AliHLTTTreeProcessor.h:157 AliHLTTTreeProcessor.h:158 AliHLTTTreeProcessor.h:159 AliHLTTTreeProcessor.h:160 AliHLTTTreeProcessor.h:161 AliHLTTTreeProcessor.h:162