コード例 #1
0
QIO_Writer *open_test_output(char *filename, int volfmt, 
			     int serpar, int ildgstyle, char *myname){
  QIO_String *xml_file_out;
  char xml_write_file[] = "Dummy user file XML";
  QIO_Writer *outfile;
  QIO_Oflag oflag;

  oflag.serpar = serpar;
  oflag.ildgstyle = ildgstyle;
  oflag.ildgLFN = QIO_string_create();
  QIO_string_set(oflag.ildgLFN,"TestLFN");
  oflag.mode = QIO_TRUNC;

  QIO_verbose(QIO_VERB_DEBUG);

  /* Create the file XML */
  xml_file_out = QIO_string_create();
  QIO_string_set(xml_file_out,xml_write_file);

  /* Open the file for writing */
  outfile = QIO_open_write(xml_file_out, filename, volfmt,  
			   &layout, NULL, &oflag);
  if(outfile == NULL){
    printf("%s(%d): QIO_open_write returned NULL\n",myname,this_node);
    fflush(stdout);
    return NULL;
  }
  QIO_string_destroy(xml_file_out);
  return outfile;
}
コード例 #2
0
ファイル: io_scidac.c プロジェクト: zzmjohn/milc_qcd
QIO_Writer *open_scidac_output(char *filename, int volfmt, 
			       int serpar, int ildgstyle, 
			       char *stringLFN, QIO_Layout *layout,
			       QIO_Filesystem *fs,
			       QIO_String *xml_write_file){
  QIO_Writer *outfile;
  QIO_Oflag oflag;

  /* Create the output flag structure */
  oflag.serpar = serpar;
  oflag.ildgstyle = ildgstyle;
  if(stringLFN != NULL){
    oflag.ildgLFN = QIO_string_create();
    QIO_string_set(oflag.ildgLFN, stringLFN);
  }
  else
    oflag.ildgLFN = NULL;
  oflag.mode = QIO_TRUNC;

  /* Open the file for writing */
#ifdef QIO_TRELEASE
  QIO_set_trelease(0,QIO_TRELEASE);
#endif
  outfile = QIO_open_write(xml_write_file, filename, volfmt, layout, 
			   fs, &oflag);
  if(outfile == NULL){
    printf("open_scidac_output(%d): QIO_open_write returned NULL\n",this_node);
    return NULL;
  }
  return outfile;
}