New flat raw-data event format. The details can be found at: http://indico.cern.ch...
[u/mrichter/AliRoot.git] / RAW / AliRawData.h
CommitLineData
a197a4ce 1#ifndef ALIRAWDATA_H
2#define ALIRAWDATA_H
d04aea32 3// @(#) $Id$
a197a4ce 4// Author: Fons Rademakers 26/11/99
5
6/* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
7 * See cxx source for full Copyright notice */
8
9//////////////////////////////////////////////////////////////////////////
10// //
11// AliRawData //
12// //
13//////////////////////////////////////////////////////////////////////////
14
15#ifndef ROOT_TObject
16#include <TObject.h>
17#endif
18
19
20class AliRawData : public TObject {
21
22public:
f3c1e83c 23 AliRawData();
a197a4ce 24 virtual ~AliRawData() { if (fOwner) delete [] fRawData; }
25
a197a4ce 26 inline void SetBuffer(void *buf, Int_t size);
27 Int_t GetSize() const { return fSize; }
28 void *GetBuffer() { return fRawData; }
29
30private:
31 Int_t fSize; // number of raw data bytes
a197a4ce 32 char *fRawData; //[fSize] raw event data
33 Bool_t fOwner; //!if true object owns fRawData buffer
34
33314186 35 AliRawData(const AliRawData &);
36 AliRawData &operator=(const AliRawData &);
a197a4ce 37
33314186 38 ClassDef(AliRawData,2) // Alice raw event buffer
a197a4ce 39};
40
a197a4ce 41void AliRawData::SetBuffer(void *buf, Int_t size)
42{
43 if (fOwner) delete [] fRawData;
44 fRawData = (char *) buf;
a197a4ce 45 fSize = size;
46 fOwner = kFALSE;
47}
48
49#endif