/*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. * This file is distributed subject to a Software License Agreement found * in the file LICENSE that is included with this distribution. \*************************************************************************/ #include "mdb.h" #include "SDDS.h" main() { SDDS_DATASET SDDS_dataset; long rows, i, names; char **name; void *ptr; char *quad_name[16] = { "P1Q1", "P1Q2", "P1Q3", "P1Q4", "P2Q1", "P2Q2", "P2Q3", "P2Q4", "P3Q1", "P3Q2", "P3Q3", "P3Q4", "P4Q1", "P4Q2", "P4Q3", "P4Q4" } ; char *column_name[3] = {"s", "betax", "betay"}; double **beta; if (!SDDS_InitializeInput(&SDDS_dataset, "par.sdds") || !SDDS_ReadPage(&SDDS_dataset)) SDDS_PrintErrors(stderr, SDDS_EXIT_PrintErrors|SDDS_VERBOSE_PrintErrors); SDDS_SetRowFlags(&SDDS_dataset, 1); if (!SDDS_SetRowsOfInterest(&SDDS_dataset, "ElementName", SDDS_MATCH_STRING, "P?[qQ][12]", SDDS_AND)) SDDS_PrintErrors(stderr, SDDS_EXIT_PrintErrors|SDDS_VERBOSE_PrintErrors); if ((rows=SDDS_SetRowsOfInterest(&SDDS_dataset, "ElementName", SDDS_MATCH_STRING, "P?[qQ][34]", SDDS_OR))<0) SDDS_PrintErrors(stderr, SDDS_EXIT_PrintErrors|SDDS_VERBOSE_PrintErrors); if (!(name=(char**)SDDS_GetColumn(&SDDS_dataset, "ElementName"))) SDDS_PrintErrors(stderr, SDDS_EXIT_PrintErrors|SDDS_VERBOSE_PrintErrors); fprintf(stderr, "%ld rows for SDDS_MATCH_STRING mode:\n", rows); for (i=0; i