/[PAMELA software]/quicklook/dataToXML/Data/compilationInfo/src/INFN/Drivers/MISC_generator.c
ViewVC logotype

Contents of /quicklook/dataToXML/Data/compilationInfo/src/INFN/Drivers/MISC_generator.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Tue Apr 25 09:00:20 2006 UTC (19 years, 2 months ago) by kusanagi
Branch: MAIN
CVS Tags: dataToXML1_02/01, dataToXML1_02/00, dataToXML1_03/00, dataToXML1_03/01, dataToXML1_00/00, firstRelease, dataToXML1_01/00, dataToXML1_03_02, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
These program extract in an XML format the info contained into the ROOT files generated by YODA from the PAMELA data. To visualize the XML files in a more human readable format a collection of XSL files are given in the Data subfolder.

1 /****************************************************************************
2 * F i l e D a t a
3 * $Id: MISC_generator.c,v 1.4 2004/02/05 15:38:15 sebastiani Exp $
4 * $Revision: 1.4 $
5 * $Date: 2004/02/05 15:38:15 $
6 * $RCSfile: MISC_generator.c,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 * $Author: sebastiani $
12 * :
13 ****************************************************************************
14 * U p d a t i n g
15
16 * $Log: MISC_generator.c,v $
17 * Revision 1.4 2004/02/05 15:38:15 sebastiani
18 * *** empty log message ***
19 *
20 * Revision 1.3 2004/02/05 11:39:29 sebastiani
21 * produce DUMMY command queue
22 *
23 * Revision 1.2 2003/11/06 10:27:12 faber
24 * HB_HKBuffer now implemented as multibuffer (as specified in the
25 * mass memory format). Only compilation, not tested
26 *
27 * Revision 1.1 2003/11/04 11:59:52 sebastiani
28 * MISC_generator.c added
29 *
30 * Revision 1.1 2003/10/03 16:12:26 faber
31 * *** empty log message ***
32 *
33 *
34 *****************************************************************************/
35
36
37 #include "cmdgenerator.h"
38
39
40
41
42 DECL_FUNC(MISC_RAM_READ_128K) {
43 DAQ_Format_CMD_Empty(b);
44
45 EXEC(DAQ_Format_CMD_Fill(b,10,0x00),__LINE__);
46
47 // write_buf(filename,b);
48 }
49
50 #define BASE 0
51 #define NPAGES 20
52 #define PAGSIZE (1024*12)
53
54 DECL_FUNC(MISC_RAM_WRITE_PAGE) {
55 static int page=0;
56 unsigned int i;
57 DAQ_DECLBUF(data,PAGSIZE);
58 DAQ_BUFFER_INIT(data);
59
60 page++;
61 EXEC(DAQ_Format_CMD_Empty(b),__LINE__);
62
63 for(i=0;i<data.size;i++) {
64 data.buf[i]=i & 0xff;
65 }
66 data.len=data.size;
67 EXEC(DAQ_Format_Cmd2Ram_SetAddress(b,BASE+page*data.size),__LINE__);
68 EXEC(DAQ_Format_Cmd2Ram_WriteData(b,&data),__LINE__);
69
70 // write_buf(filename,b);
71 }
72
73 DECL_FUNC(MISC_RAM_READ_PAGE) {
74 EXEC(DAQ_Format_CMD_Empty(b),__LINE__);
75 EXEC(DAQ_Format_Cmd2Ram_SetAddress(b,BASE+NPAGES*PAGSIZE),__LINE__);
76 EXEC(DAQ_Format_Cmd2Ram_EndBlock(b),__LINE__);
77 EXEC(DAQ_Format_Cmd2Ram_SetAddress(b,BASE),__LINE__);
78 EXEC(DAQ_Format_Cmd2Ram_ReadData(b),__LINE__);
79 // write_buf(filename,b);
80 }
81
82
83 DECL_FUNC(MISC_SHORT_DUMMY_CMD) {
84 DAQ_DECLBUF(dummy,3);
85 DAQ_BUFFER_INIT(dummy);
86
87 dummy.eto=0;
88 dummy.ato=0;
89 EXEC(DAQ_Format_CMD_Empty(b),__LINE__);
90 EXEC(DAQ_Format_OneByteCmd(&dummy,0xFF),__LINE__);
91 EXEC(DAQ_Format_Cmd2Fe(b,&dummy,DAQ_FE_DUMMY),__LINE__);
92 write_buf(filename,b);
93 }
94
95 int main() {
96 unsigned int i;
97 DAQ_DECLBUF(idaqbuf,1024*128);
98 char s[40];
99 DAQ_BUFFER_INIT(idaqbuf);
100
101 DAQ_Init();
102
103 for(i=0;i<NPAGES;i++) {
104 sprintf(s,"MISC_RAM_WRITE_PAGE%0d",i);
105 MISC_RAM_WRITE_PAGE(s,&idaqbuf);
106 }
107 MISC_RAM_READ_PAGE("MISC_RAM_READ_PAGE",&idaqbuf);
108 MISC_SHORT_DUMMY_CMD("MISC_SHORT_DUMMY_CMD",&idaqbuf);
109
110
111 DAQ_Format_CMD_Empty(&idaqbuf);
112 write_buf("last_run_tag",&idaqbuf);
113
114
115
116 exit(0);
117 return 0;
118 }
119

  ViewVC Help
Powered by ViewVC 1.1.23