GRSISort
"v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
THILDataParser.h
Go to the documentation of this file.
1
#ifndef THILDARAPARSER_H
2
#define THILDARAPARSER_H
3
4
/** \addtogroup Sorting
5
* @{
6
*/
7
8
/////////////////////////////////////////////////////////////////
9
///
10
/// \class THILDataParser
11
///
12
/// The THILDataParser is the DAQ dependent part of GRSISort.
13
/// It takes a "DAQ-dependent"-flavoured LMD file and
14
/// converts it into a generic TFragment that the rest of
15
/// GRSISort can deal with. This is where event word masks
16
/// are applied, and any changes to the event format must
17
/// be implemented.
18
///
19
/////////////////////////////////////////////////////////////////
20
21
#include "
Globals.h
"
22
#include <ctime>
23
#include <sstream>
24
#include <vector>
25
#include <map>
26
#include <limits>
27
28
#ifndef __CINT__
29
#include <memory>
30
#endif
31
32
#include "
TDataParser.h
"
33
#include "
TChannel.h
"
34
#include "
TFragment.h
"
35
#include "
TPPG.h
"
36
#include "
TScaler.h
"
37
#include "
TFragmentMap.h
"
38
#include "
ThreadsafeQueue.h
"
39
#include "
TEpicsFrag.h
"
40
#include "
TRawEvent.h
"
41
#include "
TRlmdEvent.h
"
42
43
class
THILDataParser
:
public
TDataParser
{
44
public
:
45
THILDataParser
();
46
~THILDataParser
();
47
48
// ENUM(EBank, char, kWFDN,kGRF1,kGRF2,kGRF3,kFME0,kFME1,kFME2,kFME3);
49
enum class
EBank
{
kWFDN
= 0,
50
kGRF1
= 1,
51
kGRF2
= 2,
52
kGRF3
= 3,
53
kGRF4
= 4,
54
kFME0
= 5,
55
kFME1
= 6,
56
kFME2
= 7,
57
kFME3
= 8 };
58
59
enum class
EDigitizer
{
60
kV1751
= 1,
61
kV1724
= 2,
62
kV1730_PSD
= 3,
63
kV1730_PHA
= 4,
64
kV1725_PHA
= 7,
65
kV1725_PSD
= 8
66
};
67
68
enum class
EDataParserState
{
69
kGood
,
70
kOddUsedLength
,
71
kWrongBufferType
,
72
kZeroEventLength
,
73
kOddEventLength
,
74
kWrongEventLength
,
75
kWrongUsPattern
,
76
kWrongGeHPPattern
,
77
kWrongGeEnPattern
,
78
kWrongGeTimePattern
,
79
kWrongSi1HPPattern
,
80
kWrongSi1EnPattern
,
81
kWrongSi2HPPattern
,
82
kWrongSi2EnPattern
,
83
kWrongSi3HPPattern
,
84
kWrongSi3EnPattern
,
85
kWrongEventId
,
86
kUndefined
87
};
88
89
#ifndef __CINT__
90
int
Process
(std::shared_ptr<TRawEvent>)
override
;
91
#endif
92
93
private
:
94
uint16_t
ByteSwap
(
const
uint16_t& val)
95
{
96
return
((val & 0xff) << 8) | ((val & 0xff00) >> 8);
97
}
98
99
int
EagleEventToFragment
(uint32_t size, uint16_t* data);
100
101
EDataParserState
fState
;
102
};
103
/*! @} */
104
#endif
Globals.h
TChannel.h
TDataParser.h
TEpicsFrag.h
TFragment.h
TFragmentMap.h
TPPG.h
TRawEvent.h
TRlmdEvent.h
TScaler.h
ThreadsafeQueue.h
TDataParser
Definition
TDataParser.h:42
THILDataParser
Definition
THILDataParser.h:43
THILDataParser::EBank
EBank
Definition
THILDataParser.h:49
THILDataParser::EBank::kGRF1
@ kGRF1
THILDataParser::EBank::kGRF3
@ kGRF3
THILDataParser::EBank::kFME3
@ kFME3
THILDataParser::EBank::kFME0
@ kFME0
THILDataParser::EBank::kGRF2
@ kGRF2
THILDataParser::EBank::kWFDN
@ kWFDN
THILDataParser::EBank::kFME1
@ kFME1
THILDataParser::EBank::kFME2
@ kFME2
THILDataParser::EBank::kGRF4
@ kGRF4
THILDataParser::fState
EDataParserState fState
Definition
THILDataParser.h:101
THILDataParser::EDataParserState
EDataParserState
Definition
THILDataParser.h:68
THILDataParser::EDataParserState::kWrongSi1HPPattern
@ kWrongSi1HPPattern
THILDataParser::EDataParserState::kWrongGeTimePattern
@ kWrongGeTimePattern
THILDataParser::EDataParserState::kGood
@ kGood
THILDataParser::EDataParserState::kWrongUsPattern
@ kWrongUsPattern
THILDataParser::EDataParserState::kWrongGeHPPattern
@ kWrongGeHPPattern
THILDataParser::EDataParserState::kWrongSi1EnPattern
@ kWrongSi1EnPattern
THILDataParser::EDataParserState::kUndefined
@ kUndefined
THILDataParser::EDataParserState::kZeroEventLength
@ kZeroEventLength
THILDataParser::EDataParserState::kWrongEventId
@ kWrongEventId
THILDataParser::EDataParserState::kWrongEventLength
@ kWrongEventLength
THILDataParser::EDataParserState::kWrongBufferType
@ kWrongBufferType
THILDataParser::EDataParserState::kOddUsedLength
@ kOddUsedLength
THILDataParser::EDataParserState::kWrongSi2HPPattern
@ kWrongSi2HPPattern
THILDataParser::EDataParserState::kWrongSi3HPPattern
@ kWrongSi3HPPattern
THILDataParser::EDataParserState::kOddEventLength
@ kOddEventLength
THILDataParser::EDataParserState::kWrongGeEnPattern
@ kWrongGeEnPattern
THILDataParser::EDataParserState::kWrongSi3EnPattern
@ kWrongSi3EnPattern
THILDataParser::EDataParserState::kWrongSi2EnPattern
@ kWrongSi2EnPattern
THILDataParser::ByteSwap
uint16_t ByteSwap(const uint16_t &val)
Definition
THILDataParser.h:94
THILDataParser::~THILDataParser
~THILDataParser()
Definition
THILDataParser.cxx:25
THILDataParser::EagleEventToFragment
int EagleEventToFragment(uint32_t size, uint16_t *data)
Definition
THILDataParser.cxx:58
THILDataParser::Process
int Process(std::shared_ptr< TRawEvent >) override
Definition
THILDataParser.cxx:29
THILDataParser::THILDataParser
THILDataParser()
Definition
THILDataParser.cxx:19
THILDataParser::EDigitizer
EDigitizer
Definition
THILDataParser.h:59
THILDataParser::EDigitizer::kV1730_PSD
@ kV1730_PSD
THILDataParser::EDigitizer::kV1725_PHA
@ kV1725_PHA
THILDataParser::EDigitizer::kV1730_PHA
@ kV1730_PHA
THILDataParser::EDigitizer::kV1725_PSD
@ kV1725_PSD
THILDataParser::EDigitizer::kV1724
@ kV1724
THILDataParser::EDigitizer::kV1751
@ kV1751
HILData
include
THILDataParser.h
GRSISort ("v4.0.0.5") Reference Guide Generated on Fri Jul 11 2025 17:24:11.