3 #ifndef ALIHLTCONSUMERDESCRIPTOR_H
4 #define ALIHLTCONSUMERDESCRIPTOR_H
5 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
8 /** @file AliHLTConsumerDescriptor.h
9 @author Matthias Richter
11 @brief Helper class to describe a consumer component.
12 @note The class is used in Offline (AliRoot) context
15 #include "AliHLTDataBuffer.h"
18 * @class AliHLTConsumerDescriptor
19 * @brief Helper class to describe a consumer component.
21 * There is unfortunately no unique determination of the data type from the
22 * component itself possible, thats why both component and data type have to
23 * be initialized and are stored in a compound. The class is intended to make
26 * @note This class is only used for the @ref alihlt_system.
28 * @ingroup alihlt_system
30 class AliHLTConsumerDescriptor : public TObject, public AliHLTLogging {
32 /** standard constructur */
33 AliHLTConsumerDescriptor();
35 * @param pConsumer pointer to the consumer component
37 AliHLTConsumerDescriptor(AliHLTComponent* pConsumer);
38 /** not a valid copy constructor, defined according to effective C++ style */
39 AliHLTConsumerDescriptor(const AliHLTConsumerDescriptor&);
40 /** not a valid assignment op, but defined according to effective C++ style */
41 AliHLTConsumerDescriptor& operator=(const AliHLTConsumerDescriptor&);
43 ~AliHLTConsumerDescriptor();
46 * Get the component of this descriptor.
47 * @return pointer to the component
49 AliHLTComponent* GetComponent() {return fpConsumer;}
52 * Set an active data segment.
53 * the pointer will be handled in a container, no allocation, copy or
55 * @param offset offset of the segment in the buffer
56 * @param size size of the segment in the buffer
57 * @return >=0 if succeeded
59 int SetActiveDataSegment(AliHLTUInt32_t offset, AliHLTUInt32_t size);
62 * Check whether there is an active data segment of certain size with
64 * @param offset offset of the data segment in the data buffer
65 * @param size size of the data segment in the data buffer
66 * @return > if existend, 0 if not
68 int CheckActiveDataSegment(AliHLTUInt32_t offset, AliHLTUInt32_t size);
70 /** find an active data segment of certain size with certain offset
71 * will see if this is necessary
72 * @param offset offset of the data segment in the data buffer
73 * @param size size of the data segment in the data buffer
74 * @return offset of the data segment
76 //AliHLTUInt32_t FindActiveDataSegment(AliHLTUInt32_t offset, AliHLTUInt32_t size);
78 /** get the number of active segments for this consumer
79 * @return number of active segments
81 int GetNofActiveSegments() {return fSegments.size();};
85 int ReleaseActiveDataSegment(AliHLTUInt32_t offset, AliHLTUInt32_t size);
88 /** consumer object */
89 AliHLTComponent* fpConsumer; //! transient
91 /** list of data segments */
92 vector<AliHLTDataBuffer::AliHLTDataSegment> fSegments; // see above
94 ClassDef(AliHLTConsumerDescriptor, 0)
97 #endif // ALIHLTDATABUFFER_H