]>
Commit | Line | Data |
---|---|---|
2be16a33 | 1 | // XEMacs -*-C++-*- |
3a7c0444 | 2 | #ifndef ALIHLTHOMERWRITER_H |
3 | #define ALIHLTHOMERWRITER_H | |
2be16a33 | 4 | /************************************************************************ |
5 | ** | |
6 | ** | |
7 | ** This file is property of and copyright by the Technical Computer | |
8 | ** Science Group, Kirchhoff Institute for Physics, Ruprecht-Karls- | |
9 | ** University, Heidelberg, Germany, 2001 | |
10 | ** This file has been written by Timm Morten Steinbeck, | |
11 | ** timm@kip.uni-heidelberg.de | |
12 | ** | |
13 | ** | |
14 | ** See the file license.txt for details regarding usage, modification, | |
15 | ** distribution and warranty. | |
16 | ** Important: This file is provided without any warranty, including | |
17 | ** fitness for any particular purpose. | |
18 | ** | |
19 | ** | |
20 | ** Newer versions of this file's package will be made available from | |
21 | ** http://web.kip.uni-heidelberg.de/Hardwinf/L3/ | |
22 | ** or the corresponding page of the Heidelberg Alice Level 3 group. | |
23 | ** | |
24 | *************************************************************************/ | |
25 | ||
26 | /* | |
27 | *************************************************************************** | |
28 | ** | |
29 | ** $Author$ - Initial Version by Timm Morten Steinbeck | |
30 | ** | |
31 | ** $Id$ | |
32 | ** | |
33 | *************************************************************************** | |
34 | */ | |
35 | ||
9e91e956 | 36 | /** @file AliHLTHOMERWriter.h |
2be16a33 | 37 | @author Timm Steinbeck |
38 | @date Sep 14 2007 | |
39 | @brief HLT Online Monitoring Environment including ROOT - Writer | |
40 | @note migrated from PubSub HLT-stable-20070905.141318 (rev 2375) */ | |
41 | ||
42 | // see below for class documentation | |
43 | // or | |
44 | // refer to README to build package | |
45 | // or | |
46 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
47 | ||
48 | ||
49 | #include "AliHLTHOMERData.h" | |
50 | #include <vector> | |
51 | ||
52 | ||
53 | ||
54 | class HOMERWriter | |
55 | { | |
56 | public: | |
57 | ||
58 | HOMERWriter(); | |
59 | virtual ~HOMERWriter(); | |
60 | ||
61 | void Clear(); | |
62 | ||
63 | void AddBlock( const void* descriptor, const void* data ); | |
64 | void AddBlock( const HOMERBlockDescriptor* descriptor, const void* data ) | |
65 | { | |
66 | AddBlock( descriptor->GetHeader(), data ); | |
67 | } | |
68 | ||
69 | homer_uint32 GetTotalMemorySize( bool includeData = true ); | |
70 | void Copy( void* destination, homer_uint64 eventType, homer_uint64 eventNr, homer_uint64 statusFlags, homer_uint64 nodeID, bool includeData = true ); | |
71 | ||
72 | static homer_uint8 DetermineUInt64Alignment(); | |
73 | static homer_uint8 DetermineUInt32Alignment(); | |
74 | static homer_uint8 DetermineUInt16Alignment(); | |
75 | static homer_uint8 DetermineUInt8Alignment(); | |
76 | static homer_uint8 DetermineDoubleAlignment(); | |
77 | static homer_uint8 DetermineFloatAlignment(); | |
78 | ||
79 | ||
3a7c0444 | 80 | struct HOMERWriterAlignment64TestStructure |
81 | { | |
82 | homer_uint64 f64Fill; // ! | |
83 | homer_uint64 f64Test64; // ! | |
84 | homer_uint32 f32Fill; // ! | |
85 | homer_uint64 f64Test32; // ! | |
86 | homer_uint16 f16Fill; // ! | |
87 | homer_uint64 f64Test16; // ! | |
88 | homer_uint8 f8Fill; // ! | |
89 | homer_uint64 f64Test8; // ! | |
90 | }; | |
91 | struct HOMERWriterAlignment32TestStructure | |
92 | { | |
93 | homer_uint64 f64Fill; // ! | |
94 | homer_uint32 f32Test64; // ! | |
95 | homer_uint32 f32Fill; // ! | |
96 | homer_uint32 f32Test32; // ! | |
97 | homer_uint16 f16Fill; // ! | |
98 | homer_uint32 f32Test16; // ! | |
99 | homer_uint8 f8Fill; // ! | |
100 | homer_uint32 f32Test8; // ! | |
101 | }; | |
102 | struct HOMERWriterAlignment16TestStructure | |
103 | { | |
104 | homer_uint64 f64Fill; // ! | |
105 | homer_uint16 f16Test64; // ! | |
106 | homer_uint32 f32Fill; // ! | |
107 | homer_uint16 f16Test32; // ! | |
108 | homer_uint16 f16Fill; // ! | |
109 | homer_uint16 f16Test16; // ! | |
110 | homer_uint8 f8Fill; // ! | |
111 | homer_uint16 f16Test8; // ! | |
112 | }; | |
113 | struct HOMERWriterAlignment8TestStructure | |
114 | { | |
115 | homer_uint64 f64Fill; // ! | |
116 | homer_uint8 f8Test64; // ! | |
117 | homer_uint32 f32Fill; // ! | |
118 | homer_uint8 f8Test32; // ! | |
119 | homer_uint16 f16Fill; // ! | |
120 | homer_uint8 f8Test16; // ! | |
121 | homer_uint8 f8Fill; // ! | |
122 | homer_uint8 f8Test8; // ! | |
123 | }; | |
124 | struct HOMERWriterAlignmentDoubleTestStructure | |
125 | { | |
126 | homer_uint64 f64Fill; // ! | |
127 | double fDoubleTest64; // ! | |
128 | homer_uint32 f32Fill; // ! | |
129 | double fDoubleTest32; // ! | |
130 | homer_uint16 f16Fill; // ! | |
131 | double fDoubleTest16; // ! | |
132 | homer_uint8 f8Fill; // ! | |
133 | double fDoubleTest8; // ! | |
134 | }; | |
135 | struct HOMERWriterAlignmentFloatTestStructure | |
136 | { | |
137 | homer_uint64 f64Fill; // ! | |
138 | float fFloatTest64; // ! | |
139 | homer_uint32 f32Fill; // ! | |
140 | float fFloatTest32; // ! | |
141 | homer_uint16 f16Fill; // ! | |
142 | float fFloatTest16; // ! | |
143 | homer_uint8 f8Fill; // ! | |
144 | float fFloatTest8; // ! | |
145 | }; | |
2be16a33 | 146 | protected: |
147 | ||
148 | ||
149 | ||
150 | struct TBlockData | |
151 | { | |
04a939f7 | 152 | homer_uint64 fDescriptor[kCount_64b_Words]; //!transient |
153 | const void* fData; //!transient | |
2be16a33 | 154 | }; |
155 | ||
04a939f7 | 156 | unsigned long fDataOffset; //!transient |
2be16a33 | 157 | |
04a939f7 | 158 | std::vector<TBlockData> fBlocks; //!transient |
2be16a33 | 159 | #ifdef USE_ROOT |
160 | ClassDef(HOMERWriter,0); | |
161 | #endif | |
162 | }; | |
163 | ||
164 | ||
165 | ||
166 | ||
167 | ||
168 | /* | |
169 | *************************************************************************** | |
170 | ** | |
171 | ** $Author$ - Initial Version by Timm Morten Steinbeck | |
172 | ** | |
173 | ** $Id$ | |
174 | ** | |
175 | *************************************************************************** | |
176 | */ | |
177 | ||
3a7c0444 | 178 | #endif // ALIHLTHOMERWRITER_H |