ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
GETHeaderBase.h
Go to the documentation of this file.
1 #ifndef GETHEADERBASE
2 #define GETHEADERBASE
3 
4 #define GETHEADERBASESIZE 8
5 #define GETFRAMEBASICTYPE1 0x1
6 #define GETFRAMEBASICTYPE2 0x2
7 #define GETFRAMEMERGEDBYID 0xff01
8 #define GETFRAMEMERGEDBYTIME 0xff02
9 
10 #include <Rtypes.h>
11 #include <TObject.h>
12 
13 #include <stdint.h>
14 
15 #include <fstream>
16 
17 class TBuffer;
18 class TClass;
19 class TMemberInspector;
20 
21 using namespace std;
22 
23 class GETHeaderBase : public TObject {
24 public:
25  GETHeaderBase();
26 
27  UInt_t GetMetaType();
28  UInt_t GetFrameSize(Bool_t inBytes = kTRUE);
29  UInt_t GetDataSource();
30  UInt_t GetFrameType();
31  UInt_t GetRevision();
32  ULong64_t GetFrameSkip(Bool_t rewind = kFALSE);
33 
34  Bool_t IsLittleEndian();
35  Bool_t IsBlob();
36  UInt_t GetUnitBlock();
37 
38  ULong64_t CorrectEndianness(uint8_t *variable, Short_t length);
39 
40  void Clear(Option_t * = "");
41  void Read(ifstream &file, Bool_t rewind = kFALSE);
42 
43  void Print();
44 
45 private:
46  uint8_t fMetaType;
47  uint8_t fFrameSize[3];
48  uint8_t fDataSource;
49  uint8_t fFrameType[2];
50  uint8_t fRevision;
51 
52  ClassDef(GETHeaderBase, 1)
53 };
54 
55 #endif
GETHeaderBase
Definition: GETHeaderBase.h:23