]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/trigger/AliHLTTriggerAgent.h
Update master to aliroot
[u/mrichter/AliRoot.git] / HLT / trigger / AliHLTTriggerAgent.h
CommitLineData
89858ccc 1// $Id$
2
3#ifndef ALIHLTTRIGGERAGENT_H
4#define ALIHLTTRIGGERAGENT_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 AliHLTTriggerAgent.h
10 @author Matthias Richter
11 @date
12 @brief Agent of the libAliHLTTrigger library
13*/
14
15#include "AliHLTModuleAgent.h"
18a9a5ad 16#include "AliHLTOUTHandler.h"
89858ccc 17
18a9a5ad 18class AliESDEvent;
19class TArrayC;
8a8ea98b 20class TFile;
21class TTree;
89858ccc 22
23/**
24 * @class AliHLTTriggerAgent
25 * This is the agent for the AliHLTTrigger library.
26 *
27 * @ingroup alihlt_system
28 */
29class AliHLTTriggerAgent : public AliHLTModuleAgent {
30 public:
31 /**
32 * standard constructor. The agent is automatically registered in the
33 * global agent manager
34 */
35 AliHLTTriggerAgent();
36 /** destructor */
37 virtual ~AliHLTTriggerAgent();
38
39 int RegisterComponents(AliHLTComponentHandler* pHandler) const;
40
c86017ac 41 /**
42 * Inherited from AliHLTModuleAgent
43 * Register all configurations belonging to this module with the
44 * AliHLTConfigurationHandler. The agent can adapt the configurations
45 * to be registered to the current AliRoot setup by checking the
46 * runloader.
47 * @param handler the configuration handler
48 * @param rawReader AliRawReader instance
49 * @param runloader AliRoot runloader
50 * @return neg. error code if failed
51 */
52 int CreateConfigurations(AliHLTConfigurationHandler* handler,
53 AliRawReader* rawReader=NULL,
54 AliRunLoader* runloader=NULL) const;
55
56 /**
57 * Inherited from AliHLTModuleAgent
58 * Get the top configurations belonging to this module.
59 * A top configuration describes a processing chain. It can simply be
60 * described by the last configuration(s) in the chain.
61 * The agent can adapt the configurations to be registered to the current
62 * AliRoot setup by checking the runloader.
63 * @param rawReader AliRawReader instance
64 * @param runloader AliRoot runloader
65 * @return number of configurations, neg. error code if failed
66 */
67 const char* GetReconstructionChains(AliRawReader* rawReader=NULL,
68 AliRunLoader* runloader=NULL) const;
69
70 /**
71 * Inherited from AliHLTModuleAgent
72 * Component libraries which the configurations of this agent depend on.
73 * @return list of component libraries as a blank-separated string.
74 */
75 const char* GetRequiredComponentLibraries() const;
76
89858ccc 77 int GetHandlerDescription(AliHLTComponentDataType dt,
78 AliHLTUInt32_t spec,
79 AliHLTOUTHandlerDesc& desc) const;
80
81 AliHLTOUTHandler* GetOutputHandler(AliHLTComponentDataType dt, AliHLTUInt32_t spec);
82
83 int DeleteOutputHandler(AliHLTOUTHandler* pInstance);
84
18a9a5ad 85 /**
86 * The handler for trigger decision blocks in the HLTOUT stream.
87 */
88 class AliHLTTriggerDecisionHandler : public AliHLTOUTHandler {
89 public:
90 /** constructor */
91 AliHLTTriggerDecisionHandler();
92 /** destructor */
93 ~AliHLTTriggerDecisionHandler();
94
95 /**
96 * Process a data block.
97 * Decode specification and return equipment id of the data block.
98 * The data itsself i untouched.
99 * @return equipment id the block should be used for.
100 */
101 int ProcessData(AliHLTOUT* pData);
102
103 /** inherited from AliHLTOUTHandler */
104 int GetProcessedData(const AliHLTUInt8_t* &pData);
105
106 /** inherited from AliHLTOUTHandler */
107 int ReleaseProcessedData(const AliHLTUInt8_t* pData, int size);
108
8a8ea98b 109 /** write the temporary ESD to file */
110 int WriteESD();
111
18a9a5ad 112 private:
f1574126 113 /** copy constructor forbidden */
114 AliHLTTriggerDecisionHandler(const AliHLTTriggerDecisionHandler&);
115 /** assignment operator forbidden */
116 AliHLTTriggerDecisionHandler& operator=(const AliHLTTriggerDecisionHandler&);
117
18a9a5ad 118 AliESDEvent* fESD; //!
119 TArrayC* fpData; //!
120 int fSize; //!
8a8ea98b 121 TFile* fpESDfile; //!
122 TTree* fpESDtree; //!
18a9a5ad 123 };
89858ccc 124 protected:
125
126 private:
127 /** copy constructor prohibited */
128 AliHLTTriggerAgent(const AliHLTTriggerAgent&);
129 /** assignment operator prohibited */
130 AliHLTTriggerAgent& operator=(const AliHLTTriggerAgent&);
131
18a9a5ad 132 /** handler for trigger decision blocks */
133 AliHLTTriggerDecisionHandler* fTriggerDecisionHandler; //!
134
135 ClassDef(AliHLTTriggerAgent, 1);
89858ccc 136};
137
138#endif