CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 
6 class CDFChunk : public TObject {
7 public:
8  CDFChunk() { fChunkLength=0; fChunk=new ULong64_t[1]; }
9  CDFChunk(const char* name) { fChunkLength=0; fChunk=0; fChunkName=name; }
10  void adoptBuffer(ULong64_t* buffer, Int_t length) { fChunk=buffer; fChunkLength=length; fHeaderSize=2; fTrailerSize=1; }
12  void setChunkName(const char* name) { fChunkName=name; }
13  inline ULong64_t* getData() { return fChunk; }
14  inline Int_t getDataLength() const { return fChunkLength; }
15  inline int getSourceId() const { return ((fChunk[0]>>8)&0xFFF); }
16  private:
17  TString fChunkName;
18  Int_t fHeaderSize;
19  Int_t fTrailerSize;
20  Int_t fChunkLength;
21  ULong64_t* fChunk; // [fChunkLength]
22  ClassDef(CDFChunk,1)
23 };
24 #endif // CDFChunk_h_included
CDFChunk()
Definition: CDFChunk.h:8
void releaseBuffer()
Definition: CDFChunk.h:11
int getSourceId() const
Definition: CDFChunk.h:15
Int_t fChunkLength
Definition: CDFChunk.h:20
TString fChunkName
Definition: CDFChunk.h:17
void setChunkName(const char *name)
Definition: CDFChunk.h:12
void adoptBuffer(ULong64_t *buffer, Int_t length)
Definition: CDFChunk.h:10
ULong64_t * fChunk
Definition: CDFChunk.h:21
Int_t fTrailerSize
Definition: CDFChunk.h:19
CDFChunk(const char *name)
Definition: CDFChunk.h:9
Int_t fHeaderSize
Definition: CDFChunk.h:18
Int_t getDataLength() const
Definition: CDFChunk.h:14
ULong64_t * getData()
Definition: CDFChunk.h:13