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

Contents of /quicklook/dataToXML/Data/compilationInfo/src/INFN/Drivers/cmdgenerator.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 #include "cmdgenerator.h"
3
4 void abort(const char* msg1,const char *msg2) {
5 fprintf(stderr,"%s %s\n",msg1,msg2);
6 exit(1);
7 }
8
9 int write_buf(const char *filename,DAQ_CMD_BUF *b) {
10 FILE *F;
11 int f,i;
12 char s[100];
13 sprintf(s,"../commands/%s.cmg",filename);
14 f=creat(s,S_IRUSR|S_IWUSR);
15 if(f == -1)
16 abort("cannot open file ",filename);
17 printf("writing %d Byte into %s ...\n",b->len,filename);
18 if(write(f,b->buf,b->len) != b->len)
19 abort("write error file %s",filename);
20 close(f);
21 }
22
23

  ViewVC Help
Powered by ViewVC 1.1.23