/[PAMELA software]/yoda/event/HB_HKBuffer_INFN.h
ViewVC logotype

Annotation of /yoda/event/HB_HKBuffer_INFN.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5.1 - (hide annotations) (download)
Sat Feb 4 12:37:43 2006 UTC (18 years, 10 months ago) by kusanagi
Branch: MAIN
Changes since 5.0: +4 -4 lines
File MIME type: text/plain
Several new features in this release:
a) all the packets are conform to the Mass Memory Format specifications (http://people.roma2.infn.it/~cpu/Mass_Memory_Format.html)
b) unpacking either using the old files structure OR the new one file unpacking.
c) parametrized root files compression factor
d) deleting of the following packet: TofTest, TrkTest, TrkEvent.
e) the Tracker routines now work without the use of temp files.

The point a) allow Yoda to unpack in the root file all the packets generated by the CPU. According to the MassMemoryFormat; that is three possible data are available:

1) almost explicit structure of the packet (like for Log, Tracker, Mcmd, etc....);
2) dummy data collection structure (InitHeader, InitTrailer, CalibHeader, CalibTrailer);
3) just the data of the packet (almost all Alarm and Init procedures). The class regarding this packets have only one parameters, a TArrayC class, which contain the data-block included in the packet (tat is the data below the packet Header).

The point b) has been implemented as a consequence of an agreement about a more compact structure of the unpacked data. Up to now the structure of each unpacked data consisted of a folder, named after the packet type, and three files: xxx.Header.root, xxx.NamePacket.root, xxx.Registry.root.
Starting from this release YODA, by default will unpack the data in a unique root file. The structure of this file will consist of:
- several TTree(s) named after the packet type;
- into each TTree are foreseen three TBranche(s):
    - 'Header'  (the old xxx.Header.root file)
    - 'NameOfThePacket' (the old xxx.Event.root file or the xxx.Event.DETECTOR.root)
    - 'Registry' (the old xxx.Registry.root file)

Anyway is still possible, but deprecated, to unpack using the old structure, passing to the "yoda" command the optional parameter "-multifile"

The point c) has been implemented because is well know that writing time in a TTree is as much fast as much lower is the compression factor for the root file; anyway for a PAMELA dat file, a compression equal to 0 will generate a root file which will be more than two times the original size. To modify the compression parameter just add the optional parameter "-c [0-9]" to the yoda command line.

1 kusanagi 1.1 /****************************************************************************
2     * F i l e D a t a
3 kusanagi 5.1 * $Id: HB_HKBuffer_INFN.h,v 5.0 2005/08/29 09:45:48 Maurizio Nagni Exp $
4     * $Revision: 5.0 $
5     * $Date: 2005/08/29 09:45:48 $
6 kusanagi 1.1 * $RCSfile: HB_HKBuffer_INFN.h,v $
7     *
8     ****************************************************************************
9     * S W D e v e l o p m e n t E n v i r o n m e n t
10     *
11 kusanagi 5.1 * $Author: Maurizio Nagni $
12 kusanagi 1.1 * :
13     ****************************************************************************
14     *
15     *****************************************************************************/
16    
17     #ifndef _HB_HKBUFFER_INFN_H
18     #define _HB_HKBUFFER_INFN_H
19    
20    
21     /*============================= Include File ================================*/
22    
23     #ifndef I386
24     #include <src/SRAMManager/SRAMPageManager/SM_SRAMPageManager_p.h>
25     #include <src/BasicSW/RTEMSInterface/OS_rtems_p.h>
26     #include <src/MCMDManager/MCMDArea/MA_MCMDArea_p.h>
27     #include <src/INFN/OS_rtems_INFN_p.h>
28     #endif // I386
29    
30     #ifdef OLDANALISI
31     #include <src/INFN/CM_Common_INFN.h>
32     #include <src/INFN/DAQ_IDAQ_INFN.h>
33     #endif // OLDANALISI
34    
35     #define UINT32 unsigned int
36     /*============================ Global define ================================*/
37    
38     #define HB_SKETCHSIZE SM_SKETCHSIZE
39    
40    
41     #define HB_BUF_TMTC_SIZE (20*1024)
42     #define HB_BUF_MCMD_SIZE (20*1024)
43     #define HB_BUF_LOG_SIZE ( 6*1024)
44     #define HB_BUF_VARDUMP_SIZE PRH_TOTAL_VAR_SIZE
45     #define HB_BUF_ARRDUMP_SIZE PRH_TOTAL_ARR_SIZE
46     #define HB_BUF_TABDUMP_SIZE PRH_TOTAL_TAB_SIZE
47     #define HB_BUF_RUNHEADER_SIZE (1*1024)
48     #define HB_BUF_RUNTRAILER_SIZE (1*1024)
49     #define HB_BUF_SKETCHBOARD_SIZE (64*1024)
50     #define HB_BUF_USERDATA_SIZE (64*1024)
51    
52     /* number of user defined buffer */
53     #define HB_USERDATA_NO 4
54    
55     #define HB_HEADER_1 0xFA
56     #define HB_HEADER_2 0xFE
57     #define HB_HEADER_3 0xDE
58    
59     #define HB_PKTTYPE_PHYS_PKT 0x10 /* Experiment Event Packet */
60     #define HB_PKTTYPE_FORCED_PKT 0x11 /* Force Idaq Cmd-queue Event Packet */
61     #define HB_PKTTYPE_CALIB_TRK 0x12 /* Tracker Calibration Event Packet */
62     #define HB_PKTTYPE_CALIB_TRG 0x13 /* Trigger Calibration Event Packet */
63     #define HB_PKTTYPE_CALIB_CAL 0x14 /* Calorimeter Calibration Event Packet */
64     #define HB_PKTTYPE_CALIB_TRD 0x15 /* TRD Calibration Event Packet */
65     #define HB_PKTTYPE_CALIB_TOF 0x16 /* TOF Calibration Event Packet */
66     #define HB_PKTTYPE_CALIB_S4 0x17 /* S4 Calibration Event Packet */
67     #define HB_PKTTYPE_RUNHEADER 0x20 /* The starting of a Run */
68     #define HB_PKTTYPE_RUNTRAILER 0x21 /* The ending of a Run */
69     #define HB_PKTTYPE_ALARM 0x30 /* TBD */
70     #define HB_PKTTYPE_KHB 0x40 /* TBD */
71     #define HB_PKTTYPE_LOG 0x50 /* Log block */
72     #define HB_PKTTYPE_VARDUMP 0x51 /* ParamDump block var*/
73     #define HB_PKTTYPE_ARRDUMP 0x52 /* ParamDump block arr*/
74     #define HB_PKTTYPE_TABDUMP 0x53 /* ParamDump block tab*/
75     #define HB_PKTTYPE_TMTC 0x54 /* TMTC block */
76     #define HB_PKTTYPE_MCMD 0x55 /* MCMD block */
77    
78     /*============================== global types ==============================*/
79    
80    
81    
82    
83     /*****************************************************************************/
84     /*=========================== Structure define ==============================*/
85    
86     typedef struct {
87     // TBD:
88     UINT32 info1;
89     UINT32 info2;
90     } HB_RUN_HEADER_INFO;
91    
92     typedef struct {
93     // TBD:
94     UINT32 info1;
95     UINT32 info2;
96     } HB_RUN_TRAILER_INFO;
97    
98     /*****************************************************************************/
99     /*============================ Enumerate define =============================*/
100     typedef enum {
101     HB_NULL,
102     HB_TMTC,
103     HB_MCMD,
104     HB_LOG,
105     HB_VARDUMP,
106     HB_ARRDUMP,
107     HB_TABDUMP,
108     HB_SKETCHBOARD,
109     HB_RUNHEADER,
110     HB_RUNTRAILER,
111     HB_USERDATA0,
112     HB_USERDATA1,
113     HB_USERDATA2,
114     HB_USERDATA3,
115     HB_MAX
116     } HB_BUF;
117    
118     /*===========================================================================*/
119    
120    
121    
122     #ifndef I386
123     static status_code HB_SemP();
124     static status_code HB_SemV();
125     status_code HB_Init();
126     static status_code HB_InitBuf_NoLock(HB_BUF bufid);
127     status_code HB_InitBuf(HB_BUF bufid);
128     unsigned int HB_SpaceLeft(HB_BUF bufid);
129     status_code HB_Store(HB_BUF bufid,unsigned short int len,void *dataptr,TI_TIME obt);
130     status_code HB_WriteToPIF();
131     status_code HB_SaveBuffer2MM(DAQ_CMD_BUF *buffer, FS_FILEID id,UINT32 timeout);
132    
133     status_code HB_SaveHBBuffer2MM(HB_BUF bufid,UINT32 timeout);
134     status_code HB_SetRunHeaderInfo( /* params TBD */ );
135     status_code HB_SetRunTrailerInfo( /* params TBD */ );
136     #endif // I386
137    
138    
139    
140     #endif // _HB_HKBUFFER_INFN_H
141    
142    

  ViewVC Help
Powered by ViewVC 1.1.23