CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CDFChunk.h
Go to the documentation of this file.
1 #ifndef CDFChunk_h_included
2 #define CDFChunk_h_included 1
3 
4 #include "TObject.h"
5 #include "TString.h"
6 
7 class CDFChunk : public TObject {
8 public:
9  CDFChunk();
10  CDFChunk(const char* name);
11  void adoptBuffer(ULong64_t* buffer, Int_t length) {
12  fChunk = buffer;
13  fChunkLength = length;
14  fHeaderSize = 2;
15  fTrailerSize = 1;
16  }
17  void releaseBuffer() {
18  fChunk = nullptr;
19  fChunkLength = 0;
20  }
21  void setChunkName(const char* name) { fChunkName = name; }
22  inline ULong64_t* getData() { return fChunk; }
23  inline Int_t getDataLength() const { return fChunkLength; }
24  inline int getSourceId() const { return ((fChunk[0] >> 8) & 0xFFF); }
25 
26 private:
27  TString fChunkName;
28  Int_t fHeaderSize;
29  Int_t fTrailerSize;
30  Int_t fChunkLength;
31  ULong64_t* fChunk; // [fChunkLength]
32  ClassDef(CDFChunk, 1)
33 };
34 #endif // CDFChunk_h_included
CDFChunk()
Definition: CDFChunk.cc:3
void releaseBuffer()
Definition: CDFChunk.h:17
int getSourceId() const
Definition: CDFChunk.h:24
Int_t fChunkLength
Definition: CDFChunk.h:30
TString fChunkName
Definition: CDFChunk.h:27
void setChunkName(const char *name)
Definition: CDFChunk.h:21
void adoptBuffer(ULong64_t *buffer, Int_t length)
Definition: CDFChunk.h:11
ULong64_t * fChunk
Definition: CDFChunk.h:31
Int_t fTrailerSize
Definition: CDFChunk.h:29
Int_t fHeaderSize
Definition: CDFChunk.h:28
Int_t getDataLength() const
Definition: CDFChunk.h:23
ULong64_t * getData()
Definition: CDFChunk.h:22