]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/BASE/AliHLTConsumerDescriptor.h
removing the CTPData from the HLTGlobalTrigger decision because of bug #88431 until...
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTConsumerDescriptor.h
CommitLineData
12c8715e 1//-*- Mode: C++ -*-
2// $Id$
6235cd38 3
4#ifndef ALIHLTCONSUMERDESCRIPTOR_H
5#define ALIHLTCONSUMERDESCRIPTOR_H
12c8715e 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 *
6235cd38 9
12c8715e 10/// @file AliHLTConsumerDescriptor.h
11/// @author Matthias Richter
12/// @date
13/// @brief Helper class to describe a consumer component.
14/// @note The class is used in Offline (AliRoot) context
6235cd38 15
16#include "AliHLTDataBuffer.h"
17
18/**
19 * @class AliHLTConsumerDescriptor
20 * @brief Helper class to describe a consumer component.
21 *
22 * There is unfortunately no unique determination of the data type from the
23 * component itself possible, thats why both component and data type have to
24 * be initialized and are stored in a compound. The class is intended to make
25 * bookkeeping easier.
26 *
27 * @note This class is only used for the @ref alihlt_system.
28 *
29 * @ingroup alihlt_system
30 */
31class AliHLTConsumerDescriptor : public TObject, public AliHLTLogging {
32 public:
33 /** standard constructur */
34 AliHLTConsumerDescriptor();
35 /** constructur
36 * @param pConsumer pointer to the consumer component
37 */
38 AliHLTConsumerDescriptor(AliHLTComponent* pConsumer);
6235cd38 39 /** destructor */
40 ~AliHLTConsumerDescriptor();
41
42 /**
43 * Get the component of this descriptor.
44 * @return pointer to the component
45 */
46 AliHLTComponent* GetComponent() {return fpConsumer;}
47
48 /**
49 * Set an active data segment.
50 * the pointer will be handled in a container, no allocation, copy or
51 * cleanup.
b46ca65e 52 * @param segment segment descriptor
6235cd38 53 * @return >=0 if succeeded
54 */
b46ca65e 55 int SetActiveDataSegment(AliHLTDataBuffer::AliHLTDataSegment segment);
6235cd38 56
57 /**
58 * Check whether there is an active data segment of certain size with
59 * certain offset.
b46ca65e 60 * @param segment segment descriptor
6235cd38 61 * @return > if existend, 0 if not
62 */
b46ca65e 63 int CheckActiveDataSegment(AliHLTDataBuffer::AliHLTDataSegment segment);
6235cd38 64
65 /** find an active data segment of certain size with certain offset
66 * will see if this is necessary
67 * @param offset offset of the data segment in the data buffer
68 * @param size size of the data segment in the data buffer
69 * @return offset of the data segment
70 */
71 //AliHLTUInt32_t FindActiveDataSegment(AliHLTUInt32_t offset, AliHLTUInt32_t size);
72
73 /** get the number of active segments for this consumer
74 * @return number of active segments
75 */
76 int GetNofActiveSegments() {return fSegments.size();};
77
78 /**
b46ca65e 79 * @param segment segment descriptor
6235cd38 80 */
b46ca65e 81 int ReleaseActiveDataSegment(AliHLTDataBuffer::AliHLTDataSegment segment);
6235cd38 82
12c8715e 83 virtual void Print(const char* option) const;
84
6235cd38 85 private:
b426991e 86 /** copy constructor prohibited */
87 AliHLTConsumerDescriptor(const AliHLTConsumerDescriptor&);
88 /** assignment operator prohibited */
89 AliHLTConsumerDescriptor& operator=(const AliHLTConsumerDescriptor&);
90
6235cd38 91 /** consumer object */
92 AliHLTComponent* fpConsumer; //! transient
93
94 /** list of data segments */
95 vector<AliHLTDataBuffer::AliHLTDataSegment> fSegments; // see above
96
97 ClassDef(AliHLTConsumerDescriptor, 0)
98};
99
12c8715e 100#endif // ALIHLTCONSUMERDESCRIPTOR_H