]>
Commit | Line | Data |
---|---|---|
a34b6698 | 1 | \section{Ali\-HLTData\-Buffer Class Reference} |
2 | \label{classAliHLTDataBuffer}\index{AliHLTDataBuffer@{AliHLTDataBuffer}} | |
3 | {\tt \#include $<$Ali\-HLTData\-Buffer.h$>$} | |
4 | ||
5 | Inheritance diagram for Ali\-HLTData\-Buffer::\begin{figure}[H] | |
6 | \begin{center} | |
7 | \leavevmode | |
8 | \includegraphics[height=2cm]{classAliHLTDataBuffer} | |
9 | \end{center} | |
10 | \end{figure} | |
11 | ||
12 | ||
13 | \subsection{Detailed Description} | |
14 | Handling of data buffers for the HLT. | |
15 | ||
16 | The class provides handling of data buffers for HLT tasks. Each task gets its own Data Buffer instance. The buffer is grouped into different data segments according to the output of the component.\par | |
17 | The Data Buffer keeps control over the data requests of the 'child' components. Each component can subscribe to a certain segment of the data buffer. It's state is then changed from 'reserved' to 'active'. After the data processing, the component has to release the segment and it's state is set to 'processed'. If all components have requested and released their data, the Raw Buffer is released and pushed back in the list of available buffers. | |
18 | ||
19 | \begin{Desc} | |
20 | \item[Note:]This class is only used for the {\bf HLT integration into Ali\-Root}{\rm (p.\,\pageref{group__alihlt__system})}. \end{Desc} | |
21 | ||
22 | ||
23 | ||
24 | ||
25 | Definition at line 41 of file Ali\-HLTData\-Buffer.h.\subsection*{Public Member Functions} | |
26 | \begin{CompactItemize} | |
27 | \item | |
28 | {\bf Ali\-HLTData\-Buffer} () | |
29 | \item | |
30 | {\bf Ali\-HLTData\-Buffer} (const {\bf Ali\-HLTData\-Buffer} \&) | |
31 | \item | |
32 | {\bf Ali\-HLTData\-Buffer} \& {\bf operator=} (const {\bf Ali\-HLTData\-Buffer} \&) | |
33 | \item | |
34 | virtual {\bf $\sim$Ali\-HLTData\-Buffer} () | |
35 | \item | |
36 | int {\bf Set\-Consumer} ({\bf Ali\-HLTComponent} $\ast$p\-Consumer) | |
37 | \item | |
38 | int {\bf Find\-Matching\-Data\-Blocks} (const {\bf Ali\-HLTComponent} $\ast$p\-Consumer, vector$<$ {\bf Ali\-HLTComponent\-Data\-Type} $>$ $\ast$tgt\-List=NULL) | |
39 | \item | |
40 | int {\bf Subscribe} (const {\bf Ali\-HLTComponent} $\ast$p\-Consumer, {\bf Ali\-HLTComponent\-Block\-Data} $\ast$array\-Block\-Desc, int i\-Array\-Size) | |
41 | \item | |
42 | int {\bf Release} ({\bf Ali\-HLTComponent\-Block\-Data} $\ast$p\-Block\-Desc, const {\bf Ali\-HLTComponent} $\ast$p\-Consumer) | |
43 | \item | |
44 | {\bf Ali\-HLTUInt8\_\-t} $\ast$ {\bf Get\-Target\-Buffer} (int i\-Min\-Size) | |
45 | \item | |
46 | int {\bf Set\-Segments} ({\bf Ali\-HLTUInt8\_\-t} $\ast$p\-Tgt, {\bf Ali\-HLTComponent\-Block\-Data} $\ast$array\-Segments, int i\-Size) | |
47 | \item | |
48 | int {\bf Is\-Empty} () | |
49 | \item | |
50 | int {\bf Get\-Nof\-Segments} () | |
51 | \item | |
52 | int {\bf Get\-Nof\-Consumers} () | |
53 | \item | |
54 | int {\bf Get\-Nof\-Active\-Consumers} () | |
55 | \item | |
56 | int {\bf Find\-Consumer} ({\bf Ali\-HLTComponent} $\ast$p\-Consumer, int b\-All\-Lists=1) | |
57 | \item | |
58 | int {\bf Reset} () | |
59 | \end{CompactItemize} | |
60 | \subsection*{Private Member Functions} | |
61 | \begin{CompactItemize} | |
62 | \item | |
63 | int {\bf Find\-Matching\-Data\-Segments} (const {\bf Ali\-HLTComponent} $\ast$p\-Consumer, vector$<$ {\bf Ali\-HLTData\-Buffer::Ali\-HLTData\-Segment} $>$ \&tgt\-List) | |
64 | \item | |
65 | int {\bf Reset\-Data\-Buffer} () | |
66 | \item | |
67 | {\bf Ali\-HLTConsumer\-Descriptor} $\ast$ {\bf Find\-Consumer} (const {\bf Ali\-HLTComponent} $\ast$p\-Consumer, vector$<$ {\bf Ali\-HLTConsumer\-Descriptor} $\ast$ $>$ \&list) const | |
68 | \begin{CompactList}\small\item\em transient/////////////////////////////////////////////////////////////////////////// \item\end{CompactList}\item | |
69 | int {\bf Change\-Consumer\-State} ({\bf Ali\-HLTConsumer\-Descriptor} $\ast$p\-Desc, vector$<$ {\bf Ali\-HLTConsumer\-Descriptor} $\ast$ $>$ \&src\-List, vector$<$ {\bf Ali\-HLTConsumer\-Descriptor} $\ast$ $>$ \&tgt\-List) | |
70 | \item | |
71 | int {\bf Cleanup\-Consumer\-List} () | |
72 | \end{CompactItemize} | |
73 | \subsection*{Static Private Member Functions} | |
74 | \begin{CompactItemize} | |
75 | \item | |
76 | {\bf Ali\-HLTRaw\-Buffer} $\ast$ {\bf Create\-Raw\-Buffer} ({\bf Ali\-HLTUInt32\_\-t} size) | |
77 | \item | |
78 | int {\bf Release\-Raw\-Buffer} ({\bf Ali\-HLTRaw\-Buffer} $\ast$p\-Buffer) | |
79 | \item | |
80 | int {\bf Delete\-Raw\-Buffers} () | |
81 | \end{CompactItemize} | |
82 | \subsection*{Private Attributes} | |
83 | \begin{CompactItemize} | |
84 | \item | |
85 | vector$<$ {\bf Ali\-HLTData\-Segment} $>$ {\bf f\-Segments} | |
86 | \item | |
87 | vector$<$ {\bf Ali\-HLTConsumer\-Descriptor} $\ast$ $>$ {\bf f\-Consumers} | |
88 | \item | |
89 | vector$<$ {\bf Ali\-HLTConsumer\-Descriptor} $\ast$ $>$ {\bf f\-Active\-Consumers} | |
90 | \item | |
91 | vector$<$ {\bf Ali\-HLTConsumer\-Descriptor} $\ast$ $>$ {\bf f\-Released\-Consumers} | |
92 | \item | |
93 | {\bf Ali\-HLTRaw\-Buffer} $\ast$ {\bf fp\-Buffer} | |
94 | \item | |
95 | {\bf Ali\-HLTUInt32\_\-t} {\bf f\-Flags} | |
96 | \begin{CompactList}\small\item\em transient \item\end{CompactList}\end{CompactItemize} | |
97 | \subsection*{Static Private Attributes} | |
98 | \begin{CompactItemize} | |
99 | \item | |
100 | int {\bf fg\-Nof\-Instances} = 0 | |
101 | \item | |
102 | vector$<$ {\bf Ali\-HLTRaw\-Buffer} $\ast$ $>$ {\bf fg\-Free\-Buffers} | |
103 | \item | |
104 | vector$<$ {\bf Ali\-HLTRaw\-Buffer} $\ast$ $>$ {\bf fg\-Active\-Buffers} | |
105 | \item | |
106 | {\bf Ali\-HLTUInt32\_\-t} {\bf fg\-Margin} = 1024 | |
107 | \item | |
108 | {\bf Ali\-HLTLogging} {\bf fg\-Logging} | |
109 | \item | |
110 | const Int\_\-t {\bf fgk\-Safety\-Pattern\-Size} = 16 | |
111 | \item | |
112 | const char {\bf fgk\-Safety\-Pattern} [$\,$] = \{0x28, 0x63, 0x29, 0x4d, 0x52, 0x49, 0x43, 0x48, 0x54, 0x45, 0x52, 0x20, 0x32, 0x30, 0x30, 0x37\} | |
113 | \end{CompactItemize} | |
114 | ||
115 | ||
116 | \subsection{Constructor \& Destructor Documentation} | |
117 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!AliHLTDataBuffer@{AliHLTDataBuffer}} | |
118 | \index{AliHLTDataBuffer@{AliHLTDataBuffer}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
119 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}Ali\-HLTData\-Buffer::Ali\-HLTData\-Buffer ()}\label{classAliHLTDataBuffer_a0} | |
120 | ||
121 | ||
122 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!AliHLTDataBuffer@{AliHLTDataBuffer}} | |
123 | \index{AliHLTDataBuffer@{AliHLTDataBuffer}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
124 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}Ali\-HLTData\-Buffer::Ali\-HLTData\-Buffer (const {\bf Ali\-HLTData\-Buffer} \&)}\label{classAliHLTDataBuffer_a1} | |
125 | ||
126 | ||
127 | not a valid copy constructor, defined according to effective C++ style | |
128 | ||
129 | Definition at line 59 of file Ali\-HLTData\-Buffer.cxx. | |
130 | ||
131 | References HLTFatal. | |
132 | ||
133 | \footnotesize\begin{verbatim}60 : | |
134 | 61 TObject(), | |
135 | 62 AliHLTLogging(), | |
136 | 63 fSegments(), | |
137 | 64 fConsumers(), | |
138 | 65 fActiveConsumers(), | |
139 | 66 fReleasedConsumers(), | |
140 | 67 fpBuffer(NULL), | |
141 | 68 fFlags(0) | |
142 | 69 { | |
143 | 70 // see header file for function documentation | |
144 | 71 HLTFatal("copy constructor untested"); | |
145 | 72 } | |
146 | ||
147 | \end{verbatim}\normalsize | |
148 | ||
149 | ||
150 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!~AliHLTDataBuffer@{$\sim$AliHLTDataBuffer}} | |
151 | \index{~AliHLTDataBuffer@{$\sim$AliHLTDataBuffer}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
152 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}Ali\-HLTData\-Buffer::$\sim${\bf Ali\-HLTData\-Buffer} ()\hspace{0.3cm}{\tt [virtual]}}\label{classAliHLTDataBuffer_a3} | |
153 | ||
154 | ||
155 | destructor | |
156 | ||
157 | Definition at line 89 of file Ali\-HLTData\-Buffer.cxx. | |
158 | ||
159 | References Cleanup\-Consumer\-List(), Delete\-Raw\-Buffers(), and fg\-Nof\-Instances. | |
160 | ||
161 | \footnotesize\begin{verbatim}90 { | |
162 | 91 // see header file for function documentation | |
163 | 92 if (--fgNofInstances<=0) { | |
164 | 93 DeleteRawBuffers(); | |
165 | 94 } | |
166 | 95 CleanupConsumerList(); | |
167 | 96 } | |
168 | \end{verbatim}\normalsize | |
169 | ||
170 | ||
171 | ||
172 | ||
173 | \subsection{Member Function Documentation} | |
174 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!ChangeConsumerState@{ChangeConsumerState}} | |
175 | \index{ChangeConsumerState@{ChangeConsumerState}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
176 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTData\-Buffer::Change\-Consumer\-State ({\bf Ali\-HLTConsumer\-Descriptor} $\ast$ {\em p\-Desc}, vector$<$ {\bf Ali\-HLTConsumer\-Descriptor} $\ast$ $>$ \& {\em src\-List}, vector$<$ {\bf Ali\-HLTConsumer\-Descriptor} $\ast$ $>$ \& {\em tgt\-List})\hspace{0.3cm}{\tt [private]}}\label{classAliHLTDataBuffer_d3} | |
177 | ||
178 | ||
179 | Change the state of a consumer. The state of a consumer is determined by the list it is strored in, the method moves a consumer from the source to the target list. \begin{Desc} | |
180 | \item[Parameters:] | |
181 | \begin{description} | |
182 | \item[{\em p\-Desc}]pointer to consumer descriptor \item[{\em src\-List}]list where the consumer is currently to be found \item[{\em tgt\-List}]list where to move the consumer \end{description} | |
183 | \end{Desc} | |
184 | ||
185 | ||
186 | Definition at line 526 of file Ali\-HLTData\-Buffer.cxx. | |
187 | ||
188 | References HLTError. | |
189 | ||
190 | Referenced by Release(), and Subscribe(). | |
191 | ||
192 | \footnotesize\begin{verbatim}527 { | |
193 | 528 // see header file for function documentation | |
194 | 529 int iResult=-ENOENT; | |
195 | 530 if (pDesc) { | |
196 | 531 vector<AliHLTConsumerDescriptor*>::iterator desc=srcList.begin(); | |
197 | 532 while (desc!=srcList.end()) { | |
198 | 533 if ((*desc)==pDesc) { | |
199 | 534 srcList.erase(desc); | |
200 | 535 tgtList.push_back(pDesc); | |
201 | 536 iResult=0; | |
202 | 537 break; | |
203 | 538 } | |
204 | 539 desc++; | |
205 | 540 } | |
206 | 541 if (iResult<0) { | |
207 | 542 HLTError("can not find consumer descriptor %p in list", pDesc); | |
208 | 543 } | |
209 | 544 } else { | |
210 | 545 HLTError("invalid parameter"); | |
211 | 546 iResult=-EINVAL; | |
212 | 547 } | |
213 | 548 return iResult; | |
214 | 549 } | |
215 | \end{verbatim}\normalsize | |
216 | ||
217 | ||
218 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!CleanupConsumerList@{CleanupConsumerList}} | |
219 | \index{CleanupConsumerList@{CleanupConsumerList}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
220 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTData\-Buffer::Cleanup\-Consumer\-List ()\hspace{0.3cm}{\tt [private]}}\label{classAliHLTDataBuffer_d4} | |
221 | ||
222 | ||
223 | Cleanup a consumer list. Release all allocated data structures. {\bf Note:} Not the component itself! | |
224 | ||
225 | Definition at line 551 of file Ali\-HLTData\-Buffer.cxx. | |
226 | ||
227 | References f\-Consumers, and Reset\-Data\-Buffer(). | |
228 | ||
229 | Referenced by $\sim$Ali\-HLTData\-Buffer(). | |
230 | ||
231 | \footnotesize\begin{verbatim}552 { | |
232 | 553 // see header file for function documentation | |
233 | 554 int iResult=0; | |
234 | 555 ResetDataBuffer(); | |
235 | 556 vector<AliHLTConsumerDescriptor*>::iterator desc=fConsumers.begin(); | |
236 | 557 while (desc!=fConsumers.end()) { | |
237 | 558 delete *desc; | |
238 | 559 fConsumers.erase(desc); | |
239 | 560 desc=fConsumers.begin(); | |
240 | 561 } | |
241 | 562 return iResult; | |
242 | 563 } | |
243 | \end{verbatim}\normalsize | |
244 | ||
245 | ||
246 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!CreateRawBuffer@{CreateRawBuffer}} | |
247 | \index{CreateRawBuffer@{CreateRawBuffer}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
248 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTData\-Buffer::Ali\-HLTRaw\-Buffer} $\ast$ Ali\-HLTData\-Buffer::Create\-Raw\-Buffer ({\bf Ali\-HLTUInt32\_\-t} {\em size})\hspace{0.3cm}{\tt [static, private]}}\label{classAliHLTDataBuffer_h0} | |
249 | ||
250 | ||
251 | Create a raw buffer of a certain size. The function tries to find a buffer of the given size (or a bit bigger by a certain margin {\bf fg\-Margin}{\rm (p.\,\pageref{classAliHLTDataBuffer_v3})}) from the list of free buffers. If no buffer is available, a new one is created and added to the buffer handling. \begin{Desc} | |
252 | \item[Parameters:] | |
253 | \begin{description} | |
254 | \item[{\em size}]min. size of the requested buffer \end{description} | |
255 | \end{Desc} | |
256 | \begin{Desc} | |
257 | \item[Returns:]pointer to raw buffer \end{Desc} | |
258 | ||
259 | ||
260 | Definition at line 348 of file Ali\-HLTData\-Buffer.cxx. | |
261 | ||
262 | References fg\-Active\-Buffers, fg\-Free\-Buffers, fgk\-Safety\-Pattern, fg\-Logging, Ali\-HLTData\-Buffer::Ali\-HLTRaw\-Buffer::f\-Ptr, Ali\-HLTData\-Buffer::Ali\-HLTRaw\-Buffer::f\-Size, Ali\-HLTData\-Buffer::Ali\-HLTRaw\-Buffer::f\-Total\-Size, k\-HLTLog\-Debug, k\-HLTLog\-Error, and Ali\-HLTLogging::Logging(). | |
263 | ||
264 | Referenced by Get\-Target\-Buffer(). | |
265 | ||
266 | \footnotesize\begin{verbatim}349 { | |
267 | 350 // see header file for function documentation | |
268 | 351 AliHLTRawBuffer* pRawBuffer=NULL; | |
269 | 352 unsigned int reqSize=size+fgkSafetyPatternSize; | |
270 | 353 vector<AliHLTRawBuffer*>::iterator buffer=fgFreeBuffers.begin(); | |
271 | 354 while (buffer!=fgFreeBuffers.end() && pRawBuffer==NULL) { | |
272 | 355 if ((*buffer)->fTotalSize>=reqSize && ((*buffer)->fTotalSize-reqSize)<fgMargin) { | |
273 | 356 // assign this element | |
274 | 357 pRawBuffer=*buffer; | |
275 | 358 pRawBuffer->fSize=size; | |
276 | 359 fgFreeBuffers.erase(buffer); | |
277 | 360 fgLogging.Logging(kHLTLogDebug, "AliHLTDataBuffer::CreateRawBuffer", "data buffer handling", "raw buffer container %p provided for request of %d bytes (total %d available in buffer %p)", pRawBuffer, size, pRawBuffer->fTotalSize, pRawBuffer->fPtr); | |
278 | 361 fgActiveBuffers.push_back(pRawBuffer); | |
279 | 362 break; | |
280 | 363 } | |
281 | 364 buffer++; | |
282 | 365 } | |
283 | 366 if (pRawBuffer==NULL) { | |
284 | 367 // no buffer found, create a new one | |
285 | 368 pRawBuffer=new AliHLTRawBuffer; | |
286 | 369 if (pRawBuffer) { | |
287 | 370 pRawBuffer->fPtr=malloc(reqSize); | |
288 | 371 if (pRawBuffer->fPtr) { | |
289 | 372 pRawBuffer->fSize=size; | |
290 | 373 pRawBuffer->fTotalSize=reqSize; | |
291 | 374 fgActiveBuffers.push_back(pRawBuffer); | |
292 | 375 fgLogging.Logging(kHLTLogDebug, "AliHLTDataBuffer::CreateRawBuffer", "data buffer handling", "new raw buffer %p of size %d created (container %p)", pRawBuffer->fPtr, pRawBuffer->fTotalSize, pRawBuffer); | |
293 | 376 if (fgkSafetyPatternSize>0) { | |
294 | 377 memcpy(((char*)pRawBuffer->fPtr)+pRawBuffer->fSize, fgkSafetyPattern, fgkSafetyPatternSize); | |
295 | 378 } | |
296 | 379 } else { | |
297 | 380 delete pRawBuffer; | |
298 | 381 pRawBuffer=NULL; | |
299 | 382 fgLogging.Logging(kHLTLogError, "AliHLTDataBuffer::CreateRawBuffer", "data buffer handling", "memory allocation failed"); | |
300 | 383 } | |
301 | 384 } else { | |
302 | 385 fgLogging.Logging(kHLTLogError, "AliHLTDataBuffer::CreateRawBuffer", "data buffer handling", "memory allocation failed"); | |
303 | 386 } | |
304 | 387 } | |
305 | 388 return pRawBuffer; | |
306 | 389 } | |
307 | \end{verbatim}\normalsize | |
308 | ||
309 | ||
310 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!DeleteRawBuffers@{DeleteRawBuffers}} | |
311 | \index{DeleteRawBuffers@{DeleteRawBuffers}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
312 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTData\-Buffer::Delete\-Raw\-Buffers ()\hspace{0.3cm}{\tt [static, private]}}\label{classAliHLTDataBuffer_h2} | |
313 | ||
314 | ||
315 | Deletes all the raw buffers. When the last Data Buffer object is destructed, all raw data buffers are relesed. | |
316 | ||
317 | Definition at line 421 of file Ali\-HLTData\-Buffer.cxx. | |
318 | ||
319 | References fg\-Active\-Buffers, fg\-Free\-Buffers, fg\-Logging, k\-HLTLog\-Warning, and Ali\-HLTLogging::Logging(). | |
320 | ||
321 | Referenced by $\sim$Ali\-HLTData\-Buffer(). | |
322 | ||
323 | \footnotesize\begin{verbatim}422 { | |
324 | 423 // see header file for function documentation | |
325 | 424 int iResult=0; | |
326 | 425 vector<AliHLTRawBuffer*>::iterator buffer=fgFreeBuffers.begin(); | |
327 | 426 while (buffer!=fgFreeBuffers.end()) { | |
328 | 427 free((*buffer)->fPtr); | |
329 | 428 delete *buffer; | |
330 | 429 fgFreeBuffers.erase(buffer); | |
331 | 430 buffer=fgFreeBuffers.begin(); | |
332 | 431 } | |
333 | 432 buffer=fgActiveBuffers.begin(); | |
334 | 433 while (buffer!=fgActiveBuffers.end()) { | |
335 | 434 fgLogging.Logging(kHLTLogWarning, "AliHLTDataBuffer::ReleaseRawBuffer", "data buffer handling", "request to delete active raw buffer container (raw buffer %p, size %d)", (*buffer)->fPtr, (*buffer)->fTotalSize); | |
336 | 435 free((*buffer)->fPtr); | |
337 | 436 delete *buffer; | |
338 | 437 fgActiveBuffers.erase(buffer); | |
339 | 438 buffer=fgActiveBuffers.begin(); | |
340 | 439 } | |
341 | 440 return iResult; | |
342 | 441 } | |
343 | \end{verbatim}\normalsize | |
344 | ||
345 | ||
346 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!FindConsumer@{FindConsumer}} | |
347 | \index{FindConsumer@{FindConsumer}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
348 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTConsumer\-Descriptor} $\ast$ Ali\-HLTData\-Buffer::Find\-Consumer (const {\bf Ali\-HLTComponent} $\ast$ {\em p\-Consumer}, vector$<$ {\bf Ali\-HLTConsumer\-Descriptor} $\ast$ $>$ \& {\em list}) const\hspace{0.3cm}{\tt [private]}}\label{classAliHLTDataBuffer_d2} | |
349 | ||
350 | ||
351 | transient/////////////////////////////////////////////////////////////////////////// | |
352 | ||
353 | Find the consumer descriptor for a certain component and data type in a list of consumers.\par | |
354 | {\bf Note:} There are three lists which contain the consumers in the different states. \begin{Desc} | |
355 | \item[Parameters:] | |
356 | \begin{description} | |
357 | \item[{\em p\-Consumer}]pointer to consumer component \item[{\em list}]list where to search for the consumer \end{description} | |
358 | \end{Desc} | |
359 | ||
360 | ||
361 | Definition at line 443 of file Ali\-HLTData\-Buffer.cxx. | |
362 | ||
363 | \footnotesize\begin{verbatim}444 { | |
364 | 445 // see header file for function documentation | |
365 | 446 AliHLTConsumerDescriptor* pDesc=NULL; | |
366 | 447 vector<AliHLTConsumerDescriptor*>::iterator desc=list.begin(); | |
367 | 448 while (desc!=list.end() && pDesc==NULL) { | |
368 | 449 if ((pConsumer==NULL || (*desc)->GetComponent()==pConsumer)) { | |
369 | 450 pDesc=*desc; | |
370 | 451 } | |
371 | 452 desc++; | |
372 | 453 } | |
373 | 454 return pDesc; | |
374 | 455 } | |
375 | \end{verbatim}\normalsize | |
376 | ||
377 | ||
378 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!FindConsumer@{FindConsumer}} | |
379 | \index{FindConsumer@{FindConsumer}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
380 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTData\-Buffer::Find\-Consumer ({\bf Ali\-HLTComponent} $\ast$ {\em p\-Consumer}, int {\em b\-All\-Lists} = {\tt 1})}\label{classAliHLTDataBuffer_a14} | |
381 | ||
382 | ||
383 | Check if a consumer is already in the list \begin{Desc} | |
384 | \item[Parameters:] | |
385 | \begin{description} | |
386 | \item[{\em p\-Consumer}]pointer to consumer component \item[{\em b\-All\-Lists}]search in all lists if 1 search only in f\-Consumer list if 0 \end{description} | |
387 | \end{Desc} | |
388 | \begin{Desc} | |
389 | \item[Returns:]1 if found, 0 if not \end{Desc} | |
390 | ||
391 | ||
392 | Definition at line 565 of file Ali\-HLTData\-Buffer.cxx. | |
393 | ||
394 | References f\-Active\-Consumers, f\-Consumers, and f\-Released\-Consumers. | |
395 | ||
396 | Referenced by Release(), Set\-Consumer(), and Subscribe(). | |
397 | ||
398 | \footnotesize\begin{verbatim}566 { | |
399 | 567 // see header file for function documentation | |
400 | 568 vector<AliHLTConsumerDescriptor*>::iterator desc=fConsumers.begin(); | |
401 | 569 while (desc!=fConsumers.end()) { | |
402 | 570 if ((*desc)->GetComponent()==pConsumer) | |
403 | 571 return 1; | |
404 | 572 desc++; | |
405 | 573 } | |
406 | 574 if (bAllLists==0) return 0; | |
407 | 575 | |
408 | 576 desc=fActiveConsumers.begin(); | |
409 | 577 while (desc!=fActiveConsumers.end()) { | |
410 | 578 if ((*desc)->GetComponent()==pConsumer) | |
411 | 579 return 1; | |
412 | 580 desc++; | |
413 | 581 } | |
414 | 582 desc=fReleasedConsumers.begin(); | |
415 | 583 while (desc!=fReleasedConsumers.end()) { | |
416 | 584 if ((*desc)->GetComponent()==pConsumer) | |
417 | 585 return 1; | |
418 | 586 desc++; | |
419 | 587 } | |
420 | 588 return 0; | |
421 | 589 } | |
422 | \end{verbatim}\normalsize | |
423 | ||
424 | ||
425 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!FindMatchingDataBlocks@{FindMatchingDataBlocks}} | |
426 | \index{FindMatchingDataBlocks@{FindMatchingDataBlocks}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
427 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTData\-Buffer::Find\-Matching\-Data\-Blocks (const {\bf Ali\-HLTComponent} $\ast$ {\em p\-Consumer}, vector$<$ {\bf Ali\-HLTComponent\-Data\-Type} $>$ $\ast$ {\em tgt\-List} = {\tt NULL})}\label{classAliHLTDataBuffer_a5} | |
428 | ||
429 | ||
430 | Determine the number of matching data blocks for the component and a consumer component. \par | |
431 | The first approach will support only one output data type for processing components. \begin{Desc} | |
432 | \item[Parameters:] | |
433 | \begin{description} | |
434 | \item[{\em p\-Consumer}]the component which subscribes to the buffer \item[{\em tgt\-List}](optional) the list to receive the data types \end{description} | |
435 | \end{Desc} | |
436 | \begin{Desc} | |
437 | \item[Returns:]: number of data blocks which match the input data types of the consumer, neg. error code if failed \par | |
438 | -EINVAL invalid parameter \par | |
439 | \end{Desc} | |
440 | ||
441 | ||
442 | Definition at line 121 of file Ali\-HLTData\-Buffer.cxx. | |
443 | ||
444 | References Find\-Matching\-Data\-Segments(). | |
445 | ||
446 | Referenced by Ali\-HLTTask::Get\-Nof\-Matching\-Data\-Blocks(). | |
447 | ||
448 | \footnotesize\begin{verbatim}122 { | |
449 | 123 // see header file for function documentation | |
450 | 124 int iResult=0; | |
451 | 125 if (pConsumer) { | |
452 | 126 vector<AliHLTDataBuffer::AliHLTDataSegment> segments; | |
453 | 127 if ((iResult=FindMatchingDataSegments(pConsumer, segments))>=0) { | |
454 | 128 if (tgtList) { | |
455 | 129 vector<AliHLTDataBuffer::AliHLTDataSegment>::iterator segment=segments.begin(); | |
456 | 130 while (segment!=segments.end()) { | |
457 | 131 tgtList->push_back((*segment).fDataType); | |
458 | 132 segment++; | |
459 | 133 } | |
460 | 134 } | |
461 | 135 iResult=segments.size(); | |
462 | 136 } | |
463 | 137 } else { | |
464 | 138 iResult=-EINVAL; | |
465 | 139 } | |
466 | 140 return iResult; | |
467 | 141 } | |
468 | \end{verbatim}\normalsize | |
469 | ||
470 | ||
471 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!FindMatchingDataSegments@{FindMatchingDataSegments}} | |
472 | \index{FindMatchingDataSegments@{FindMatchingDataSegments}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
473 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTData\-Buffer::Find\-Matching\-Data\-Segments (const {\bf Ali\-HLTComponent} $\ast$ {\em p\-Consumer}, vector$<$ {\bf Ali\-HLTData\-Buffer::Ali\-HLTData\-Segment} $>$ \& {\em tgt\-List})\hspace{0.3cm}{\tt [private]}}\label{classAliHLTDataBuffer_d0} | |
474 | ||
475 | ||
476 | Find those data segments which match the input types of a component. \begin{Desc} | |
477 | \item[Parameters:] | |
478 | \begin{description} | |
479 | \item[{\em p\-Consumer}]the component which subscribes to the buffer \item[{\em tgt\-List}]the list to receive the data segment descriptors \end{description} | |
480 | \end{Desc} | |
481 | \begin{Desc} | |
482 | \item[Returns:]: number of data blocks which match the input data types of the consumer, neg. error code if failed \par | |
483 | -EINVAL invalid parameter \par | |
484 | \end{Desc} | |
485 | ||
486 | ||
487 | Definition at line 143 of file Ali\-HLTData\-Buffer.cxx. | |
488 | ||
489 | References f\-Segments. | |
490 | ||
491 | Referenced by Find\-Matching\-Data\-Blocks(), and Subscribe(). | |
492 | ||
493 | \footnotesize\begin{verbatim}144 { | |
494 | 145 // see header file for function documentation | |
495 | 146 int iResult=0; | |
496 | 147 if (pConsumer) { | |
497 | 148 vector<AliHLTComponentDataType> dtlist; | |
498 | 149 ((AliHLTComponent*)pConsumer)->GetInputDataTypes(dtlist); | |
499 | 150 vector<AliHLTDataBuffer::AliHLTDataSegment>::iterator segment=fSegments.begin(); | |
500 | 151 while (segment!=fSegments.end()) { | |
501 | 152 vector<AliHLTComponentDataType>::iterator type=dtlist.begin(); | |
502 | 153 while (type!=dtlist.end()) { | |
503 | 154 if ((*segment).fDataType==(*type) || | |
504 | 155 (*type)==kAliHLTAnyDataType) { | |
505 | 156 tgtList.push_back(*segment); | |
506 | 157 iResult++; | |
507 | 158 break; | |
508 | 159 } | |
509 | 160 type++; | |
510 | 161 } | |
511 | 162 segment++; | |
512 | 163 } | |
513 | 164 } else { | |
514 | 165 iResult=-EINVAL; | |
515 | 166 } | |
516 | 167 return iResult; | |
517 | 168 } | |
518 | \end{verbatim}\normalsize | |
519 | ||
520 | ||
521 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!GetNofActiveConsumers@{GetNofActiveConsumers}} | |
522 | \index{GetNofActiveConsumers@{GetNofActiveConsumers}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
523 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTData\-Buffer::Get\-Nof\-Active\-Consumers ()}\label{classAliHLTDataBuffer_a13} | |
524 | ||
525 | ||
526 | Get the number of active consumers \begin{Desc} | |
527 | \item[Returns:]number of active consumers \end{Desc} | |
528 | ||
529 | ||
530 | Definition at line 341 of file Ali\-HLTData\-Buffer.cxx. | |
531 | ||
532 | References f\-Active\-Consumers. | |
533 | ||
534 | Referenced by Get\-Nof\-Consumers(), and Release(). | |
535 | ||
536 | \footnotesize\begin{verbatim}342 { | |
537 | 343 // see header file for function documentation | |
538 | 344 int iResult=fActiveConsumers.size(); | |
539 | 345 return iResult; | |
540 | 346 } | |
541 | \end{verbatim}\normalsize | |
542 | ||
543 | ||
544 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!GetNofConsumers@{GetNofConsumers}} | |
545 | \index{GetNofConsumers@{GetNofConsumers}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
546 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTData\-Buffer::Get\-Nof\-Consumers ()}\label{classAliHLTDataBuffer_a12} | |
547 | ||
548 | ||
549 | Get the number of consumers \begin{Desc} | |
550 | \item[Returns:]number of consumers \end{Desc} | |
551 | ||
552 | ||
553 | Definition at line 334 of file Ali\-HLTData\-Buffer.cxx. | |
554 | ||
555 | References f\-Consumers, f\-Released\-Consumers, and Get\-Nof\-Active\-Consumers(). | |
556 | ||
557 | \footnotesize\begin{verbatim}335 { | |
558 | 336 // see header file for function documentation | |
559 | 337 int iResult=fConsumers.size() + GetNofActiveConsumers() + fReleasedConsumers.size(); | |
560 | 338 return iResult; | |
561 | 339 } | |
562 | \end{verbatim}\normalsize | |
563 | ||
564 | ||
565 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!GetNofSegments@{GetNofSegments}} | |
566 | \index{GetNofSegments@{GetNofSegments}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
567 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTData\-Buffer::Get\-Nof\-Segments ()}\label{classAliHLTDataBuffer_a11} | |
568 | ||
569 | ||
570 | Get the number of segments \begin{Desc} | |
571 | \item[Returns:]number of segments \end{Desc} | |
572 | ||
573 | ||
574 | Definition at line 327 of file Ali\-HLTData\-Buffer.cxx. | |
575 | ||
576 | References f\-Segments. | |
577 | ||
578 | Referenced by Is\-Empty(). | |
579 | ||
580 | \footnotesize\begin{verbatim}328 { | |
581 | 329 // see header file for function documentation | |
582 | 330 int iResult=fSegments.size(); | |
583 | 331 return iResult; | |
584 | 332 } | |
585 | \end{verbatim}\normalsize | |
586 | ||
587 | ||
588 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!GetTargetBuffer@{GetTargetBuffer}} | |
589 | \index{GetTargetBuffer@{GetTargetBuffer}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
590 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTUInt8\_\-t} $\ast$ Ali\-HLTData\-Buffer::Get\-Target\-Buffer (int {\em i\-Min\-Size})}\label{classAliHLTDataBuffer_a8} | |
591 | ||
592 | ||
593 | Get a target buffer of minimum size i\-Min\-Size. The method is used by the component which owns the Data Buffer to allocate a buffer for the data it is going to produce. \begin{Desc} | |
594 | \item[Parameters:] | |
595 | \begin{description} | |
596 | \item[{\em i\-Min\-Size}]minumum size of the requested buffer \end{description} | |
597 | \end{Desc} | |
598 | \begin{Desc} | |
599 | \item[Returns:]: pointer to target buffer if \end{Desc} | |
600 | ||
601 | ||
602 | Definition at line 270 of file Ali\-HLTData\-Buffer.cxx. | |
603 | ||
604 | References Ali\-HLTUInt8\_\-t, Create\-Raw\-Buffer(), fp\-Buffer, Ali\-HLTData\-Buffer::Ali\-HLTRaw\-Buffer::f\-Ptr, and HLTError. | |
605 | ||
606 | Referenced by Ali\-HLTTask::Process\-Task(). | |
607 | ||
608 | \footnotesize\begin{verbatim}271 { | |
609 | 272 // see header file for function documentation | |
610 | 273 AliHLTUInt8_t* pTargetBuffer=NULL; | |
611 | 274 fpBuffer=CreateRawBuffer(iMinSize); | |
612 | 275 if (fpBuffer) { | |
613 | 276 pTargetBuffer=(AliHLTUInt8_t*)fpBuffer->fPtr; | |
614 | 277 } else { | |
615 | 278 HLTError("can not create raw buffer"); | |
616 | 279 } | |
617 | 280 return pTargetBuffer; | |
618 | 281 } | |
619 | \end{verbatim}\normalsize | |
620 | ||
621 | ||
622 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!IsEmpty@{IsEmpty}} | |
623 | \index{IsEmpty@{IsEmpty}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
624 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTData\-Buffer::Is\-Empty ()}\label{classAliHLTDataBuffer_a10} | |
625 | ||
626 | ||
627 | Check if the data buffer is empty. \begin{Desc} | |
628 | \item[Returns:]1 if empty, 0 if not \end{Desc} | |
629 | ||
630 | ||
631 | Definition at line 320 of file Ali\-HLTData\-Buffer.cxx. | |
632 | ||
633 | References fp\-Buffer, and Get\-Nof\-Segments(). | |
634 | ||
635 | \footnotesize\begin{verbatim}321 { | |
636 | 322 // see header file for function documentation | |
637 | 323 int iResult=fpBuffer==NULL || GetNofSegments()==0; | |
638 | 324 return iResult; | |
639 | 325 } | |
640 | \end{verbatim}\normalsize | |
641 | ||
642 | ||
643 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!operator=@{operator=}} | |
644 | \index{operator=@{operator=}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
645 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTData\-Buffer} \& Ali\-HLTData\-Buffer::operator= (const {\bf Ali\-HLTData\-Buffer} \&)}\label{classAliHLTDataBuffer_a2} | |
646 | ||
647 | ||
648 | not a valid assignment op, but defined according to effective C++ style | |
649 | ||
650 | Definition at line 74 of file Ali\-HLTData\-Buffer.cxx. | |
651 | ||
652 | References HLTFatal. | |
653 | ||
654 | \footnotesize\begin{verbatim}75 { | |
655 | 76 // see header file for function documentation | |
656 | 77 HLTFatal("assignment operator untested"); | |
657 | 78 return *this; | |
658 | 79 } | |
659 | \end{verbatim}\normalsize | |
660 | ||
661 | ||
662 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!Release@{Release}} | |
663 | \index{Release@{Release}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
664 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTData\-Buffer::Release ({\bf Ali\-HLTComponent\-Block\-Data} $\ast$ {\em p\-Block\-Desc}, const {\bf Ali\-HLTComponent} $\ast$ {\em p\-Consumer})}\label{classAliHLTDataBuffer_a7} | |
665 | ||
666 | ||
667 | Release an instance of the data buffer. Resets the variables of the block descriptor. If all buffer segments are released, the Data Buffer is reseted and the Raw Buffer released.\par | |
668 | The method is used by the consumer component. \begin{Desc} | |
669 | \item[Parameters:] | |
670 | \begin{description} | |
671 | \item[{\em p\-Block\-Desc}]descriptor of the data segment \item[{\em p\-Consumer}]the component which subscribes to the buffer \end{description} | |
672 | \end{Desc} | |
673 | \begin{Desc} | |
674 | \item[Returns:]: $>$0 if success, negative error code if failed \par | |
675 | -EACCESS the consumer state can not be changed (de-activated) -ENOENT consumer has not subscribed to the buffer \par | |
676 | -EINVAL invalid parameter \par | |
677 | \end{Desc} | |
678 | ||
679 | ||
680 | Definition at line 231 of file Ali\-HLTData\-Buffer.cxx. | |
681 | ||
682 | References Change\-Consumer\-State(), Ali\-HLTConsumer\-Descriptor::Check\-Active\-Data\-Segment(), f\-Active\-Consumers, Find\-Consumer(), Ali\-HLTComponent\-Block\-Data::f\-Offset, Ali\-HLTComponent\-Block\-Data::f\-Ptr, f\-Released\-Consumers, Ali\-HLTComponent\-Block\-Data::f\-Size, Get\-Nof\-Active\-Consumers(), Ali\-HLTConsumer\-Descriptor::Get\-Nof\-Active\-Segments(), HLTError, HLTWarning, Ali\-HLTConsumer\-Descriptor::Release\-Active\-Data\-Segment(), and Reset\-Data\-Buffer(). | |
683 | ||
684 | Referenced by Ali\-HLTTask::Release(). | |
685 | ||
686 | \footnotesize\begin{verbatim}232 { | |
687 | 233 // see header file for function documentation | |
688 | 234 int iResult=0; | |
689 | 235 if (pBlockDesc && pConsumer) { | |
690 | 236 AliHLTConsumerDescriptor* pDesc=FindConsumer(pConsumer, fActiveConsumers); | |
691 | 237 if (pDesc) { | |
692 | 238 if ((iResult=pDesc->CheckActiveDataSegment(pBlockDesc->fOffset, pBlockDesc->fSize))!=1) { | |
693 | 239 HLTWarning("data segment missmatch, component %p has not subscribed to a segment with offset %#x and size %d", pConsumer, pBlockDesc->fOffset, pBlockDesc->fSize); | |
694 | 240 // TODO: appropriate error handling, but so far optional | |
695 | 241 iResult=0; | |
696 | 242 } else { | |
697 | 243 pDesc->ReleaseActiveDataSegment(pBlockDesc->fOffset, pBlockDesc->fSize); | |
698 | 244 pBlockDesc->fOffset=0; | |
699 | 245 pBlockDesc->fPtr=NULL; | |
700 | 246 pBlockDesc->fSize=0; | |
701 | 247 } | |
702 | 248 if (pDesc->GetNofActiveSegments()==0) { | |
703 | 249 if ((iResult=ChangeConsumerState(pDesc, fActiveConsumers, fReleasedConsumers))>=0) { | |
704 | 250 if (GetNofActiveConsumers()==0) { | |
705 | 251 // this is the last consumer, reset the consumer list and release the raw buffer | |
706 | 252 ResetDataBuffer(); | |
707 | 253 } | |
708 | 254 } else { | |
709 | 255 HLTError("can not deactivate consumer %p for data buffer %p", pConsumer, this); | |
710 | 256 iResult=-EACCES; | |
711 | 257 } | |
712 | 258 } | |
713 | 259 } else { | |
714 | 260 HLTWarning("component %p has currently not subscribed to the data buffer %p", pConsumer, this); | |
715 | 261 iResult=-ENOENT; | |
716 | 262 } | |
717 | 263 } else { | |
718 | 264 HLTError("inavalid parameter: pBlockDesc=%p pConsumer=%p", pBlockDesc, pConsumer); | |
719 | 265 iResult=-EINVAL; | |
720 | 266 } | |
721 | 267 return iResult; | |
722 | 268 } | |
723 | \end{verbatim}\normalsize | |
724 | ||
725 | ||
726 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!ReleaseRawBuffer@{ReleaseRawBuffer}} | |
727 | \index{ReleaseRawBuffer@{ReleaseRawBuffer}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
728 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTData\-Buffer::Release\-Raw\-Buffer ({\bf Ali\-HLTRaw\-Buffer} $\ast$ {\em p\-Buffer})\hspace{0.3cm}{\tt [static, private]}}\label{classAliHLTDataBuffer_h1} | |
729 | ||
730 | ||
731 | Mark a buffer as free. After the Data Buffer has finnished using the raw buffer, it is released and added to the list of available buffers. \begin{Desc} | |
732 | \item[Parameters:] | |
733 | \begin{description} | |
734 | \item[{\em p\-Buffer}]the raw buffer to release \end{description} | |
735 | \end{Desc} | |
736 | \begin{Desc} | |
737 | \item[Returns:]$>$=0 if succeeded, neg. error code if failed \end{Desc} | |
738 | ||
739 | ||
740 | Definition at line 391 of file Ali\-HLTData\-Buffer.cxx. | |
741 | ||
742 | References fg\-Active\-Buffers, fg\-Free\-Buffers, fgk\-Safety\-Pattern, fgk\-Safety\-Pattern\-Size, fg\-Logging, k\-HLTLog\-Error, k\-HLTLog\-Fatal, k\-HLTLog\-Warning, and Ali\-HLTLogging::Logging(). | |
743 | ||
744 | Referenced by Reset\-Data\-Buffer(). | |
745 | ||
746 | \footnotesize\begin{verbatim}392 { | |
747 | 393 // see header file for function documentation | |
748 | 394 int iResult=0; | |
749 | 395 if (pBuffer) { | |
750 | 396 vector<AliHLTRawBuffer*>::iterator buffer=fgActiveBuffers.begin(); | |
751 | 397 while (buffer!=fgActiveBuffers.end() && (*buffer)!=pBuffer) { | |
752 | 398 buffer++; | |
753 | 399 } | |
754 | 400 if (buffer!=fgActiveBuffers.end()) { | |
755 | 401 if (fgkSafetyPatternSize>0) { | |
756 | 402 if (memcmp(((char*)(*buffer)->fPtr)+(*buffer)->fSize, fgkSafetyPattern, fgkSafetyPatternSize)!=0) { | |
757 | 403 fgLogging.Logging(kHLTLogFatal, "AliHLTDataBuffer::ReleaseRawBuffer", "data buffer handling", "component has written beyond end of data buffer %p size %d", (*buffer)->fPtr, (*buffer)->fSize); | |
758 | 404 } | |
759 | 405 } | |
760 | 406 (*buffer)->fSize=0; | |
761 | 407 fgFreeBuffers.push_back(*buffer); | |
762 | 408 fgActiveBuffers.erase(buffer); | |
763 | 409 } else { | |
764 | 410 fgLogging.Logging(kHLTLogWarning, "AliHLTDataBuffer::ReleaseRawBuffer", "data buffer handling", "can not find raw buffer container %p in the list of active containers", pBuffer); | |
765 | 411 iResult=-ENOENT; | |
766 | 412 } | |
767 | 413 } else { | |
768 | 414 fgLogging.Logging(kHLTLogError, "AliHLTDataBuffer::ReleaseRawBuffer", "data buffer handling", "invalid parameter"); | |
769 | 415 iResult=-EINVAL; | |
770 | 416 } | |
771 | 417 return iResult; | |
772 | 418 } | |
773 | \end{verbatim}\normalsize | |
774 | ||
775 | ||
776 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!Reset@{Reset}} | |
777 | \index{Reset@{Reset}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
778 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTData\-Buffer::Reset ()}\label{classAliHLTDataBuffer_a15} | |
779 | ||
780 | ||
781 | Public method to reset the buffer. Eventually with some additional checks. In normal operation, an external reset should not be necessary. | |
782 | ||
783 | Definition at line 495 of file Ali\-HLTData\-Buffer.cxx. | |
784 | ||
785 | References Reset\-Data\-Buffer(). | |
786 | ||
787 | Referenced by Ali\-HLTTask::Process\-Task(). | |
788 | ||
789 | \footnotesize\begin{verbatim}496 { | |
790 | 497 // see header file for function documentation | |
791 | 498 return ResetDataBuffer(); | |
792 | 499 } | |
793 | \end{verbatim}\normalsize | |
794 | ||
795 | ||
796 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!ResetDataBuffer@{ResetDataBuffer}} | |
797 | \index{ResetDataBuffer@{ResetDataBuffer}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
798 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTData\-Buffer::Reset\-Data\-Buffer ()\hspace{0.3cm}{\tt [private]}}\label{classAliHLTDataBuffer_d1} | |
799 | ||
800 | ||
801 | Reset the data buffer. Removes all consumers back to the {\bf f\-Consumers}{\rm (p.\,\pageref{classAliHLTDataBuffer_r1})} list, deletes segments and releases the Raw Buffer. | |
802 | ||
803 | Definition at line 457 of file Ali\-HLTData\-Buffer.cxx. | |
804 | ||
805 | References f\-Active\-Consumers, f\-Consumers, fp\-Buffer, f\-Released\-Consumers, f\-Segments, HLTWarning, and Release\-Raw\-Buffer(). | |
806 | ||
807 | Referenced by Cleanup\-Consumer\-List(), Release(), and Reset(). | |
808 | ||
809 | \footnotesize\begin{verbatim}458 { | |
810 | 459 // see header file for function documentation | |
811 | 460 int iResult=0; | |
812 | 461 AliHLTRawBuffer* pBuffer=fpBuffer; | |
813 | 462 fpBuffer=NULL; | |
814 | 463 | |
815 | 464 // cleanup consumer states | |
816 | 465 vector<AliHLTConsumerDescriptor*>::iterator desc=fReleasedConsumers.begin(); | |
817 | 466 while (desc!=fReleasedConsumers.end()) { | |
818 | 467 AliHLTConsumerDescriptor* pDesc=*desc; | |
819 | 468 fReleasedConsumers.erase(desc); | |
820 | 469 desc=fReleasedConsumers.begin(); | |
821 | 470 fConsumers.push_back(pDesc); | |
822 | 471 } | |
823 | 472 desc=fActiveConsumers.begin(); | |
824 | 473 while (desc!=fActiveConsumers.end()) { | |
825 | 474 AliHLTConsumerDescriptor* pDesc=*desc; | |
826 | 475 HLTWarning("consumer %p was not released", pDesc); | |
827 | 476 fActiveConsumers.erase(desc); | |
828 | 477 desc=fActiveConsumers.begin(); | |
829 | 478 fConsumers.push_back(pDesc); | |
830 | 479 } | |
831 | 480 | |
832 | 481 // cleanup segments | |
833 | 482 vector<AliHLTDataBuffer::AliHLTDataSegment>::iterator segment=fSegments.begin(); | |
834 | 483 while (segment!=fSegments.end()) { | |
835 | 484 fSegments.erase(segment); | |
836 | 485 segment=fSegments.begin(); | |
837 | 486 } | |
838 | 487 | |
839 | 488 // cleanup raw buffer | |
840 | 489 if (pBuffer) { | |
841 | 490 ReleaseRawBuffer(pBuffer); | |
842 | 491 } | |
843 | 492 return iResult; | |
844 | 493 } | |
845 | \end{verbatim}\normalsize | |
846 | ||
847 | ||
848 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!SetConsumer@{SetConsumer}} | |
849 | \index{SetConsumer@{SetConsumer}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
850 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTData\-Buffer::Set\-Consumer ({\bf Ali\-HLTComponent} $\ast$ {\em p\-Consumer})}\label{classAliHLTDataBuffer_a4} | |
851 | ||
852 | ||
853 | Add component to the list of consumers \begin{Desc} | |
854 | \item[Parameters:] | |
855 | \begin{description} | |
856 | \item[{\em p\-Consumer}]- a consumer of type {\bf Ali\-HLTComponent}{\rm (p.\,\pageref{classAliHLTComponent})} \end{description} | |
857 | \end{Desc} | |
858 | ||
859 | ||
860 | Definition at line 98 of file Ali\-HLTData\-Buffer.cxx. | |
861 | ||
862 | References f\-Consumers, Find\-Consumer(), Ali\-HLTComponent::Get\-Component\-ID(), HLTDebug, HLTError, and HLTWarning. | |
863 | ||
864 | Referenced by Ali\-HLTTask::Start\-Run(). | |
865 | ||
866 | \footnotesize\begin{verbatim}99 { | |
867 | 100 // see header file for function documentation | |
868 | 101 int iResult=0; | |
869 | 102 if (pConsumer) { | |
870 | 103 if (FindConsumer(pConsumer)) { | |
871 | 104 HLTWarning("consumer %s (%p) already set to data buffer %p", pConsumer->GetComponentID(), pConsumer, this); | |
872 | 105 } | |
873 | 106 AliHLTConsumerDescriptor* pDesc=new AliHLTConsumerDescriptor(pConsumer); | |
874 | 107 if (pDesc) { | |
875 | 108 fConsumers.push_back(pDesc); | |
876 | 109 HLTDebug("set consumer %s (%p) to data buffer %p", pConsumer->GetComponentID(), pConsumer, this); | |
877 | 110 } else { | |
878 | 111 HLTError("memory allocation failed"); | |
879 | 112 iResult=-ENOMEM; | |
880 | 113 } | |
881 | 114 } else { | |
882 | 115 HLTError("invalid parameter: consumer component (nil)"); | |
883 | 116 iResult=-EINVAL; | |
884 | 117 } | |
885 | 118 return iResult; | |
886 | 119 } | |
887 | \end{verbatim}\normalsize | |
888 | ||
889 | ||
890 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!SetSegments@{SetSegments}} | |
891 | \index{SetSegments@{SetSegments}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
892 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTData\-Buffer::Set\-Segments ({\bf Ali\-HLTUInt8\_\-t} $\ast$ {\em p\-Tgt}, {\bf Ali\-HLTComponent\-Block\-Data} $\ast$ {\em array\-Segments}, int {\em i\-Size})}\label{classAliHLTDataBuffer_a9} | |
893 | ||
894 | ||
895 | Set the segments for the data buffer. This is usually done after the component has written the data to the buffer, which was requested by the {\bf Get\-Target\-Buffer}{\rm (p.\,\pageref{classAliHLTDataBuffer_a8})} method. The component might produce different types of data, for each type a segment has to be defined which describes the data inside the buffer.\par | |
896 | The {\bf Ali\-HLTComponent\-Block\-Data}{\rm (p.\,\pageref{structAliHLTComponentBlockData})} segment descriptor comes directly from the {\bf Ali\-HLTComponent::Process\-Event}{\rm (p.\,\pageref{classAliHLTComponent_a6})} method. \begin{Desc} | |
897 | \item[Parameters:] | |
898 | \begin{description} | |
899 | \item[{\em p\-Tgt}]the target buffer which the segments refer to \item[{\em array\-Segments}]the output block descriptors of the component \item[{\em i\-Size}]size of the array \end{description} | |
900 | \end{Desc} | |
901 | ||
902 | ||
903 | Definition at line 283 of file Ali\-HLTData\-Buffer.cxx. | |
904 | ||
905 | References Ali\-HLTComponent\-Block\-Data::f\-Data\-Type, Ali\-HLTData\-Buffer::Ali\-HLTData\-Segment::f\-Data\-Type, Ali\-HLTComponent\-Block\-Data::f\-Offset, fp\-Buffer, Ali\-HLTData\-Buffer::Ali\-HLTRaw\-Buffer::f\-Ptr, Ali\-HLTData\-Buffer::Ali\-HLTData\-Segment::f\-Segment\-Offset, f\-Segments, Ali\-HLTData\-Buffer::Ali\-HLTData\-Segment::f\-Segment\-Size, Ali\-HLTData\-Buffer::Ali\-HLTRaw\-Buffer::f\-Size, Ali\-HLTComponent\-Block\-Data::f\-Size, Ali\-HLTComponent\-Block\-Data::f\-Specification, Ali\-HLTData\-Buffer::Ali\-HLTData\-Segment::f\-Specification, HLTDebug, HLTError, and HLTFatal. | |
906 | ||
907 | Referenced by Ali\-HLTTask::Process\-Task(). | |
908 | ||
909 | \footnotesize\begin{verbatim}284 { | |
910 | 285 // see header file for function documentation | |
911 | 286 int iResult=0; | |
912 | 287 if (pTgt && arrayBlockData && iSize>=0) { | |
913 | 288 if (fpBuffer) { | |
914 | 289 if (fpBuffer->fPtr==(void*)pTgt) { | |
915 | 290 AliHLTDataBuffer::AliHLTDataSegment segment; | |
916 | 291 for (int i=0; i<iSize; i++) { | |
917 | 292 if (arrayBlockData[i].fOffset+arrayBlockData[i].fSize<=fpBuffer->fSize) { | |
918 | 293 segment.fSegmentOffset=arrayBlockData[i].fOffset; | |
919 | 294 segment.fSegmentSize=arrayBlockData[i].fSize; | |
920 | 295 segment.fDataType=arrayBlockData[i].fDataType; | |
921 | 296 segment.fSpecification=arrayBlockData[i].fSpecification; | |
922 | 297 fSegments.push_back(segment); | |
923 | 298 HLTDebug("set segment %s with size %d at offset %d", AliHLTComponent::DataType2Text(segment.fDataType).data(), segment.fSegmentSize, segment.fSegmentOffset); | |
924 | 299 } else { | |
925 | 300 HLTError("block data specification %#d (%s) exceeds size of data buffer", i, AliHLTComponent::DataType2Text(arrayBlockData[i].fDataType).data()); | |
926 | 301 HLTError("block offset=%d, block size=%d, buffer size=%d", arrayBlockData[i].fOffset, arrayBlockData[i].fSize, fpBuffer->fSize); | |
927 | 302 iResult=-E2BIG; | |
928 | 303 } | |
929 | 304 } | |
930 | 305 } else { | |
931 | 306 HLTError("this data buffer (%p) does not match the internal data buffer %p of raw buffer %p", pTgt, fpBuffer->fPtr, fpBuffer); | |
932 | 307 iResult=-EINVAL; | |
933 | 308 } | |
934 | 309 } else { | |
935 | 310 HLTFatal("internal data structur missmatch"); | |
936 | 311 iResult=-EFAULT; | |
937 | 312 } | |
938 | 313 } else { | |
939 | 314 HLTError("invalid parameter: pTgtBuffer=%p arrayBlockData=%p", pTgt, arrayBlockData); | |
940 | 315 iResult=-EINVAL; | |
941 | 316 } | |
942 | 317 return iResult; | |
943 | 318 } | |
944 | \end{verbatim}\normalsize | |
945 | ||
946 | ||
947 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!Subscribe@{Subscribe}} | |
948 | \index{Subscribe@{Subscribe}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
949 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Ali\-HLTData\-Buffer::Subscribe (const {\bf Ali\-HLTComponent} $\ast$ {\em p\-Consumer}, {\bf Ali\-HLTComponent\-Block\-Data} $\ast$ {\em array\-Block\-Desc}, int {\em i\-Array\-Size})}\label{classAliHLTDataBuffer_a6} | |
950 | ||
951 | ||
952 | Subscribe to a segment of the data buffer. The function prepares the block descriptor for subsequent use with the {\bf Ali\-HLTComponent::Process\-Event}{\rm (p.\,\pageref{classAliHLTComponent_a6})} method, the method can prepare several block descriptors up to the array size specified by i\-Array\-Size. The return value is independent from the array size the number of block descriptors which would have been prepared if there was enough space in the array\par | |
953 | The method is used by the consumer component. \begin{Desc} | |
954 | \item[Parameters:] | |
955 | \begin{description} | |
956 | \item[{\em p\-Consumer}]the component which subscribes to the buffer \item[{\em array\-Block\-Desc}]pointer to block descriptor to be filled \item[{\em i\-Array\-Size}]size of the block descriptor array \end{description} | |
957 | \end{Desc} | |
958 | \begin{Desc} | |
959 | \item[Returns:]: number of matching data blocks, neg. error code if failed\par | |
960 | -EACCESS the consumer state can't be changed (activated) -EBADF unresolved data segments \par | |
961 | -ENOENT consumer component not found \par | |
962 | -ENODATA data buffer does not have raw data \par | |
963 | -EINVAL invalid parameter \par | |
964 | \end{Desc} | |
965 | ||
966 | ||
967 | Definition at line 170 of file Ali\-HLTData\-Buffer.cxx. | |
968 | ||
969 | References Change\-Consumer\-State(), f\-Active\-Consumers, f\-Consumers, Ali\-HLTComponent\-Block\-Data::f\-Data\-Type, Find\-Consumer(), Find\-Matching\-Data\-Segments(), Ali\-HLTComponent\-Block\-Data::f\-Offset, fp\-Buffer, Ali\-HLTData\-Buffer::Ali\-HLTRaw\-Buffer::f\-Ptr, Ali\-HLTComponent\-Block\-Data::f\-Ptr, Ali\-HLTComponent\-Shm\-Data::f\-Shm\-ID, Ali\-HLTComponent\-Block\-Data::f\-Shm\-Key, Ali\-HLTComponent\-Shm\-Data::f\-Shm\-Type, Ali\-HLTComponent\-Block\-Data::f\-Size, Ali\-HLTComponent\-Block\-Data::f\-Specification, Ali\-HLTComponent\-Shm\-Data::f\-Struct\-Size, Ali\-HLTComponent\-Block\-Data::f\-Struct\-Size, HLTDebug, HLTError, and Ali\-HLTConsumer\-Descriptor::Set\-Active\-Data\-Segment(). | |
970 | ||
971 | Referenced by Ali\-HLTTask::Subscribe(). | |
972 | ||
973 | \footnotesize\begin{verbatim}171 { | |
974 | 172 // see header file for function documentation | |
975 | 173 int iResult=0; | |
976 | 174 if (pConsumer && arrayBlockDesc) { | |
977 | 175 if (fpBuffer) { | |
978 | 176 AliHLTConsumerDescriptor* pDesc=FindConsumer(pConsumer, fConsumers); | |
979 | 177 if (pDesc) { | |
980 | 178 vector<AliHLTDataBuffer::AliHLTDataSegment> tgtList; | |
981 | 179 /* TODO: think about a good policy for this check | |
982 | 180 * is it enough that at least one segment is available, or have all to be available? | |
983 | 181 * or is it possible to have optional segments? | |
984 | 182 */ | |
985 | 183 if ((iResult=FindMatchingDataSegments(pConsumer, tgtList))>0) { | |
986 | 184 int i =0; | |
987 | 185 vector<AliHLTDataBuffer::AliHLTDataSegment>::iterator segment=tgtList.begin(); | |
988 | 186 while (segment!=tgtList.end() && i<iArraySize) { | |
989 | 187 // fill the block data descriptor | |
990 | 188 arrayBlockDesc[i].fStructSize=sizeof(AliHLTComponentBlockData); | |
991 | 189 // the shared memory key is not used in AliRoot | |
992 | 190 arrayBlockDesc[i].fShmKey.fStructSize=sizeof(AliHLTComponentShmData); | |
993 | 191 arrayBlockDesc[i].fShmKey.fShmType=gkAliHLTComponentInvalidShmType; | |
994 | 192 arrayBlockDesc[i].fShmKey.fShmID=gkAliHLTComponentInvalidShmID; | |
995 | 193 arrayBlockDesc[i].fOffset=(*segment).fSegmentOffset; | |
996 | 194 arrayBlockDesc[i].fPtr=fpBuffer->fPtr; | |
997 | 195 arrayBlockDesc[i].fSize=(*segment).fSegmentSize; | |
998 | 196 arrayBlockDesc[i].fDataType=(*segment).fDataType; | |
999 | 197 arrayBlockDesc[i].fSpecification=(*segment).fSpecification; | |
1000 | 198 pDesc->SetActiveDataSegment(arrayBlockDesc[i].fOffset, arrayBlockDesc[i].fSize); | |
1001 | 199 HLTDebug("component %p (%s) subscribed to segment #%d offset %d", pConsumer, ((AliHLTComponent*)pConsumer)->GetComponentID(), i, arrayBlockDesc[i].fOffset); | |
1002 | 200 i++; | |
1003 | 201 segment++; | |
1004 | 202 } | |
1005 | 203 // move this consumer to the active list | |
1006 | 204 if (ChangeConsumerState(pDesc, fConsumers, fActiveConsumers)>=0) { | |
1007 | 205 HLTDebug("component %p (%s) subscribed to data buffer %p", pConsumer, ((AliHLTComponent*)pConsumer)->GetComponentID(), this); | |
1008 | 206 } else { | |
1009 | 207 // TODO: cleanup the consumer descriptor correctly | |
1010 | 208 memset(arrayBlockDesc, 0, iArraySize*sizeof(AliHLTComponentBlockData)); | |
1011 | 209 HLTError("can not activate consumer %p for data buffer %p", pConsumer, this); | |
1012 | 210 iResult=-EACCES; | |
1013 | 211 } | |
1014 | 212 } else { | |
1015 | 213 HLTError("unresolved data segment(s) for component %p (%s)", pConsumer, ((AliHLTComponent*)pConsumer)->GetComponentID()); | |
1016 | 214 iResult=-EBADF; | |
1017 | 215 } | |
1018 | 216 } else { | |
1019 | 217 HLTError("component %p is not a data consumer of data buffer %s", pConsumer, this); | |
1020 | 218 iResult=-ENOENT; | |
1021 | 219 } | |
1022 | 220 } else { | |
1023 | 221 HLTError("data buffer %p is empty", this); | |
1024 | 222 iResult=-ENODATA; | |
1025 | 223 } | |
1026 | 224 } else { | |
1027 | 225 HLTError("invalid parameter"); | |
1028 | 226 iResult=-EINVAL; | |
1029 | 227 } | |
1030 | 228 return iResult; | |
1031 | 229 } | |
1032 | \end{verbatim}\normalsize | |
1033 | ||
1034 | ||
1035 | ||
1036 | ||
1037 | \subsection{Member Data Documentation} | |
1038 | \index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!fActiveConsumers@{fActiveConsumers}} | |
1039 | \index{fActiveConsumers@{fActiveConsumers}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
1040 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}vector$<${\bf Ali\-HLTConsumer\-Descriptor}$\ast$$>$ {\bf Ali\-HLTData\-Buffer::f\-Active\-Consumers}\hspace{0.3cm}{\tt [private]}}\label{classAliHLTDataBuffer_r2} | |
1041 | ||
1042 | ||
1043 | ||
1044 | ||
1045 | Definition at line 283 of file Ali\-HLTData\-Buffer.h. | |
1046 | ||
1047 | Referenced by Find\-Consumer(), Get\-Nof\-Active\-Consumers(), Release(), Reset\-Data\-Buffer(), and Subscribe().\index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!fConsumers@{fConsumers}} | |
1048 | \index{fConsumers@{fConsumers}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
1049 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}vector$<${\bf Ali\-HLTConsumer\-Descriptor}$\ast$$>$ {\bf Ali\-HLTData\-Buffer::f\-Consumers}\hspace{0.3cm}{\tt [private]}}\label{classAliHLTDataBuffer_r1} | |
1050 | ||
1051 | ||
1052 | ||
1053 | ||
1054 | Definition at line 281 of file Ali\-HLTData\-Buffer.h. | |
1055 | ||
1056 | Referenced by Cleanup\-Consumer\-List(), Find\-Consumer(), Get\-Nof\-Consumers(), Reset\-Data\-Buffer(), Set\-Consumer(), and Subscribe().\index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!fFlags@{fFlags}} | |
1057 | \index{fFlags@{fFlags}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
1058 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTUInt32\_\-t} {\bf Ali\-HLTData\-Buffer::f\-Flags}\hspace{0.3cm}{\tt [private]}}\label{classAliHLTDataBuffer_r5} | |
1059 | ||
1060 | ||
1061 | transient | |
1062 | ||
1063 | ||
1064 | ||
1065 | Definition at line 291 of file Ali\-HLTData\-Buffer.h.\index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!fgActiveBuffers@{fgActiveBuffers}} | |
1066 | \index{fgActiveBuffers@{fgActiveBuffers}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
1067 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}vector$<$ {\bf Ali\-HLTData\-Buffer::Ali\-HLTRaw\-Buffer} $\ast$ $>$ {\bf Ali\-HLTData\-Buffer::fg\-Active\-Buffers}\hspace{0.3cm}{\tt [static, private]}}\label{classAliHLTDataBuffer_v2} | |
1068 | ||
1069 | ||
1070 | global list of currently active raw buffers | |
1071 | ||
1072 | Definition at line 83 of file Ali\-HLTData\-Buffer.cxx. | |
1073 | ||
1074 | Referenced by Create\-Raw\-Buffer(), Delete\-Raw\-Buffers(), and Release\-Raw\-Buffer().\index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!fgFreeBuffers@{fgFreeBuffers}} | |
1075 | \index{fgFreeBuffers@{fgFreeBuffers}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
1076 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}vector$<$ {\bf Ali\-HLTData\-Buffer::Ali\-HLTRaw\-Buffer} $\ast$ $>$ {\bf Ali\-HLTData\-Buffer::fg\-Free\-Buffers}\hspace{0.3cm}{\tt [static, private]}}\label{classAliHLTDataBuffer_v1} | |
1077 | ||
1078 | ||
1079 | global list of free raw buffers | |
1080 | ||
1081 | Definition at line 82 of file Ali\-HLTData\-Buffer.cxx. | |
1082 | ||
1083 | Referenced by Create\-Raw\-Buffer(), Delete\-Raw\-Buffers(), and Release\-Raw\-Buffer().\index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!fgkSafetyPattern@{fgkSafetyPattern}} | |
1084 | \index{fgkSafetyPattern@{fgkSafetyPattern}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
1085 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char {\bf Ali\-HLTData\-Buffer::fgk\-Safety\-Pattern} = \{0x28, 0x63, 0x29, 0x4d, 0x52, 0x49, 0x43, 0x48, 0x54, 0x45, 0x52, 0x20, 0x32, 0x30, 0x30, 0x37\}\hspace{0.3cm}{\tt [static, private]}}\label{classAliHLTDataBuffer_v6} | |
1086 | ||
1087 | ||
1088 | the safety pattern | |
1089 | ||
1090 | Definition at line 87 of file Ali\-HLTData\-Buffer.cxx. | |
1091 | ||
1092 | Referenced by Create\-Raw\-Buffer(), and Release\-Raw\-Buffer().\index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!fgkSafetyPatternSize@{fgkSafetyPatternSize}} | |
1093 | \index{fgkSafetyPatternSize@{fgkSafetyPatternSize}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
1094 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}const Int\_\-t {\bf Ali\-HLTData\-Buffer::fgk\-Safety\-Pattern\-Size} = 16\hspace{0.3cm}{\tt [static, private]}}\label{classAliHLTDataBuffer_v5} | |
1095 | ||
1096 | ||
1097 | size of the safety pattern | |
1098 | ||
1099 | Definition at line 86 of file Ali\-HLTData\-Buffer.cxx. | |
1100 | ||
1101 | Referenced by Release\-Raw\-Buffer().\index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!fgLogging@{fgLogging}} | |
1102 | \index{fgLogging@{fgLogging}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
1103 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTLogging} {\bf Ali\-HLTData\-Buffer::fg\-Logging}\hspace{0.3cm}{\tt [static, private]}}\label{classAliHLTDataBuffer_v4} | |
1104 | ||
1105 | ||
1106 | global instance to HLT logging class for static methods | |
1107 | ||
1108 | Definition at line 85 of file Ali\-HLTData\-Buffer.cxx. | |
1109 | ||
1110 | Referenced by Create\-Raw\-Buffer(), Delete\-Raw\-Buffers(), and Release\-Raw\-Buffer().\index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!fgMargin@{fgMargin}} | |
1111 | \index{fgMargin@{fgMargin}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
1112 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTUInt32\_\-t} {\bf Ali\-HLTData\-Buffer::fg\-Margin} = 1024\hspace{0.3cm}{\tt [static, private]}}\label{classAliHLTDataBuffer_v3} | |
1113 | ||
1114 | ||
1115 | determines the raw buffer size margin at buffer requests | |
1116 | ||
1117 | Definition at line 84 of file Ali\-HLTData\-Buffer.cxx.\index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!fgNofInstances@{fgNofInstances}} | |
1118 | \index{fgNofInstances@{fgNofInstances}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
1119 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}int {\bf Ali\-HLTData\-Buffer::fg\-Nof\-Instances} = 0\hspace{0.3cm}{\tt [static, private]}}\label{classAliHLTDataBuffer_v0} | |
1120 | ||
1121 | ||
1122 | Number of instances of Ali\-HLTData\-Buffer. The statice variable is incremented and decremented in the constructor/ destructor. All internal data structures are cleaned up when the last instance is exiting. | |
1123 | ||
1124 | Definition at line 81 of file Ali\-HLTData\-Buffer.cxx. | |
1125 | ||
1126 | Referenced by $\sim$Ali\-HLTData\-Buffer().\index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!fpBuffer@{fpBuffer}} | |
1127 | \index{fpBuffer@{fpBuffer}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
1128 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ali\-HLTRaw\-Buffer}$\ast$ {\bf Ali\-HLTData\-Buffer::fp\-Buffer}\hspace{0.3cm}{\tt [private]}}\label{classAliHLTDataBuffer_r4} | |
1129 | ||
1130 | ||
1131 | ||
1132 | ||
1133 | Definition at line 288 of file Ali\-HLTData\-Buffer.h. | |
1134 | ||
1135 | Referenced by Get\-Target\-Buffer(), Is\-Empty(), Reset\-Data\-Buffer(), Set\-Segments(), and Subscribe().\index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!fReleasedConsumers@{fReleasedConsumers}} | |
1136 | \index{fReleasedConsumers@{fReleasedConsumers}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
1137 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}vector$<${\bf Ali\-HLTConsumer\-Descriptor}$\ast$$>$ {\bf Ali\-HLTData\-Buffer::f\-Released\-Consumers}\hspace{0.3cm}{\tt [private]}}\label{classAliHLTDataBuffer_r3} | |
1138 | ||
1139 | ||
1140 | ||
1141 | ||
1142 | Definition at line 285 of file Ali\-HLTData\-Buffer.h. | |
1143 | ||
1144 | Referenced by Find\-Consumer(), Get\-Nof\-Consumers(), Release(), and Reset\-Data\-Buffer().\index{AliHLTDataBuffer@{Ali\-HLTData\-Buffer}!fSegments@{fSegments}} | |
1145 | \index{fSegments@{fSegments}!AliHLTDataBuffer@{Ali\-HLTData\-Buffer}} | |
1146 | \subsubsection{\setlength{\rightskip}{0pt plus 5cm}vector$<${\bf Ali\-HLTData\-Segment}$>$ {\bf Ali\-HLTData\-Buffer::f\-Segments}\hspace{0.3cm}{\tt [private]}}\label{classAliHLTDataBuffer_r0} | |
1147 | ||
1148 | ||
1149 | ||
1150 | ||
1151 | Definition at line 278 of file Ali\-HLTData\-Buffer.h. | |
1152 | ||
1153 | Referenced by Find\-Matching\-Data\-Segments(), Get\-Nof\-Segments(), Reset\-Data\-Buffer(), and Set\-Segments(). | |
1154 | ||
1155 | The documentation for this class was generated from the following files:\begin{CompactItemize} | |
1156 | \item | |
1157 | /home/perthi/cern/aliroot/Ali\-Root\_\-head020507/HLT/BASE/{\bf Ali\-HLTData\-Buffer.h}\item | |
1158 | /home/perthi/cern/aliroot/Ali\-Root\_\-head020507/HLT/BASE/{\bf Ali\-HLTData\-Buffer.cxx}\end{CompactItemize} |