ATLAS Offline Software
ByteStream.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef BYTESTREAMDATA_BYTESTREAM_H
6 #define BYTESTREAMDATA_BYTESTREAM_H
7 
16 
17 class ByteStream {
18 public:
20  ByteStream() : m_nWord(0), m_start(nullptr) {}
21 
23  explicit ByteStream(int nWord) : m_nWord(nWord) {
25  }
26 
27  ByteStream(const ByteStream&) = delete;
28  ByteStream& operator=(const ByteStream&) = delete;
29 
31  virtual ~ByteStream() {
32  if (m_start != nullptr) {
33  delete [] m_start;
34  m_start = nullptr;
35  }
36  }
37 
40 
41 private:
43  int m_nWord;
46 };
47 
48 #include "AthenaKernel/CLASS_DEF.h"
49 CLASS_DEF(ByteStream, 7001, 1)
50 #endif
ByteStream::ByteStream
ByteStream(int nWord)
constructor with nWord
Definition: ByteStream.h:23
ByteStream::ByteStream
ByteStream(const ByteStream &)=delete
ByteStream::m_nWord
int m_nWord
number of words
Definition: ByteStream.h:43
OFFLINE_FRAGMENTS_NAMESPACE::DataType
uint32_t DataType
Definition: RawEvent.h:24
RawEvent.h
ByteStream::~ByteStream
virtual ~ByteStream()
destructor
Definition: ByteStream.h:31
ByteStream::m_start
OFFLINE_FRAGMENTS_NAMESPACE::DataType * m_start
representation
Definition: ByteStream.h:45
ByteStream::ByteStream
ByteStream()
default constructor
Definition: ByteStream.h:20
ByteStream::operator=
ByteStream & operator=(const ByteStream &)=delete
ByteStream::getBuffer
OFFLINE_FRAGMENTS_NAMESPACE::DataType * getBuffer()
get internal buffer
Definition: ByteStream.h:39
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:67
ByteStream
Transient data object, holding BS content of the event.
Definition: ByteStream.h:17
CLASS_DEF.h
macros to associate a CLID to a type