]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/BASE/HOMER/AliHLTHOMERWriter.h
coding conventions, compilation warnings, code cleanup
[u/mrichter/AliRoot.git] / HLT / BASE / HOMER / AliHLTHOMERWriter.h
1 // XEMacs -*-C++-*-
2 #ifndef _HOMERWRITER_HPP_
3 #define _HOMERWRITER_HPP_
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
36 /** @file   AliHLTHOMERWriter.h
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
80     protected:
81
82
83
84         struct TBlockData
85             {
86               homer_uint64 fDescriptor[kCount_64b_Words]; //!transient
87               const void* fData; //!transient
88             };
89
90         unsigned long fDataOffset; //!transient
91
92         std::vector<TBlockData> fBlocks; //!transient
93 #ifdef USE_ROOT
94       ClassDef(HOMERWriter,0);
95 #endif
96     };
97
98
99
100
101
102 /*
103 ***************************************************************************
104 **
105 ** $Author$ - Initial Version by Timm Morten Steinbeck
106 **
107 ** $Id$ 
108 **
109 ***************************************************************************
110 */
111
112 #endif // _HOMERWRITER_HPP_