| The Gaudi Framework v28r2-patches (bc4ad17a)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
StreamBuffer Class Reference

The stream buffer is a small object collecting object data. More...

`#include <GaudiKernel/StreamBuffer.h>`

Collaboration diagram for StreamBuffer:
[legend]

## Classes
class | ContainedLink
| Definition of the contained link set. More...
class | DataIO
| A small base class to handle generic data streaming. More...
class | IdentifiedLink
| Definition of the contained link set. More...
class | Istream
| Reader for standard input streams. More...
class | Ostream
| Writer for standard output streams. More...

## Public Types
enum | Mode { UNINITIALIZED, READING, WRITING }
| Streamer mode. More...
enum | SwapAction { SINGLE_BYTE, SWAP, NOSWAP }
| Data Sawp actions. More...
enum | State { INVALID =-1, VALID }
| Link state defintions. More...
typedef std::vector< ContainedLink > | ContainedLinks
typedef std::vector< IdentifiedLink > | IdentifiedLinks
| Definition of the identifiable link set. More...
typedef void(* | AnalyzeFunction) (const void *data, int siz, const std::type_info &type)
| Definition of the buffer analyzer. More...

## Public Member Functions
| StreamBuffer (bool do_swap=true)
| Standard constructor. More...
virtual | ~StreamBuffer ()
| Standard destructor. More...
const char * | data () const
| Read access to data buffer. More...
char * | data ()
| write access to data buffer More...
void | erase ()
| Reset the buffer. More...
char * | adopt () const
| Remove the data buffer and pass it to client. It's the client responsability to free the memory. More...
void | reserve (long len)
| Reserve buffer space; Default: 16 k buffer size. More...
void | extend (long len)
| Extend the buffer. More...
long | size () const
| Total buffer size. More...
ContainedLinks & | containedLinks ()
| Access to contained links. More...
const ContainedLinks & | containedLinks () const
| CONST Access to contained links. More...
IdentifiedLinks & | identifiedLinks ()
| Access to identified links. More...
const IdentifiedLinks & | identifiedLinks () const
| CONST Access to identified links. More...
void | setMode (Mode m)
| Set mode of the stream and allocate buffer. More...
bool | isReading () const
| Get stream buffer state. More...
bool | isWriting () const
| Get stream buffer state. More...
long | buffPointer () const
| Retrieve current buffer pointer. More...
void | setBuffPointer (long ptr)
| Retrieve current buffer pointer. More...
void | setAnalyzer (AnalyzeFunction fun=nullptr)
| Enable user analysis function. More...
void | swapToBuffer (const void *source, int siz)
| Swap buffers: int, long, short, float and double. More...
void | swapFromBuffer (void *target, int siz)
| Swap buffers: int, long, short, float and double. More...
StreamBuffer & | writeBytes (const char *str, long len)
| Write string to output stream. More...
void | getIdentifiedLink (DataObject *&pObject, long &hint)
void | addIdentifiedLink (const DataObject *pObject, long hint)
void | getContainedLink (ContainedObject *&pObject, long &hint, long &link)
void | addContainedLink (const ContainedObject *pObject, long hint, long link)
StreamBuffer & | operator<< (longlong data)
| Output Streamer. More...
StreamBuffer & | operator>> (longlong &data)
| Input Streamer. More...
StreamBuffer & | operator<< (int data)
| Output Streamer. More...
StreamBuffer & | operator>> (int &data)
| Input Streamer. More...
StreamBuffer & | operator<< (unsigned int data)
| Output Streamer. More...
StreamBuffer & | operator>> (unsigned int &data)
| Input Streamer. More...
StreamBuffer & | operator<< (long data)
| Output Streamer. More...
StreamBuffer & | operator>> (long &data)
| Input Streamer. More...
StreamBuffer & | operator<< (unsigned long data)
| Output Streamer. More...
StreamBuffer & | operator>> (unsigned long &data)
| Input Streamer. More...
StreamBuffer & | operator<< (short data)
| Output Streamer. More...
StreamBuffer & | operator>> (short &data)
| Input Streamer. More...
StreamBuffer & | operator<< (unsigned short data)
| Output Streamer. More...
StreamBuffer & | operator>> (unsigned short &data)
| Input Streamer. More...
StreamBuffer & | operator<< (char data)
| Output Streamer. More...
StreamBuffer & | operator>> (char &data)
| Input Streamer. More...
StreamBuffer & | operator<< (unsigned char data)
| Output Streamer. More...
StreamBuffer & | operator>> (unsigned char &data)
| Input Streamer. More...
StreamBuffer & | operator<< (float data)
| Output Streamer. More...
StreamBuffer & | operator>> (float &data)
| Input Streamer. More...
StreamBuffer & | operator<< (double data)
| Output Streamer. More...
StreamBuffer & | operator>> (double &data)
| Input Streamer. More...
StreamBuffer & | operator>> (char *data)
| Streamer to read strings in (char*) format. More...
StreamBuffer & | operator<< (const char *data)
| Streamer to write strings in (char*) format. More...
StreamBuffer & | operator>> (std::string &data)
| Streamer to read strings in (std::string) format. More...
StreamBuffer & | operator<< (const std::string &data)
| Streamer to write strings in (std::string) format. More...
template<class TYPE >
StreamBuffer & | operator>> (TYPE *&refpObject)
| Streamer to read links to contained or identified objects. More...
StreamBuffer & | operator<< (const ContainedObject *pObject)
| Streamer to write links to contained objects. More...
StreamBuffer & | operator<< (const DataObject *pObject)
| Streamer to write links to identified objects. More...
void | serialize (DataIO &ioObject)
| Serialize the buffer using an IO object. More...

## Protected Member Functions
SwapAction | swapBuffer (int siz) const
| Check for byte swapping. More...
template<class TYPE >
StreamBuffer & | getObjectPointer (const DataObject *, TYPE *&refpObject)
| Helper to distinguish between identified pointers and contained pointers. More...
template<class TYPE >
StreamBuffer & | getObjectPointer (const ContainedObject *, TYPE *&refpObject)
| Helper to distinguish between identified pointers and contained pointers. More...

## Protected Attributes
Mode | m_mode = UNINITIALIZED
| Boolean indicating wether the stream is in read or write mode. More...
long | m_pointer = 0
| Current buffer pointer. More...
long | m_length = 0
| Total buffer length. More...
char * | m_buffer = nullptr
| Pointer to heap buffer. More...
bool | m_swapEnabled = true
| Flag indicating swapping. More...
ContainedLinks | m_containedLinks
| Container with links to contained objects. More...
IdentifiedLinks | m_identifiedLinks
| Container with links to contained objects. More...
AnalyzeFunction | m_analyzer = nullptr
| Hook function for analysis of data to the stream. More...

## Friends
class | DataObject
| DataObject is friend. More...

## Detailed Description

The stream buffer is a small object collecting object data.

The basic idea behind the StreamBuffer is generic object conversion. The StreamBuffer acts as a byte stream (hence inheriting from a std::string: DP: this is not true anymore and it is not a bad thing in my opinion) and stores any information streamed to the buffer. Since the information must be represented in a generic way on the fly byte swapping is performed. However, not only primitive data can be stored in the buffer, but also pointers to DataObjects (symbolic links) and pointers to contained objects. Automatically during serialization the persistent references to the corresponding objects and containers must be stored. These objects are accessible from the StreamBuffer object.

"On the fly" data conversion to non persistent

Author
  M.Frank

Definition at line 41 of file StreamBuffer.h.

## Member Typedef Documentation

typedef void(* StreamBuffer::AnalyzeFunction) (const void *data, int siz, const std::type_info &type)

Definition of the buffer analyzer.

Definition at line 149 of file StreamBuffer.h.

typedef std::vector<ContainedLink> StreamBuffer::ContainedLinks

Definition at line 145 of file StreamBuffer.h.

typedef std::vector<IdentifiedLink> StreamBuffer::IdentifiedLinks

Definition of the identifiable link set.

Definition at line 147 of file StreamBuffer.h.

## Member Enumeration Documentation

enum StreamBuffer::Mode

Streamer mode.

Enumerator
UNINITIALIZED |
READING |
WRITING |

Definition at line 113 of file StreamBuffer.h.

113 {UNINITIALIZED, READING, WRITING};
StreamBuffer::READING
Definition: StreamBuffer.h:113
StreamBuffer::UNINITIALIZED
Definition: StreamBuffer.h:113
StreamBuffer::WRITING
Definition: StreamBuffer.h:113

enum StreamBuffer::State

Link state defintions.

Enumerator
INVALID |
VALID |

Definition at line 117 of file StreamBuffer.h.

117 {INVALID=-1, VALID };
StreamBuffer::VALID
Definition: StreamBuffer.h:117
StreamBuffer::INVALID
Definition: StreamBuffer.h:117

enum StreamBuffer::SwapAction

Data Sawp actions.

Enumerator
SINGLE_BYTE |
SWAP |
NOSWAP |

Definition at line 115 of file StreamBuffer.h.

115 {SINGLE_BYTE, SWAP, NOSWAP};
StreamBuffer::SWAP
Definition: StreamBuffer.h:115
StreamBuffer::SINGLE_BYTE
Definition: StreamBuffer.h:115
StreamBuffer::NOSWAP
Definition: StreamBuffer.h:115

## Constructor & Destructor Documentation

StreamBuffer::StreamBuffer | ( | bool | do_swap = `true` | ) |
| inline

Standard constructor.

Definition at line 203 of file StreamBuffer.h.

203 :
204 m_swapEnabled(do_swap) {
205 }
StreamBuffer::m_swapEnabled
bool m_swapEnabled
Flag indicating swapping.
Definition: StreamBuffer.h:167

virtual StreamBuffer::~StreamBuffer | ( |  | ) |
| inline virtual

Standard destructor.

Definition at line 207 of file StreamBuffer.h.

207 {
208 ::free( m_buffer );
209 }
StreamBuffer::m_buffer
char * m_buffer
Pointer to heap buffer.
Definition: StreamBuffer.h:164

## Member Function Documentation

void StreamBuffer::addContainedLink | ( | const ContainedObject * | pObject,
|  | long | hint,
|  | long | link
| ) |  |
| inline

Definition at line 332 of file StreamBuffer.h.

332 {
333 m_containedLinks.push_back( ContainedLink((ContainedObject*)pObject, hint, link) );
334 }
StreamBuffer::m_containedLinks
ContainedLinks m_containedLinks
Container with links to contained objects.
Definition: StreamBuffer.h:170
std::vector::push_back
T push_back(T...args)
ContainedObject
All classes that their objects may be contained in an LHCb ObjectContainer (e.g.
Definition: ContainedObject.h:29

void StreamBuffer::addIdentifiedLink | ( | const DataObject * | pObject,
|  | long | hint
| ) |  |
| inline

Definition at line 321 of file StreamBuffer.h.

321 {
322 m_identifiedLinks.push_back( IdentifiedLink((DataObject*)pObject, hint) );
323 }
std::vector::push_back
T push_back(T...args)
StreamBuffer::m_identifiedLinks
IdentifiedLinks m_identifiedLinks
Container with links to contained objects.
Definition: StreamBuffer.h:173
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30

char* StreamBuffer::adopt | ( |  | ) | const
| inline

Remove the data buffer and pass it to client. It's the client responsability to free the memory.

Definition at line 223 of file StreamBuffer.h.

223 {
224 char* ptr = m_buffer;
225 m_containedLinks.erase (m_containedLinks.begin(), m_containedLinks.end());
226 m_identifiedLinks.erase(m_identifiedLinks.begin(),m_identifiedLinks.end());
227 m_buffer = NULL; //char *
228 m_pointer = 0; // long
229 m_length = 0; // long
230 return ptr;
231 }
StreamBuffer::m_containedLinks
ContainedLinks m_containedLinks
Container with links to contained objects.
Definition: StreamBuffer.h:170
StreamBuffer::m_length
long m_length
Total buffer length.
Definition: StreamBuffer.h:161
StreamBuffer::m_buffer
char * m_buffer
Pointer to heap buffer.
Definition: StreamBuffer.h:164
std::vector::end
T end(T...args)
std::vector::erase
T erase(T...args)
StreamBuffer::m_pointer
long m_pointer
Current buffer pointer.
Definition: StreamBuffer.h:158
std::vector::begin
T begin(T...args)
StreamBuffer::m_identifiedLinks
IdentifiedLinks m_identifiedLinks
Container with links to contained objects.
Definition: StreamBuffer.h:173

long StreamBuffer::buffPointer | ( |  | ) | const
| inline

Retrieve current buffer pointer.

Definition at line 289 of file StreamBuffer.h.

289 {
290 return m_pointer;
291 }
StreamBuffer::m_pointer
long m_pointer
Current buffer pointer.
Definition: StreamBuffer.h:158

ContainedLinks& StreamBuffer::containedLinks | ( |  | ) |
| inline

Access to contained links.

Definition at line 254 of file StreamBuffer.h.

254 {
255 return m_containedLinks;
256 }
StreamBuffer::m_containedLinks
ContainedLinks m_containedLinks
Container with links to contained objects.
Definition: StreamBuffer.h:170

const ContainedLinks& StreamBuffer::containedLinks | ( |  | ) | const
| inline

CONST Access to contained links.

Definition at line 258 of file StreamBuffer.h.

258 {
259 return m_containedLinks;
260 }
StreamBuffer::m_containedLinks
ContainedLinks m_containedLinks
Container with links to contained objects.
Definition: StreamBuffer.h:170

const char* StreamBuffer::data | ( |  | ) | const
| inline

Read access to data buffer.

Definition at line 211 of file StreamBuffer.h.

211 {
212 return m_buffer;
213 }
StreamBuffer::m_buffer
char * m_buffer
Pointer to heap buffer.
Definition: StreamBuffer.h:164

char* StreamBuffer::data | ( |  | ) |
| inline

write access to data buffer

Definition at line 215 of file StreamBuffer.h.

215 {
216 return m_buffer;
217 }
StreamBuffer::m_buffer
char * m_buffer
Pointer to heap buffer.
Definition: StreamBuffer.h:164

void StreamBuffer::erase | ( |  | ) |
| inline

Reset the buffer.

Definition at line 219 of file StreamBuffer.h.

219 {
220 m_pointer = 0;
221 }
StreamBuffer::m_pointer
long m_pointer
Current buffer pointer.
Definition: StreamBuffer.h:158

void StreamBuffer::extend | ( | long | len | ) |
| inline

Extend the buffer.

Definition at line 240 of file StreamBuffer.h.

240 {
241 if ( len + m_pointer > m_length ) {
242 // We have to be a bit generous here in order not to run too often
243 // into ::realloc().
244 long new_len = (m_length < 16384) ? 16384 : 2*m_length;
245 if ( m_length < len ) new_len += len;
246 reserve(new_len);
247 }
248 }
StreamBuffer::m_length
long m_length
Total buffer length.
Definition: StreamBuffer.h:161
StreamBuffer::reserve
void reserve(long len)
Reserve buffer space; Default: 16 k buffer size.
Definition: StreamBuffer.h:233
StreamBuffer::m_pointer
long m_pointer
Current buffer pointer.
Definition: StreamBuffer.h:158

void StreamBuffer::getContainedLink | ( | ContainedObject *& | pObject,
|  | long & | hint,
|  | long & | link
| ) |  |
| inline

Definition at line 325 of file StreamBuffer.h.

325 {
326 ContainedLink& l = m_containedLinks.back();
327 pObject = l.first;
328 hint = l.second;
329 link = l.third;
330 m_containedLinks.pop_back();
331 }
StreamBuffer::m_containedLinks
ContainedLinks m_containedLinks
Container with links to contained objects.
Definition: StreamBuffer.h:170
std::vector::pop_back
T pop_back(T...args)
gaudirun.l
dictionary l
Definition: gaudirun.py:421
std::vector::back
T back(T...args)

void StreamBuffer::getIdentifiedLink | ( | DataObject *& | pObject,
|  | long & | hint
| ) |  |
| inline

Definition at line 315 of file StreamBuffer.h.

315 {
316 IdentifiedLink& l = m_identifiedLinks.back();
317 pObject = l.first;
318 hint = l.second;
319 m_identifiedLinks.pop_back();
320 }
std::vector::pop_back
T pop_back(T...args)
gaudirun.l
dictionary l
Definition: gaudirun.py:421
std::vector::back
T back(T...args)
StreamBuffer::m_identifiedLinks
IdentifiedLinks m_identifiedLinks
Container with links to contained objects.
Definition: StreamBuffer.h:173
template<class TYPE >

StreamBuffer& StreamBuffer::getObjectPointer | ( | const DataObject * | ,
|  | TYPE *& | refpObject
| ) |  |
| inline protected

Helper to distinguish between identified pointers and contained pointers.

This entry resolves identified pointers (= Pointers to DataObject instances.)

Definition at line 184 of file StreamBuffer.h.

184 {
185 IdentifiedLink& link = m_identifiedLinks.back();
186 DataObject* pObj = link.first;
187 m_identifiedLinks.pop_back();
188 refpObject = dynamic_cast<TYPE*>(pObj);
189 return *this;
190 }
std::vector::pop_back
T pop_back(T...args)
std::vector::back
T back(T...args)
StreamBuffer::m_identifiedLinks
IdentifiedLinks m_identifiedLinks
Container with links to contained objects.
Definition: StreamBuffer.h:173
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
template<class TYPE >

StreamBuffer& StreamBuffer::getObjectPointer | ( | const ContainedObject * | ,
|  | TYPE *& | refpObject
| ) |  |
| inline protected

Helper to distinguish between identified pointers and contained pointers.

This entry resolves contained pointers (= Pointers to ContainedObject instances.)

Definition at line 194 of file StreamBuffer.h.

194 {
195 ContainedLink& link = m_containedLinks.back();
196 ContainedObject* pObj = link.first;
197 m_containedLinks.pop_back();
198 refpObject = dynamic_cast<TYPE*>(pObj);
199 return *this;
200 }
StreamBuffer::m_containedLinks
ContainedLinks m_containedLinks
Container with links to contained objects.
Definition: StreamBuffer.h:170
std::vector::pop_back
T pop_back(T...args)
ContainedObject
All classes that their objects may be contained in an LHCb ObjectContainer (e.g.
Definition: ContainedObject.h:29
std::vector::back
T back(T...args)

IdentifiedLinks& StreamBuffer::identifiedLinks | ( |  | ) |
| inline

Access to identified links.

Definition at line 263 of file StreamBuffer.h.

263 {
264 return m_identifiedLinks;
265 }
StreamBuffer::m_identifiedLinks
IdentifiedLinks m_identifiedLinks
Container with links to contained objects.
Definition: StreamBuffer.h:173

const IdentifiedLinks& StreamBuffer::identifiedLinks | ( |  | ) | const
| inline

CONST Access to identified links.

Definition at line 267 of file StreamBuffer.h.

267 {
268 return m_identifiedLinks;
269 }
StreamBuffer::m_identifiedLinks
IdentifiedLinks m_identifiedLinks
Container with links to contained objects.
Definition: StreamBuffer.h:173

bool StreamBuffer::isReading | ( |  | ) | const
| inline

Get stream buffer state.

Definition at line 280 of file StreamBuffer.h.

280 {
281 return m_mode == READING;
282 }
StreamBuffer::READING
Definition: StreamBuffer.h:113
StreamBuffer::m_mode
Mode m_mode
Boolean indicating wether the stream is in read or write mode.
Definition: StreamBuffer.h:155

bool StreamBuffer::isWriting | ( |  | ) | const
| inline

Get stream buffer state.

Definition at line 285 of file StreamBuffer.h.

285 {
286 return m_mode == WRITING;
287 }
StreamBuffer::m_mode
Mode m_mode
Boolean indicating wether the stream is in read or write mode.
Definition: StreamBuffer.h:155
StreamBuffer::WRITING
Definition: StreamBuffer.h:113

StreamBuffer& StreamBuffer::operator<< | ( | longlong | data | ) |
| inline

Output Streamer.

Definition at line 360 of file StreamBuffer.h.

360 {
361 swapToBuffer(&data, sizeof(data));
362 STREAM_ANALYSE(data, sizeof(data));
363 return *this;
364 }
StreamBuffer::swapToBuffer
void swapToBuffer(const void *source, int siz)
Swap buffers: int, long, short, float and double.
Definition: StreamBuffer.h:598
STREAM_ANALYSE
#define STREAM_ANALYSE(data, len)
Definition: StreamBuffer.h:339

StreamBuffer& StreamBuffer::operator<< | ( | int | data | ) |
| inline

Output Streamer.

Definition at line 371 of file StreamBuffer.h.

371 {
372 swapToBuffer(&data, sizeof(data));
373 STREAM_ANALYSE(data, sizeof(data));
374 return *this;
375 }
StreamBuffer::swapToBuffer
void swapToBuffer(const void *source, int siz)
Swap buffers: int, long, short, float and double.
Definition: StreamBuffer.h:598
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
STREAM_ANALYSE
#define STREAM_ANALYSE(data, len)
Definition: StreamBuffer.h:339

StreamBuffer& StreamBuffer::operator<< | ( | unsigned int | data | ) |
| inline

Output Streamer.

Definition at line 382 of file StreamBuffer.h.

382 {
383 swapToBuffer(&data, sizeof(data));
384 STREAM_ANALYSE(data, sizeof(data));
385 return *this;
386 }
StreamBuffer::swapToBuffer
void swapToBuffer(const void *source, int siz)
Swap buffers: int, long, short, float and double.
Definition: StreamBuffer.h:598
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
STREAM_ANALYSE
#define STREAM_ANALYSE(data, len)
Definition: StreamBuffer.h:339

StreamBuffer& StreamBuffer::operator<< | ( | long | data | ) |
| inline

Output Streamer.

Definition at line 393 of file StreamBuffer.h.

393 {
394 swapToBuffer(&data, sizeof(data));
395 STREAM_ANALYSE(data, sizeof(data));
396 return *this;
397 }
StreamBuffer::swapToBuffer
void swapToBuffer(const void *source, int siz)
Swap buffers: int, long, short, float and double.
Definition: StreamBuffer.h:598
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
STREAM_ANALYSE
#define STREAM_ANALYSE(data, len)
Definition: StreamBuffer.h:339

StreamBuffer& StreamBuffer::operator<< | ( | unsigned long | data | ) |
| inline

Output Streamer.

Definition at line 404 of file StreamBuffer.h.

404 {
405 swapToBuffer(&data, sizeof(data));
406 STREAM_ANALYSE(data, sizeof(data));
407 return *this;
408 }
StreamBuffer::swapToBuffer
void swapToBuffer(const void *source, int siz)
Swap buffers: int, long, short, float and double.
Definition: StreamBuffer.h:598
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
STREAM_ANALYSE
#define STREAM_ANALYSE(data, len)
Definition: StreamBuffer.h:339

StreamBuffer& StreamBuffer::operator<< | ( | short | data | ) |
| inline

Output Streamer.

Definition at line 415 of file StreamBuffer.h.

415 {
416 swapToBuffer(&data, sizeof(data));
417 STREAM_ANALYSE(data, sizeof(data));
418 return *this;
419 }
StreamBuffer::swapToBuffer
void swapToBuffer(const void *source, int siz)
Swap buffers: int, long, short, float and double.
Definition: StreamBuffer.h:598
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
STREAM_ANALYSE
#define STREAM_ANALYSE(data, len)
Definition: StreamBuffer.h:339

StreamBuffer& StreamBuffer::operator<< | ( | unsigned short | data | ) |
| inline

Output Streamer.

Definition at line 426 of file StreamBuffer.h.

426 {
427 swapToBuffer(&data, sizeof(data));
428 STREAM_ANALYSE(data, sizeof(data));
429 return *this;
430 }
StreamBuffer::swapToBuffer
void swapToBuffer(const void *source, int siz)
Swap buffers: int, long, short, float and double.
Definition: StreamBuffer.h:598
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
STREAM_ANALYSE
#define STREAM_ANALYSE(data, len)
Definition: StreamBuffer.h:339

StreamBuffer& StreamBuffer::operator<< | ( | char | data | ) |
| inline

Output Streamer.

Definition at line 437 of file StreamBuffer.h.

437 {
438 swapToBuffer(&data, sizeof(data));
439 STREAM_ANALYSE(data, sizeof(data));
440 return *this;
441 }
StreamBuffer::swapToBuffer
void swapToBuffer(const void *source, int siz)
Swap buffers: int, long, short, float and double.
Definition: StreamBuffer.h:598
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
STREAM_ANALYSE
#define STREAM_ANALYSE(data, len)
Definition: StreamBuffer.h:339

StreamBuffer& StreamBuffer::operator<< | ( | unsigned char | data | ) |
| inline

Output Streamer.

Definition at line 448 of file StreamBuffer.h.

448 {
449 swapToBuffer(&data, sizeof(data));
450 STREAM_ANALYSE(data, sizeof(data));
451 return *this;
452 }
StreamBuffer::swapToBuffer
void swapToBuffer(const void *source, int siz)
Swap buffers: int, long, short, float and double.
Definition: StreamBuffer.h:598
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
STREAM_ANALYSE
#define STREAM_ANALYSE(data, len)
Definition: StreamBuffer.h:339

StreamBuffer& StreamBuffer::operator<< | ( | float | data | ) |
| inline

Output Streamer.

Definition at line 459 of file StreamBuffer.h.

459 {
460 swapToBuffer(&data, sizeof(data));
461 STREAM_ANALYSE(data, sizeof(data));
462 return *this;
463 }
StreamBuffer::swapToBuffer
void swapToBuffer(const void *source, int siz)
Swap buffers: int, long, short, float and double.
Definition: StreamBuffer.h:598
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
STREAM_ANALYSE
#define STREAM_ANALYSE(data, len)
Definition: StreamBuffer.h:339

StreamBuffer& StreamBuffer::operator<< | ( | double | data | ) |
| inline

Output Streamer.

Definition at line 470 of file StreamBuffer.h.

470 {
471 swapToBuffer(&data, sizeof(data));
472 STREAM_ANALYSE(data, sizeof(data));
473 return *this;
474 }
StreamBuffer::swapToBuffer
void swapToBuffer(const void *source, int siz)
Swap buffers: int, long, short, float and double.
Definition: StreamBuffer.h:598
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
STREAM_ANALYSE
#define STREAM_ANALYSE(data, len)
Definition: StreamBuffer.h:339

StreamBuffer& StreamBuffer::operator<< | ( | const char * | data | ) |
| inline

Streamer to write strings in (char*) format.

Definition at line 490 of file StreamBuffer.h.

490 {
491 const char* ptr = 0 == data ? "" : data;
492 int len = strlen(ptr)+1;
493 if ( 0 == m_analyzer )
494 writeBytes(ptr, len);
495 else {
496 STREAM_ANALYSE(data, len);
497 }
498 return *this;
499 }
StreamBuffer::m_analyzer
AnalyzeFunction m_analyzer
Hook function for analysis of data to the stream.
Definition: StreamBuffer.h:176
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
STREAM_ANALYSE
#define STREAM_ANALYSE(data, len)
Definition: StreamBuffer.h:339
std::strlen
T strlen(T...args)
StreamBuffer::writeBytes
StreamBuffer & writeBytes(const char *str, long len)
Write string to output stream.
Definition: StreamBuffer.h:307

StreamBuffer& StreamBuffer::operator<< | ( | const std::string & | data | ) |
| inline

Streamer to write strings in (std::string) format.

Definition at line 510 of file StreamBuffer.h.

510 {
511 if ( 0 == m_analyzer) {
512 const char* ptr = data.c_str();
513 long len = data.length();
514 writeBytes(ptr, len);
515 }
516 else {
517 STREAM_ANALYSE(data, sizeof(data));
518 }
519 return *this;
520 }
StreamBuffer::m_analyzer
AnalyzeFunction m_analyzer
Hook function for analysis of data to the stream.
Definition: StreamBuffer.h:176
STREAM_ANALYSE
#define STREAM_ANALYSE(data, len)
Definition: StreamBuffer.h:339
std::string::length
T length(T...args)
std::string::c_str
T c_str(T...args)
StreamBuffer::writeBytes
StreamBuffer & writeBytes(const char *str, long len)
Write string to output stream.
Definition: StreamBuffer.h:307

StreamBuffer& StreamBuffer::operator<< | ( | const ContainedObject * | pObject | ) |
| inline

Streamer to write links to contained objects.

Links to contained objects are not stored immediately, but collected instead and analyzed later.

Parameters

  pObject | Pointer to object to be loaded.

Returns
  Reference to StreamBuffer object

Definition at line 537 of file StreamBuffer.h.

537 {
538 STREAM_ANALYSE(pObject, sizeof(pObject));
539 addContainedLink(pObject, INVALID, INVALID);
540 return *this;
541 }
STREAM_ANALYSE
#define STREAM_ANALYSE(data, len)
Definition: StreamBuffer.h:339
StreamBuffer::INVALID
Definition: StreamBuffer.h:117
StreamBuffer::addContainedLink
void addContainedLink(const ContainedObject *pObject, long hint, long link)
Definition: StreamBuffer.h:332

StreamBuffer& StreamBuffer::operator<< | ( | const DataObject * | pObject | ) |
| inline

Streamer to write links to identified objects.

Links to identified objects are not stored immediately, but collected instead and analyzed later.

Parameters

  pObject | Pointer to object to be loaded.

Returns
  Reference to StreamBuffer object

Definition at line 549 of file StreamBuffer.h.

549 {
550 STREAM_ANALYSE(pObject, sizeof(pObject));
551 addIdentifiedLink(pObject, INVALID);
552 return *this;
553 }
STREAM_ANALYSE
#define STREAM_ANALYSE(data, len)
Definition: StreamBuffer.h:339
StreamBuffer::addIdentifiedLink
void addIdentifiedLink(const DataObject *pObject, long hint)
Definition: StreamBuffer.h:321
StreamBuffer::INVALID
Definition: StreamBuffer.h:117

StreamBuffer& StreamBuffer::operator>> | ( | longlong & | data | ) |
| inline

Input Streamer.

Definition at line 366 of file StreamBuffer.h.

366 {
367 swapFromBuffer(&data, sizeof(data));
368 return *this;
369 }
StreamBuffer::swapFromBuffer
void swapFromBuffer(void *target, int siz)
Swap buffers: int, long, short, float and double.
Definition: StreamBuffer.h:622

StreamBuffer& StreamBuffer::operator>> | ( | int & | data | ) |
| inline

Input Streamer.

Definition at line 377 of file StreamBuffer.h.

377 {
378 swapFromBuffer(&data, sizeof(data));
379 return *this;
380 }
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
StreamBuffer::swapFromBuffer
void swapFromBuffer(void *target, int siz)
Swap buffers: int, long, short, float and double.
Definition: StreamBuffer.h:622

StreamBuffer& StreamBuffer::operator>> | ( | unsigned int & | data | ) |
| inline

Input Streamer.

Definition at line 388 of file StreamBuffer.h.

388 {
389 swapFromBuffer(&data, sizeof(data));
390 return *this;
391 }
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
StreamBuffer::swapFromBuffer
void swapFromBuffer(void *target, int siz)
Swap buffers: int, long, short, float and double.
Definition: StreamBuffer.h:622

StreamBuffer& StreamBuffer::operator>> | ( | long & | data | ) |
| inline

Input Streamer.

Definition at line 399 of file StreamBuffer.h.

399 {
400 swapFromBuffer(&data, sizeof(data));
401 return *this;
402 }
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
StreamBuffer::swapFromBuffer
void swapFromBuffer(void *target, int siz)
Swap buffers: int, long, short, float and double.
Definition: StreamBuffer.h:622

StreamBuffer& StreamBuffer::operator>> | ( | unsigned long & | data | ) |
| inline

Input Streamer.

Definition at line 410 of file StreamBuffer.h.

410 {
411 swapFromBuffer(&data, sizeof(data));
412 return *this;
413 }
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
StreamBuffer::swapFromBuffer
void swapFromBuffer(void *target, int siz)
Swap buffers: int, long, short, float and double.
Definition: StreamBuffer.h:622

StreamBuffer& StreamBuffer::operator>> | ( | short & | data | ) |
| inline

Input Streamer.

Definition at line 421 of file StreamBuffer.h.

421 {
422 swapFromBuffer(&data, sizeof(data));
423 return *this;
424 }
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
StreamBuffer::swapFromBuffer
void swapFromBuffer(void *target, int siz)
Swap buffers: int, long, short, float and double.
Definition: StreamBuffer.h:622

StreamBuffer& StreamBuffer::operator>> | ( | unsigned short & | data | ) |
| inline

Input Streamer.

Definition at line 432 of file StreamBuffer.h.

432 {
433 swapFromBuffer(&data, sizeof(data));
434 return *this;
435 }
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
StreamBuffer::swapFromBuffer
void swapFromBuffer(void *target, int siz)
Swap buffers: int, long, short, float and double.
Definition: StreamBuffer.h:622

StreamBuffer& StreamBuffer::operator>> | ( | char & | data | ) |
| inline

Input Streamer.

Definition at line 443 of file StreamBuffer.h.

443 {
444 swapFromBuffer(&data, sizeof(data));
445 return *this;
446 }
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
StreamBuffer::swapFromBuffer
void swapFromBuffer(void *target, int siz)
Swap buffers: int, long, short, float and double.
Definition: StreamBuffer.h:622

StreamBuffer& StreamBuffer::operator>> | ( | unsigned char & | data | ) |
| inline

Input Streamer.

Definition at line 454 of file StreamBuffer.h.

454 {
455 swapFromBuffer(&data, sizeof(data));
456 return *this;
457 }
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
StreamBuffer::swapFromBuffer
void swapFromBuffer(void *target, int siz)
Swap buffers: int, long, short, float and double.
Definition: StreamBuffer.h:622

StreamBuffer& StreamBuffer::operator>> | ( | float & | data | ) |
| inline

Input Streamer.

Definition at line 465 of file StreamBuffer.h.

465 {
466 swapFromBuffer(&data, sizeof(data));
467 return *this;
468 }
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
StreamBuffer::swapFromBuffer
void swapFromBuffer(void *target, int siz)
Swap buffers: int, long, short, float and double.
Definition: StreamBuffer.h:622

StreamBuffer& StreamBuffer::operator>> | ( | double & | data | ) |
| inline

Input Streamer.

Definition at line 476 of file StreamBuffer.h.

476 {
477 swapFromBuffer(&data, sizeof(data));
478 return *this;
479 }
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
StreamBuffer::swapFromBuffer
void swapFromBuffer(void *target, int siz)
Swap buffers: int, long, short, float and double.
Definition: StreamBuffer.h:622

StreamBuffer& StreamBuffer::operator>> | ( | char * | data | ) |
| inline

Streamer to read strings in (char*) format.

Definition at line 481 of file StreamBuffer.h.

481 {
482 long i, len;
483 *this >> len;
484 for ( i = 0, data[0]=0; i < len; i++ ) {
485 data[i] = m_buffer[m_pointer++];
486 }
487 return *this;
488 }
StreamBuffer::m_buffer
char * m_buffer
Pointer to heap buffer.
Definition: StreamBuffer.h:164
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
StreamBuffer::m_pointer
long m_pointer
Current buffer pointer.
Definition: StreamBuffer.h:158

StreamBuffer& StreamBuffer::operator>> | ( | std::string & | data | ) |
| inline

Streamer to read strings in (std::string) format.

Definition at line 501 of file StreamBuffer.h.

501 {
502 long i, len;
503 *this >> len;
504 for ( i = 0, data = ""; i < len; i++ ) {
505 data.append( 1, m_buffer[m_pointer++] );
506 }
507 return *this;
508 }
StreamBuffer::m_buffer
char * m_buffer
Pointer to heap buffer.
Definition: StreamBuffer.h:164
std::string::append
T append(T...args)
StreamBuffer::m_pointer
long m_pointer
Current buffer pointer.
Definition: StreamBuffer.h:158
template<class TYPE >

StreamBuffer& StreamBuffer::operator>> | ( | TYPE *& | refpObject | ) |
| inline

Streamer to read links to contained or identified objects.

The specified internal function call distinguishes between contained and identified objects.

Parameters

  refpObject | Reference to pointer to object to be loaded.

Returns
  Reference to StreamBuffer object

Definition at line 527 of file StreamBuffer.h.

527 {
528 return getObjectPointer(refpObject, refpObject);
529 }
StreamBuffer::getObjectPointer
StreamBuffer & getObjectPointer(const DataObject *, TYPE *&refpObject)
Helper to distinguish between identified pointers and contained pointers.
Definition: StreamBuffer.h:184

void StreamBuffer::reserve | ( | long | len | ) |
| inline

Reserve buffer space; Default: 16 k buffer size.

Definition at line 233 of file StreamBuffer.h.

233 {
234 if ( len > m_length ) {
235 m_length = (len < 16384) ? 16384 : len;
236 m_buffer = (char*)::realloc (m_buffer,m_length);
237 }
238 }
StreamBuffer::m_length
long m_length
Total buffer length.
Definition: StreamBuffer.h:161
StreamBuffer::m_buffer
char * m_buffer
Pointer to heap buffer.
Definition: StreamBuffer.h:164

void StreamBuffer::serialize | ( | DataIO & | ioObject | ) |
| inline

Serialize the buffer using an IO object.

The streambuffer object will make use of a DataIO object, which can be specialized for streaming to any representation like e.g. disk files, Root files, Objectivity etc.

Parameters

  ioObject | Reference to data IO object.

Definition at line 561 of file StreamBuffer.h.

561 {
562 ioObject.serialize ( *this );
563 m_pointer = 0;
564 }
StreamBuffer::m_pointer
long m_pointer
Current buffer pointer.
Definition: StreamBuffer.h:158

void StreamBuffer::setAnalyzer | ( | AnalyzeFunction | fun = `nullptr` | ) |
| inline

Enable user analysis function.

Definition at line 297 of file StreamBuffer.h.

297 {
298 m_analyzer = fun;
299 }
StreamBuffer::m_analyzer
AnalyzeFunction m_analyzer
Hook function for analysis of data to the stream.
Definition: StreamBuffer.h:176
fun
double fun(const std::vector< double > &x)
Definition: PFuncTest.cpp:26

void StreamBuffer::setBuffPointer | ( | long | ptr | ) |
| inline

Retrieve current buffer pointer.

Definition at line 293 of file StreamBuffer.h.

293 {
294 m_pointer = ptr;
295 }
StreamBuffer::m_pointer
long m_pointer
Current buffer pointer.
Definition: StreamBuffer.h:158

void StreamBuffer::setMode | ( | Mode | m | ) |
| inline

Set mode of the stream and allocate buffer.

Definition at line 272 of file StreamBuffer.h.

272 {
273 m_mode = m;
274 m_pointer = 0;
275 m_containedLinks.erase (m_containedLinks.begin(), m_containedLinks.end());
276 m_identifiedLinks.erase(m_identifiedLinks.begin(),m_identifiedLinks.end());
277 }
StreamBuffer::m_containedLinks
ContainedLinks m_containedLinks
Container with links to contained objects.
Definition: StreamBuffer.h:170
std::vector::end
T end(T...args)
StreamBuffer::m_mode
Mode m_mode
Boolean indicating wether the stream is in read or write mode.
Definition: StreamBuffer.h:155
Gaudi::Units::m
constexpr double m
Definition: SystemOfUnits.h:93
std::vector::erase
T erase(T...args)
StreamBuffer::m_pointer
long m_pointer
Current buffer pointer.
Definition: StreamBuffer.h:158
std::vector::begin
T begin(T...args)
StreamBuffer::m_identifiedLinks
IdentifiedLinks m_identifiedLinks
Container with links to contained objects.
Definition: StreamBuffer.h:173

long StreamBuffer::size | ( |  | ) | const
| inline

Total buffer size.

Definition at line 250 of file StreamBuffer.h.

250 {
251 return m_length;
252 }
StreamBuffer::m_length
long m_length
Total buffer length.
Definition: StreamBuffer.h:161

StreamBuffer::SwapAction StreamBuffer::swapBuffer | ( | int | siz | ) | const
| inline protected

Check for byte swapping.

Definition at line 570 of file StreamBuffer.h.

570 {
571 switch(siz) {
572 case 1:
573 return SINGLE_BYTE;
574 default:
575 #if defined(__alpha) && !defined(__VMS)
576 // return m_swapEnabled ? SWAP : NOSWAP;
577 return NOSWAP;
578 #elif defined(__sun) && defined(__SVR4) && defined(__i386)
579 // return m_swapEnabled ? SWAP : NOSWAP;
580 return NOSWAP;
581 #elif defined(__APPLE__)
582 // return m_swapEnabled ? SWAP : NOSWAP;
583 return SWAP;
584 #elif defined(__linux) && !defined(__powerpc)
585 // return m_swapEnabled ? SWAP : NOSWAP;
586 return NOSWAP;
587 #elif defined(BORLAND) || defined(_WIN32) || defined(WIN32)
588 // return m_swapEnabled ? SWAP : NOSWAP;
589 return NOSWAP;
590 #else
591 return m_swapEnabled ? SWAP : NOSWAP;
592 // return NOSWAP;
593 #endif
594 }
595 }
StreamBuffer::SWAP
Definition: StreamBuffer.h:115
StreamBuffer::SINGLE_BYTE
Definition: StreamBuffer.h:115
StreamBuffer::NOSWAP
Definition: StreamBuffer.h:115
StreamBuffer::m_swapEnabled
bool m_swapEnabled
Flag indicating swapping.
Definition: StreamBuffer.h:167

void StreamBuffer::swapFromBuffer | ( | void * | target,
|  | int | siz
| ) |  |
| inline

Swap buffers: int, long, short, float and double.

Swap bytes from the stream buffer to target buffer with arbitray size.

Definition at line 622 of file StreamBuffer.h.

622 {
623 char* tar = (char*)target;
624 char* src = (char*)m_buffer+m_pointer;
625 switch ( swapBuffer(siz) ) {
626 case SINGLE_BYTE:
627 *tar = *src;
628 break;
629 case SWAP:
630 #ifdef __APPLE__
631 for(int i = 0,j = siz-1;i<siz;i++,j--) tar[j] = src[i];
632 #else
633 ::_swab (src, tar, siz);
634 #endif
635 break;
636 case NOSWAP:
637 std::copy_n(src,siz,tar);
638 break;
639 }
640 m_pointer += siz;
641 }
StreamBuffer::SWAP
Definition: StreamBuffer.h:115
StreamBuffer::m_buffer
char * m_buffer
Pointer to heap buffer.
Definition: StreamBuffer.h:164
std::copy_n
T copy_n(T...args)
StreamBuffer::SINGLE_BYTE
Definition: StreamBuffer.h:115
_swab
#define _swab(source, target, radix)
Definition: swab.h:7
StreamBuffer::m_pointer
long m_pointer
Current buffer pointer.
Definition: StreamBuffer.h:158
StreamBuffer::NOSWAP
Definition: StreamBuffer.h:115
StreamBuffer::swapBuffer
SwapAction swapBuffer(int siz) const
Check for byte swapping.
Definition: StreamBuffer.h:570

void StreamBuffer::swapToBuffer | ( | const void * | source,
|  | int | siz
| ) |  |
| inline

Swap buffers: int, long, short, float and double.

Swap bytes from a source buffer to the stream buffer with arbitray size.

Definition at line 598 of file StreamBuffer.h.

598 {
599 char buff[8], *tar, *src = (char*)source;
600 extend (m_pointer+siz);
601 tar = (char*)m_buffer+m_pointer;
602 switch ( swapBuffer(siz) ) {
603 case SINGLE_BYTE:
604 *tar = *src;
605 break;
606 case SWAP:
607 #ifdef __APPLE__
608 for(int i = 0,j = siz-1;i<siz;i++,j--) tar[j] = src[i];
609 #else
610 ::_swab (src, buff, siz);
611 #endif
612 src = buff;
613 /* no break */
614 case NOSWAP:
615 std::copy_n(src,siz,tar);
616 break;
617 }
618 m_pointer += siz;
619 }
StreamBuffer::SWAP
Definition: StreamBuffer.h:115
StreamBuffer::m_buffer
char * m_buffer
Pointer to heap buffer.
Definition: StreamBuffer.h:164
StreamBuffer::extend
void extend(long len)
Extend the buffer.
Definition: StreamBuffer.h:240
std::copy_n
T copy_n(T...args)
StreamBuffer::SINGLE_BYTE
Definition: StreamBuffer.h:115
_swab
#define _swab(source, target, radix)
Definition: swab.h:7
StreamBuffer::m_pointer
long m_pointer
Current buffer pointer.
Definition: StreamBuffer.h:158
StreamBuffer::NOSWAP
Definition: StreamBuffer.h:115
StreamBuffer::swapBuffer
SwapAction swapBuffer(int siz) const
Check for byte swapping.
Definition: StreamBuffer.h:570

StreamBuffer& StreamBuffer::writeBytes | ( | const char * | str,
|  | long | len
| ) |  |
| inline

Write string to output stream.

Definition at line 307 of file StreamBuffer.h.

307 {
308 extend( m_pointer+len+4 );
309 *this << len;
310 std::copy_n(str,len, data()+buffPointer());
311 m_pointer += len;
312 return *this;
313 }
StreamBuffer::buffPointer
long buffPointer() const
Retrieve current buffer pointer.
Definition: StreamBuffer.h:289
StreamBuffer::extend
void extend(long len)
Extend the buffer.
Definition: StreamBuffer.h:240
std::copy_n
T copy_n(T...args)
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:211
StreamBuffer::m_pointer
long m_pointer
Current buffer pointer.
Definition: StreamBuffer.h:158

## Friends And Related Function Documentation

friend class DataObject
| friend

DataObject is friend.

Definition at line 151 of file StreamBuffer.h.

## Member Data Documentation

AnalyzeFunction StreamBuffer::m_analyzer = nullptr
| protected

Hook function for analysis of data to the stream.

Definition at line 176 of file StreamBuffer.h.

char* StreamBuffer::m_buffer = nullptr
| mutable protected

Pointer to heap buffer.

Definition at line 164 of file StreamBuffer.h.

ContainedLinks StreamBuffer::m_containedLinks
| mutable protected

Container with links to contained objects.

Definition at line 170 of file StreamBuffer.h.

IdentifiedLinks StreamBuffer::m_identifiedLinks
| mutable protected

Container with links to contained objects.

Definition at line 173 of file StreamBuffer.h.

long StreamBuffer::m_length = 0
| mutable protected

Total buffer length.

Definition at line 161 of file StreamBuffer.h.

Mode StreamBuffer::m_mode = UNINITIALIZED
| protected

Boolean indicating wether the stream is in read or write mode.

Definition at line 155 of file StreamBuffer.h.

long StreamBuffer::m_pointer = 0
| mutable protected

Current buffer pointer.

Definition at line 158 of file StreamBuffer.h.

bool StreamBuffer::m_swapEnabled = true
| protected

Flag indicating swapping.

Definition at line 167 of file StreamBuffer.h.

The documentation for this class was generated from the following file:

- GaudiKernel/GaudiKernel/StreamBuffer.h