TPCCLIB
Toggle main menu visibility
Loading...
Searching...
No Matches
libtpcecat
tpcecat.h
Go to the documentation of this file.
1
5
#ifndef _LIBTPCECAT_H
6
#define _LIBTPCECAT_H
7
/*****************************************************************************/
8
9
/*****************************************************************************/
10
#include "tpcclibConfig.h"
11
/*****************************************************************************/
12
#include <stdio.h>
13
#include <string.h>
14
#include <math.h>
15
#include <stdint.h>
16
#include <stdlib.h>
17
#include <strings.h>
18
#include <ctype.h>
19
#include <float.h>
20
#include <unistd.h>
21
#include <locale.h>
22
#include <time.h>
23
/*****************************************************************************/
24
#include "
tpcextensions.h
"
25
#include "
tpcift.h
"
26
/*****************************************************************************/
27
28
/*****************************************************************************/
29
#ifndef BACKUP_EXTENSION
31
#define BACKUP_EXTENSION ".bak"
32
#endif
33
/*****************************************************************************/
34
35
/*****************************************************************************/
37
#define ECATBLKSIZE 512
38
40
typedef
struct
{
42
unsigned
int
id
;
44
unsigned
int
strtblk
;
46
unsigned
int
endblk
;
48
int
status
;
49
}
ECAT_MATDIR
;
50
52
typedef
struct
{
54
unsigned
int
matrixNr
;
56
unsigned
int
matrixSpace
;
58
ECAT_MATDIR
*
matdir
;
59
}
ECAT_MATRIXLIST
;
60
62
typedef
struct
{
64
unsigned
int
frame
;
66
unsigned
int
plane
;
68
unsigned
int
gate
;
70
unsigned
int
data
;
72
unsigned
int
bed
;
73
}
ECAT_MATVAL
;
74
/*****************************************************************************/
75
76
/*****************************************************************************/
77
/* ECAT 7.x */
78
80
#define ECAT7V_MAGICNR "MATRIX72v"
81
#define ECAT7S_MAGICNR "MATRIX7011"
82
#define ECAT7_SW_VERSION 72
84
85
/*****************************************************************************/
86
87
/*****************************************************************************/
88
/* ECAT 6.3 */
89
90
91
92
93
/*****************************************************************************/
94
95
/*****************************************************************************/
96
/* ecatio.c */
97
int
ecatReadBlock
(
98
const
char
*filename, FILE *fp,
const
unsigned
int
blocknumber,
unsigned
char
*data);
99
int
ecatVerifyMagic
(
const
char
*filename, FILE *fp);
100
/* ecatheader.c */
101
int
ecatWriteMainheader
(
IFT
*ift,
unsigned
char
*buf,
TPCSTATUS
*status);
102
int
ecatReadMainheader
(
const
unsigned
char
*buf,
IFT
*ift,
TPCSTATUS
*status);
103
/* ecatmatrixlist.c */
104
void
ecatMListInit
(
ECAT_MATRIXLIST
*ml);
105
void
ecatMListFree
(
ECAT_MATRIXLIST
*ml);
106
void
ecatMListReadId
(
int
format,
unsigned
int
id
,
ECAT_MATVAL
*mv);
107
unsigned
int
ecatMListMakeId
(
108
int
format,
109
unsigned
int
frame,
unsigned
int
plane,
unsigned
int
gate,
unsigned
int
data,
unsigned
int
bed
110
);
111
unsigned
int
ecatMValToId
(
int
format,
ECAT_MATVAL
*mv);
112
int
ecatMListRead
(
int
format, FILE *fp,
ECAT_MATRIXLIST
*ml,
TPCSTATUS
*status);
113
void
ecatMListPrint
(
int
format,
ECAT_MATRIXLIST
*ml, FILE *fp);
114
/*****************************************************************************/
115
116
/*****************************************************************************/
117
#endif
// _LIBTPCECAT_H
ECAT_MATDIR
Definition
tpcecat.h:40
ECAT_MATDIR::endblk
unsigned int endblk
Definition
tpcecat.h:46
ECAT_MATDIR::id
unsigned int id
Definition
tpcecat.h:42
ECAT_MATDIR::strtblk
unsigned int strtblk
Definition
tpcecat.h:44
ECAT_MATDIR::status
int status
Definition
tpcecat.h:48
ECAT_MATRIXLIST
Definition
tpcecat.h:52
ECAT_MATRIXLIST::matdir
ECAT_MATDIR * matdir
Definition
tpcecat.h:58
ECAT_MATRIXLIST::matrixNr
unsigned int matrixNr
Definition
tpcecat.h:54
ECAT_MATRIXLIST::matrixSpace
unsigned int matrixSpace
Definition
tpcecat.h:56
ECAT_MATVAL
Definition
tpcecat.h:62
ECAT_MATVAL::gate
unsigned int gate
Definition
tpcecat.h:68
ECAT_MATVAL::plane
unsigned int plane
Definition
tpcecat.h:66
ECAT_MATVAL::frame
unsigned int frame
Definition
tpcecat.h:64
ECAT_MATVAL::data
unsigned int data
Definition
tpcecat.h:70
ECAT_MATVAL::bed
unsigned int bed
Definition
tpcecat.h:72
IFT
Definition
tpcift.h:43
TPCSTATUS
Definition
tpcextensions.h:241
ecatMListPrint
void ecatMListPrint(int format, ECAT_MATRIXLIST *ml, FILE *fp)
Definition
ecatmatrixlist.c:250
ecatMListFree
void ecatMListFree(ECAT_MATRIXLIST *ml)
Definition
ecatmatrixlist.c:38
ecatMListReadId
void ecatMListReadId(int format, unsigned int id, ECAT_MATVAL *mv)
Definition
ecatmatrixlist.c:52
ecatReadBlock
int ecatReadBlock(const char *filename, FILE *fp, const unsigned int blocknumber, unsigned char *data)
Definition
ecatio.c:23
ecatMListRead
int ecatMListRead(int format, FILE *fp, ECAT_MATRIXLIST *ml, TPCSTATUS *status)
Definition
ecatmatrixlist.c:140
ecatMListInit
void ecatMListInit(ECAT_MATRIXLIST *ml)
Definition
ecatmatrixlist.c:23
ecatMValToId
unsigned int ecatMValToId(int format, ECAT_MATVAL *mv)
Definition
ecatmatrixlist.c:124
ecatWriteMainheader
int ecatWriteMainheader(IFT *ift, unsigned char *buf, TPCSTATUS *status)
Definition
ecatheader.c:25
ecatReadMainheader
int ecatReadMainheader(const unsigned char *buf, IFT *ift, TPCSTATUS *status)
Definition
ecatheader.c:100
ecatMListMakeId
unsigned int ecatMListMakeId(int format, unsigned int frame, unsigned int plane, unsigned int gate, unsigned int data, unsigned int bed)
Definition
ecatmatrixlist.c:84
ecatVerifyMagic
int ecatVerifyMagic(const char *filename, FILE *fp)
Definition
ecatio.c:84
tpcextensions.h
Header file for library libtpcextensions.
tpcift.h
Header file for library libtpcift.
Generated on
for TPCCLIB by
1.17.0