GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> FES / V6-5-0 > fes_ux / rhel4-32
#include <fesDataFmt.h>
Enumerations | |
enum | { DVR_CABLE = RVER_CABLE, DVR_DETC = RVER_DETC, DVR_CBL_TIME = RVER_CBL_TIME, DVR_DET_TIME = RVER_DET_TIME } |
Data generation versions. More... | |
enum | { DDO_SUMM = 0x01, DDO_TOTAL = 0x02, DDO_INTER = 0x04, DDO_EVENT = 0x08, DDO_NULL = 0x10 } |
Data display options. More... | |
Functions | |
int | fesDataDel (const char *name, const char *nName, int option, int fOptns) |
Delete data file sets matching a pattern. | |
int | fesDataDisp (const char *fName, long long bMask, int nDisp, int nSkip, int optns) |
Display the contents of a file or group of files of simulator data. | |
int | fesDataGen (int count, int versn, int type, int evtSiz, int evtInt, const char *fStem, const char *nName, int option) |
Generate files of standard test data for one or more CPUs. | |
int | fesDataGenPedes (int type, const char *fStem, const char *nName, int option) |
Generate files of pedestal test data for one or more CPUs. | |
int | fesDataGenTrig (const char *sName, const char *fStem, const char *nName, int option) |
Generate files of trigger test data for one or more CPUs. | |
int | fesDataInfoGet (const char *fName, const char *nName, int optns, int *dISize, char **dInfo) |
Get data file information. | |
int | fesDataJoin (const char *oName, int nIName, const char *const *iNames, long long bMask) |
Copy/join FES data files. | |
int | fesDataLoad (const char *oName, int nIName, const char *const *iNames, long long bMask) |
Load FES data files onto PCs. | |
int | fesDataRename (const char *name, const char *nName, long long bMask) |
Rename a set of FES data files. | |
int | fesDataShow (const char *fName, const char *nName, int optns, int dispType) |
Show data file names matching a pattern. |
$Id: fesData.h,v 1.16 2010/08/19 23:25:13 saxton Exp $
anonymous enum |
anonymous enum |
int fesDataDel | ( | const char * | name, | |
const char * | nName, | |||
int | option, | |||
int | fOptns | |||
) |
Delete data file sets matching a pattern.
All the sets of FES data files in the system matching the specified pattern are deleted. The default is to confirm each deletion before carrying it out, but options exist to skip the confirmation and either log each deletion, or not. When confirmation is requested, several possible responses are available:
name | The data file set name pattern. Refer to the description of fesDataInfoGet for more information. | |
nName | The address of the name of the node on which the files are located. If the name is blank, all configured nodes are used. If the address is NULL, the local node is used. | |
option | An option specifying the way the deletion is carried out. The possible values are:
| |
fOptns | File processing options expressed as the OR of the following possible values:
|
FES_SUCCESS | Success. | |
FES_NOMEMORY | Insufficient memory for information block. |
References fesFileInfo_s::bMask, FES_MAX_SIM_BOARDS, FES_NUM_TOWERS, fesConfigBoardFind(), fesConfigDiskGet(), fesConfigNodeGet(), fesConfigPrimaryGet(), fesDataInfoGet(), fesFileDel(), fesFileDiskName(), fesFileInfoNext(), fesFileInfoSort(), FST_NAME, fesFileInfo_s::name, and fesDirInfo_s::name.
int fesDataDisp | ( | const char * | fName, | |
long long | bMask, | |||
int | nDisp, | |||
int | nSkip, | |||
int | optns | |||
) |
Display the contents of a file or group of files of simulator data.
This routine displays a formatted listing of the contents of a file or a related group of files of front-end simulator data.
fName | The name of the file containing the simulator data. This may start with a FES PC node name and a colon, to cause the file to be read from the remote node. If the following mask is non-zero, this file name is a stem and must not contain a node name, remote disk name or file type. In this case a local file name is indicated by specifying an absolute path name (i.e. it begins with "/"), or a relative path name beginning with either "./" or "../". Otherwise the file is assumed to reside on an FES PC. | |
bMask | A 40-bit mask which, if non-zero, specifies that the file name is a stem representing the group of files needed to completely describe the data. The set bits in the mask specify which boards are to have their data displayed. Bits 0 - 15 select tracker boards 0 - 15; bits 16 - 31 select calorimeter boards 0 - 15; bits 32 - 39 select ACD boards 0 - 7. For each selected board, the full file name is formed by appending the board name as the file type, and, for files residing on FES PCs, prepending the board's node and disk names. | |
nDisp | The number of records to be displayed. If negative, all records remaining after the skip count are displayed. If the DDO_EVENT option is set, this counts events instead of all record types. | |
nSkip | The number of records to be skipped at the beginning of the file. If the DDO_EVENT option is set, this counts events instead of all record types. | |
optns | Display options, consisting of the logical OR of the following possible bit mask values: |
FES_SUCCESS | Success. | |
FES_LONGFNAM | File name too long. | |
FES_NOMEMORY | Insufficient memory available. | |
FES_NOOPNANY | Unable to open any input file. | |
FES_NOOPNALL | Unable to open some input files. |
References DDO_EVENT, DDO_INTER, DDO_NULL, DDO_SUMM, DDO_TOTAL, FES_MAX_SIM_BOARDS, FES_NUM_TOWERS, fesConfigBoardFind(), fesConfigDiskGet(), fesConfigNodeGet(), fesConfigPrimaryGet(), fesFileClose(), fesFileDiskName(), fesFileOpen(), FFO_RDONLY, RTYP_ACD_PED, RTYP_ACD_TRAN, RTYP_CAL_PED, RTYP_CAL_TRAN, RTYP_HEADER, RTYP_TKR_TRAN, TKR_MRLENG, and fesRecHead_u_t::type.
int fesDataGen | ( | int | count, | |
int | versn, | |||
int | type, | |||
int | evtSiz, | |||
int | evtInt, | |||
const char * | fStem, | |||
const char * | nName, | |||
int | option | |||
) |
Generate files of standard test data for one or more CPUs.
This routine generates a file containing multiple occurrences of a standard hit pattern for all detectors attached to the current or named CPU, or for all detectors in the system. The name of each generated file is constructed from the supplied stem by prepending the detector's node and disk names, and appending a period and the detector name.
count | The number of transition pairs (on and off) to be generated. | |
versn | The format version of data to be generated:
| |
type | The type of event data to be generated:
| |
evtSiz | For non-calibration data, the size of each event to be generated:
|
evtInt | The time interval between events, in 50 ns units, for versions that need it. | |
fStem | The address of the name of the file stem, i.e. without disk name or extension, to be used for the output files. | |
nName | The address of the name of the node on which the files are to be generated. If the name is blank, all configured nodes are used. If the address is NULL, the local node is used. | |
option | Specifies what to do if a file already exists:
|
FES_SUCCESS | Success. | |
FES_NOREPFIL | Existing file not replaced. | |
FES_EFILECRE | Unable to create file. | |
FES_EFILEWRT | Error writing file. | |
FES_BUFFSHRT | Output buffer too short. |
References ACD_NCABLE, DTYP_TEST, FES_DEV_TYP_ACD, FES_DEV_TYP_CAL, FES_DEV_TYP_CTL, FES_DEV_TYP_TKR, fesConfigAcdCblsGet(), fesConfigIdGet(), fesConfigNBoardGet(), fesConfigNodeGet(), fesConfigPrimaryGet(), fesConfigTypeGet(), fesDataFmtHrec(), fesFileClose(), fesFileWrite(), and RVER_MAX.
int fesDataGenPedes | ( | int | type, | |
const char * | fStem, | |||
const char * | nName, | |||
int | option | |||
) |
Generate files of pedestal test data for one or more CPUs.
This routine generates a file containing standard pedestal test data for each detector attached to the current or named CPU, or for all detectors in the system. The name of each generated file is constructed from the supplied stem by prepending the detector's node and disk names, and appending a period and the detector name.
type | The type of pedestal data to be generated.
| |
fStem | The address of the name of the file stem, i.e. without disk name or extension, to be used for the output files. | |
nName | The address of the name of the node on which the files are to be generated. If the name is blank, all configured nodes are used. If the address is NULL, the local node is used. | |
option | Specifies what to do if a file already exists:
|
FES_SUCCESS | Success. | |
FES_NOREPFIL | Existing file not replaced. | |
FES_EFILECRE | Unable to create file. | |
FES_EFILEWRT | Error writing pedestal file. | |
FES_BUFFSHRT | Output buffer too short. |
References ACD_NCABLE, ACD_NCHAN, ACD_NRANGE, CAL_NCABLE, CAL_NLAYER, CAL_NLOG, CAL_NRANGE, DTYP_TEST, FES_DEV_TYP_ACD, FES_DEV_TYP_CAL, fesConfigAcdCblsGet(), fesConfigIdGet(), fesConfigNBoardGet(), fesConfigNodeGet(), fesConfigPrimaryGet(), fesConfigTypeGet(), fesDataFmtAcdPrec(), fesDataFmtCalPrec(), fesDataFmtHrec(), fesFileClose(), fesFileWrite(), fesAcdPedesData_s::val, and fesCalPedesData_s::val.
int fesDataGenTrig | ( | const char * | sName, | |
const char * | fStem, | |||
const char * | nName, | |||
int | option | |||
) |
Generate files of trigger test data for one or more CPUs.
This routine generates a file containing trigger test data for each detector attached to the current or named CPU, or for all detectors in the system. The name of each generated file is constructed from the supplied stem by prepending the detector's node and disk names, and appending a period and the detector name. The specifications for the test data are contained in a file input to this routine.
sName | The name of the file containing the trigger specification data. | |
fStem | The address of the name of the file stem, i.e. without disk name or extension, to be used for the output files. | |
nName | The address of the name of the node on which the files are to be generated. If the name is blank, all configured nodes are used. If the address is NULL, the local node is used. | |
option | Specifies what to do if an output file already exists:
|
FES_SUCCESS | Success | |
FES_EFILOPEN | Cannot open trigger specification file. | |
FES_NOMEMORY | Insufficient memory for trigger data. | |
FES_INSFITEM | Too few items in input file line. | |
FES_INVVALUE | Invalid value in input file line. | |
FES_NOREPFIL | An output file already exists and was not overwritten. | |
FES_EFILECRE | Unable to create an output file. | |
FES_EFILEWRT | An error occurred while writing a file. |
References ACD_NCABLE, DTYP_TEST, FES_DEV_TYP_ACD, FES_DEV_TYP_CAL, FES_DEV_TYP_CTL, FES_DEV_TYP_TKR, fesConfigAcdCblsGet(), fesConfigIdGet(), fesConfigNBoardGet(), fesConfigNodeGet(), fesConfigPrimaryGet(), fesConfigTypeGet(), fesDataFmtHrec(), fesFileClose(), and fesFileWrite().
int fesDataInfoGet | ( | const char * | fName, | |
const char * | nName, | |||
int | optns, | |||
int * | dISize, | |||
char ** | dInfo | |||
) |
Get data file information.
This routine obtains information about all the sets of data files on one or all nodes matching the given pattern, and puts it into a formatted information block.
fName | The file name pattern to be matched. This consists of at most a directory name (everything up the last "/") and a file name stem, both of which may contain the standard wildcard characters "*" and "?". The file name stem defaults to "*" if omitted. The search is conducted on all the disks on the specified node(s) for files with the file type matching the board name associated with the disk. | |
nName | The address of the name of the node on which the files are located. If the name is blank, all configured nodes are used. If the address is NULL, the local node is used. | |
optns | Processing options, expressed as the OR of the following possible values:
| |
dISize | The address of an integer to receive the size of the generated file information block. | |
dInfo | The address of a pointer to receive the address of the file information block. This block must be freed after use via the free() function. |
FES_SUCCESS | Success | |
FES_NOMEMORY | Insufficient memory for information block. |
References fesFileInfo_s::bMask, FES_DEV_TYP_CTL, fesConfigAUnitGet(), fesConfigDiskGet(), fesConfigIdGet(), fesConfigNameGet(), fesConfigNBoardGet(), fesConfigNodeGet(), fesConfigPrimaryGet(), fesConfigTypeGet(), fesFileDiskName(), fesFileInfoAdd(), fesFileInfoGet(), fesFileInfoNext(), fesFileInfoSort(), fesFileNameComp(), FST_NAME, ITP_END, fesFileInfo_s::mTime, fesFileInfo_s::name, fesDirInfo_s::name, fesDirInfo_s::nFile, and fesFileInfo_s::size.
Referenced by fesDataDel(), and fesDataShow().
int fesDataJoin | ( | const char * | oName, | |
int | nIName, | |||
const char *const * | iNames, | |||
long long | bMask | |||
) |
Copy/join FES data files.
This routine copies one or more sets of FES data files into a single set. Each such set of data files consists of one file per detector section, with the file type being the same as the section name. Each set of input files must reside in a single directory. When multiple sets are copied, they are joined to make valid data files.
oName | The address of the stem of the output file names, including its directory path. On an embedded system the name of the disk associated with each board is prepended if no disk name is specified. | |
nIName | The number of pointers in the iNames array. | |
iNames | The address of an array of pointers each of which is the address of the stem of an input file name. If a name consists only of a directory (i.e. it ends in "/"), the file name is taken from the output file name. In any case the full file name is formed by appending a period and the board name. On an embedded system the name of the disk associated with each board is prepended if no disk name is specified. | |
bMask | A 40-bit mask which, if non-zero, selects which boards of the full set are to have their files joined. On a Unix system, bits 0 - 15 select tracker boards 0 - 15; bits 16 - 31 select calorimeter boards 0 - 15; bits 32 - 39 select ACD boards 0 - 7. On an embedded system, only bits 0 - 3 are used and they select the boards by local unit number. |
FES_SUCCESS | All files were successfully copied. | |
FES_LONGFNAM | The output file name stem is too long. | |
FES_LONGFNM | An input file name is too long. | |
FES_OVERWRTE | An input file would have been overwritten. | |
FES_NOMEMORY | Insufficient memory for data buffer. | |
FES_EFILECRE | Unable to create output file. | |
FES_EFILOPEN | Unable to open an input file. | |
FES_EFILERD | Error while reading an input file. | |
FES_EFILEWRT | Error while writing output file. |
References FES_BMASK_ALL, FES_DEV_TYP_CTL, fesConfigDiskGet(), fesConfigIdGet(), fesConfigNameGet(), fesConfigNBoardGet(), fesConfigPrimaryGet(), fesConfigTypeGet(), and fesFileDiskName().
int fesDataLoad | ( | const char * | oName, | |
int | nIName, | |||
const char *const * | iNames, | |||
long long | bMask | |||
) |
Load FES data files onto PCs.
This routine loads one or more sets of FES data files onto their correct disks on their correct PCs, as determined by the current FES board configuration. If multiple sets of data files are specified, the corresponding files are joined to form a single set.
oName | The address of the stem of the output file names, including its directory path. The full name of each file is obtained by prepending the correct node and disk names, and appending a period and the board name. | |
nIName | The number of input files. | |
iNames | The address of an array of pointers each of which is the address of the stem of an input file name. If a name consists only of a directory (i.e. it ends in "/"), the file name is taken from the output file name. In any case the full file name is formed by appending a period and the board name. | |
bMask | A 40-bit mask which, if non-zero, selects which boards of the full set are to have their files loaded. Bits 0 - 15 select tracker boards 0 - 15; bits 16 - 31 select calorimeter boards 0 - 15; bits 32 - 39 select ACD boards 0 - 7. |
FES_SUCCESS | All files were successfully copied. | |
FES_LONGSTEM | Output file stem is too long. | |
FES_LONGFNM | Input file name is too long. | |
FES_NOMEMORY | Insufficient memory for data buffer. | |
FES_EFILECRE | Unable to create output file. | |
FES_EFILOPEN | Unable to open an input file. | |
FES_EFILERD | Error while reading an input file. | |
FES_EFILEWRT | Error while writing output file. |
References FES_BMASK_ALL, FES_DEV_TYP_CTL, fesConfigDiskGet(), fesConfigIdGet(), fesConfigNameGet(), fesConfigNBoardGet(), fesConfigNodeGet(), fesConfigPrimaryGet(), fesConfigTypeGet(), and fesFileDiskName().
int fesDataRename | ( | const char * | name, | |
const char * | nName, | |||
long long | bMask | |||
) |
Rename a set of FES data files.
This routine changes the name stem of a set of FES data files.
name | The address of the stem of the file names to be changed, including its directory path. On an embedded system the name of the disk associated with each board is prepended. | |
nName | The address of the stem of the new file names, including its directory path, if different from the original. If a name consists only of a directory (i.e. it ends in "/"), the stem name is taken from original. | |
bMask | A 40-bit mask which, if non-zero, selects which boards of the full set are to have their files renamed. On a Unix system, bits 0 - 15 select tracker boards 0 - 15; bits 16 - 31 select calorimeter boards 0 - 15; bits 32 - 39 select ACD boards 0 - 7. On an embedded system, only bits 0 - 3 are used and they select the boards by local unit number. |
FES_SUCCESS | All files were successfully renamed. | |
FES_LONGFNAM | The original or new file name stem is too long. | |
FES_EFILEREN | Error while renaming a file. |
References FES_BMASK_ALL, FES_DEV_TYP_CTL, fesConfigDiskGet(), fesConfigIdGet(), fesConfigNameGet(), fesConfigNBoardGet(), fesConfigNodeGet(), fesConfigPrimaryGet(), fesConfigTypeGet(), fesFileDiskName(), and fesFileRename().
int fesDataShow | ( | const char * | fName, | |
const char * | nName, | |||
int | optns, | |||
int | dispType | |||
) |
Show data file names matching a pattern.
This routine displays a list of data file name stems matching the supplied pattern, along with a bit mask specifying for which units each data file exists. Also displayed for each file set are the earliest creation date and the average size.
fName | The data file set name pattern. Refer to the description of fesDataInfoGet for more information. | |
nName | The address of the name of the node on which the files are located. If the name is blank, all configured nodes are used. If the address is NULL, the local node is used. | |
optns | Processing options, expressed as the OR of the following possible values:
| |
dispType | The way the data is to be displayed. It consists of the logical OR of the possible bit values: |
References fesFileInfo_s::bMask, FDT_NODIR, FDT_NOINFO, fesDataInfoGet(), fesFileInfoNext(), fesTimeStr(), fesFileInfo_s::mTime, fesFileInfo_s::name, fesDirInfo_s::name, and fesFileInfo_s::size.