00001 #ifndef CDFChunk_h_included 00002 #define CDFChunk_h_included 1 00003 00004 #include "TObject.h" 00005 00006 class CDFChunk : public TObject { 00007 public: 00008 CDFChunk() { fChunkLength=0; fChunk=new ULong64_t[1]; } 00009 CDFChunk(const char* name) { fChunkLength=0; fChunk=0; fChunkName=name; } 00010 void adoptBuffer(ULong64_t* buffer, Int_t length) { fChunk=buffer; fChunkLength=length; fHeaderSize=2; fTrailerSize=1; } 00011 void releaseBuffer() { fChunk=0; fChunkLength=0; } 00012 void setChunkName(const char* name) { fChunkName=name; } 00013 inline ULong64_t* getData() { return fChunk; } 00014 inline Int_t getDataLength() const { return fChunkLength; } 00015 inline int getSourceId() const { return ((fChunk[0]>>8)&0xFFF); } 00016 private: 00017 TString fChunkName; 00018 Int_t fHeaderSize; 00019 Int_t fTrailerSize; 00020 Int_t fChunkLength; 00021 ULong64_t* fChunk; // [fChunkLength] 00022 ClassDef(CDFChunk,1) 00023 }; 00024 #endif // CDFChunk_h_included