StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
RTS
src
DAQ_PP2PP
daq_pp2pp.h
1
#ifndef _DAQ_PP2PP_H_
2
#define _DAQ_PP2PP_H_
3
4
#include <sys/types.h>
5
6
#define PP2PP_SVX_CH 128
7
8
9
//used for:
10
// non zero-suppressed data
11
// zero-suppressed data
12
// zero-suppressed data and pedestal subtracted too
13
struct
pp2pp_t
{
14
u_char seq_id ;
// 1..whatever is coded with sequencer jumpers
15
u_char chain_id ;
// 0..3 ;
16
u_char svx_id ;
// 0..7 ;
17
u_char error ;
// error occured!
18
19
u_char bunch_xing ;
20
u_char not_sparse ;
21
u_char res2 ;
22
u_char res3 ;
23
24
u_char adc[PP2PP_SVX_CH] ;
25
u_char trace[PP2PP_SVX_CH] ;
// 0-ch not found;1 - ch found OK; 2 - duplicate ch
26
} ;
27
28
29
#define PP2PP_PED_SUB_VERSION 0x01
30
struct
pp2pp_ped_sub_t
{
31
u_char seq_id ;
// 1..whatever is coded with sequencer jumpers
32
u_char chain_id ;
// 0..3 ;
33
u_char svx_id ;
// 0..7 ;
34
u_char error ;
// error occured!
35
36
u_char bunch_xing ;
37
u_char not_sparse ;
38
u_char ch_cou ;
39
u_char version ;
40
41
struct
{
42
u_char adc ;
43
u_char ch ;
44
} dta[0] ;
45
} ;
46
47
48
#define PP2PP_PED_VERSION 0
49
struct
pp2pp_pedrms_t
{
50
u_char version ;
51
u_char seq_id ;
// 1..whatever is coded with sequencer jumpers
52
u_char chain_id ;
// 0..3 ;
53
u_char svx_id ;
// 0..7 ;
54
55
float
svx_ped ;
56
float
svx_rms ;
57
58
float
ped[PP2PP_SVX_CH] ;
59
float
rms[PP2PP_SVX_CH] ;
// 0-ch not found;1 - ch found OK; 2 - duplicate ch
60
} ;
61
62
#ifndef DAQ_PP2PP_DATA_STRUCTURE
63
#include <stdio.h>
64
#include <DAQ_READER/daq_det.h>
65
66
67
class
daq_pp2pp
:
public
daq_det
{
68
private
:
69
class
daq_dta
*handle_raw(
int
sec,
int
rdo) ;
70
class
daq_dta
*handle_adc(
int
sec,
int
rdo) ;
71
class
daq_dta
*handle_pedrms(
int
sec) ;
72
class
daq_dta
*handle_adc_ped_sub(
int
sec,
int
rdo) ;
73
74
class
daq_dta
*raw ;
75
class
daq_dta
*pedrms ;
76
class
daq_dta
*adc_ped_sub ;
77
78
static
const
int
MAX_SEC = 2 ;
79
static
const
int
MAX_RDO = 4 ;
// can be 0 for all RDOs; sequencers, typically 4
80
81
static
const
char
*help_string ;
82
83
84
protected
:
85
86
87
public
:
88
daq_pp2pp
(
daqReader
*rts_caller=0) ;
89
~
daq_pp2pp
() ;
90
91
class
daq_dta
*adc ;
92
93
94
int
decode(
int
sec_id,
char
*raw,
int
bytes) ;
95
96
daq_dta
*
get
(
const
char
*bank=
"*"
,
int
c1=-1,
int
c2=-1,
int
c3=-1,
void
*p1=0,
void
*p2=0) ;
97
98
int
get_l2(
char
*buff,
int
buff_bytes,
struct
daq_trg_word
*trg,
int
prompt) ;
99
int
get_token(
char
*buff,
int
buff_bytes) ;
100
101
virtual
const
char
*GetCVS()
const
{
// Offline
102
static
const
char
cvs[]=
"Tag $Name: $Id: built "
__DATE__
" "
__TIME__ ;
return
cvs;
103
}
104
105
} ;
106
107
108
#endif // DAQ_PP2PP_DATA_STRUCTURE
109
#endif // _DAQ_PP2PP_H_
daq_dta
Definition:
daq_dta.h:49
daq_trg_word
Definition:
daq_dta_structs.h:7
daq_det
Definition:
daq_det.h:54
daqReader
Definition:
daqReader.h:87
pp2pp_t
Definition:
daq_pp2pp.h:13
pp2pp_pedrms_t
Definition:
daq_pp2pp.h:49
pp2pp_ped_sub_t
Definition:
daq_pp2pp.h:30
daq_pp2pp
Definition:
daq_pp2pp.h:67
Generated by
1.8.5