]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RAW/AliRawEventHeaderBase.h
several bugfixes
[u/mrichter/AliRoot.git] / RAW / AliRawEventHeaderBase.h
index bf0dba3fcaa7a83a94a1a7d9964e0a4de9dd9af9..cd1ccfe6ffbc266a54bcd695acd7907a0e59b09f 100644 (file)
@@ -19,7 +19,7 @@
 class AliRawEventHeaderBase : public TObject {
 
 public:
-   AliRawEventHeaderBase() { fSize=fMagic=fHeadSize=fVersion=fExtendedDataSize=0; fExtendedData = 0x0; fIsSwapped = kFALSE; }
+   AliRawEventHeaderBase();
    virtual ~AliRawEventHeaderBase() { if (fExtendedData) delete [] fExtendedData; }
 
    void         *HeaderBaseBegin() { return (void *) &fSize; }
@@ -30,6 +30,8 @@ public:
    Bool_t        IsSwapped() const { return (fMagic == fgkEventMagicNumberSwapped) ? kTRUE : kFALSE; }
    Bool_t        IsValid() const { return IsSwapped() ? kTRUE : ((fMagic == fgkEventMagicNumber) ? kTRUE : kFALSE); }
    void          Swap();
+   UInt_t        SwapWord(UInt_t x) const;
+   void          SwapData(const void* data, const void* buf, UInt_t size);
 
    UInt_t        GetEventSize() const { return fSize; }
    UInt_t        GetMagic() const { return fMagic; }
@@ -46,8 +48,8 @@ public:
    const char *  GetTypeName();
    static AliRawEventHeaderBase* Create(char*& data);
    Int_t         ReadHeader(char*& data);
-   UInt_t        Get(const char *datamember);
-   const UInt_t* GetP(const char *datamember);
+   UInt_t        Get(const char *datamember) const;
+   const UInt_t* GetP(const char *datamember) const;
 
    // The following enumeration can be used once the kEventTypeMask has been
    // applied to the raw event type
@@ -68,6 +70,9 @@ public:
    };
 
 private:
+   AliRawEventHeaderBase(const AliRawEventHeaderBase&);
+   AliRawEventHeaderBase& operator=(const AliRawEventHeaderBase&);
+
    UInt_t fSize;          // size of event in bytes
    UInt_t fMagic;         // magic number used for consistency check
    UInt_t fHeadSize;      // size of header in bytes