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

Contents of /quicklook/dataToXML/Data/compilationInfo/src/INFN/daqtest.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 (18 years, 7 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 #define I386
3 #define TEST_I
4 #include "CM_Common_INFN.c"
5 #include "DAQ_IDAQ_INFN.c"
6
7 DAQ_DECLBUF(idaqbuf,1024);
8 DAQ_DECLBUF(cmdbuf,1024);
9 DAQ_DECLBUF(ac_idaqbuf,1024);
10 DAQ_DECLBUF(data,1024);
11 DAQ_DECLBUF(data2,1024);
12 DAQ_DECLBUF(idaq2,1024);
13 DAQ_DECLBUF(ram_readdata,1);
14 DAQ_DECLBUF(flash_readdata,1);
15 DAQ_DECLBUF(dsp_readdata,1);
16
17 DAQ_CMD_BUF emptybuf = {0,0,0};
18
19 void daqtest_init() {
20
21 DAQ_Init();
22
23 DAQ_BUFFER_INIT(idaqbuf);
24 DAQ_BUFFER_INIT(idaq2);
25 DAQ_BUFFER_INIT(data);
26 DAQ_BUFFER_INIT(data2);
27 DAQ_BUFFER_INIT(ram_readdata);
28 DAQ_BUFFER_INIT(dsp_readdata);
29 DAQ_BUFFER_INIT(flash_readdata);
30
31 DAQ_Format_Ram_ReadData(&ram_readdata);
32 DAQ_Format_Dsp_ReadData(&dsp_readdata);
33 DAQ_Format_Flash_ReadData(&flash_readdata);
34 }
35
36 int main(void) {
37 status_code s=0;
38
39 daqtest_init();
40 s |= DAQ_Format_Ram_ReadData(&ram_readdata);
41
42 s |= DAQ_Format_CMD_Fill(&data,300,0xbb);
43 s |= DAQ_Format_CMD_Fill(&data2,3,0xcc);
44
45 s |= DAQ_Format_Cmd2Ram_SetAddress(&idaqbuf,0);
46 s |= DAQ_Format_Cmd2Ram_WriteData(&idaqbuf,&data2);
47 s |= DAQ_Format_Cmd2Ram_EndBlock(&idaqbuf);
48 s |= DAQ_Format_Ram2Daq(&idaqbuf,&ram_readdata);
49 DAQ_BufDump(&idaqbuf);
50 exit(0);
51
52
53 s |= DAQ_Format_Fe2Daq(&idaqbuf,&data2,DAQ_FE_CAL_4);
54 s |= DAQ_Format_Fe2Ram(&idaqbuf,&data,DAQ_FE_CAL_1);
55 s |= DAQ_Format_Cmd2Ram_EndBlock(&idaqbuf);
56 s |= DAQ_Format_Cmd2Ram_SetAddress(&idaqbuf,200);
57 s |= DAQ_Format_Ram2Daq(&idaqbuf,&ram_readdata);
58
59 s |= DAQ_Format_Cmd2Dsp_SetAddressPM(&idaqbuf,100);
60 s |= DAQ_Format_Cmd2Dsp_WriteData(&idaqbuf,&data);
61 s |= DAQ_Format_Cmd2Ram_SetAddress(&idaqbuf,1000);
62 s |= DAQ_Format_CMD_Fill(&data2,171,0xee);
63 s |= DAQ_Format_Cmd2Ram_WriteData(&idaqbuf,&data2);
64 s |= DAQ_Format_Cmd2Ram_EndBlock(&idaqbuf);
65 s |= DAQ_Format_Cmd2Ram_SetAddress(&idaqbuf,1100);
66 s |= DAQ_Format_Ram2Daq(&idaqbuf,&ram_readdata);
67
68 s |= DAQ_Format_Cmd2Dsp_SetAddressDM(&idaqbuf,2048);
69 s |= DAQ_Format_CMD_Fill(&data,100,0xDD);
70 s |= DAQ_Format_Cmd2Dsp_WriteData(&idaqbuf,&data);
71 s |= DAQ_Format_Cmd2Dsp_SetAddressDM(&idaqbuf,2048);
72 s |= DAQ_Format_Dsp2Daq(&idaqbuf,&dsp_readdata);
73 s |= DAQ_Format_Spare(&idaqbuf,&emptybuf);
74
75
76 s |= DAQ_Format_Cmd2Ram_WriteData (&idaqbuf,&data);
77 s |= DAQ_Format_Cmd2Ram_EndBlock (&idaqbuf);
78
79 s |= DAQ_Format_CMD_Fill(&data,13,0xbb);
80 s |= DAQ_Format_CMD_Fill(&data2,254,0xcc);
81
82 s |= DAQ_Format_Fe2Daq(&idaq2,&data,DAQ_FE_CAL_1);
83 s |= DAQ_Format_Fe2Daq(&idaq2,&data2,DAQ_FE_CAL_4);
84
85 DAQ_BufDump(&idaq2);
86 exit(0);
87 }

  ViewVC Help
Powered by ViewVC 1.1.23