CMS 3D CMS Logo

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::adoptBuffer
void adoptBuffer(ULong64_t *buffer, Int_t length)
Definition: CDFChunk.h:11
edmScanValgrind.buffer
buffer
Definition: edmScanValgrind.py:171
CDFChunk::fHeaderSize
Int_t fHeaderSize
Definition: CDFChunk.h:28
CDFChunk::getDataLength
Int_t getDataLength() const
Definition: CDFChunk.h:23
CDFChunk
Definition: CDFChunk.h:7
CDFChunk::CDFChunk
CDFChunk()
Definition: CDFChunk.cc:3
CDFChunk::setChunkName
void setChunkName(const char *name)
Definition: CDFChunk.h:21
CDFChunk::getSourceId
int getSourceId() const
Definition: CDFChunk.h:24
CDFChunk::fChunkLength
Int_t fChunkLength
Definition: CDFChunk.h:30
CDFChunk::releaseBuffer
void releaseBuffer()
Definition: CDFChunk.h:17
CDFChunk::fTrailerSize
Int_t fTrailerSize
Definition: CDFChunk.h:29
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
CDFChunk::getData
ULong64_t * getData()
Definition: CDFChunk.h:22
CDFChunk::fChunkName
TString fChunkName
Definition: CDFChunk.h:27
CDFChunk::fChunk
ULong64_t * fChunk
Definition: CDFChunk.h:31