1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
/*--------------------------------------------------------------*/
/* DCC TCC BLOCK CLASS */
/* */
/* Author : N.Almeida (LIP) Date : 30/05/2005 */
/*--------------------------------------------------------------*/
#ifndef DCCTBTCCBLOCK_HH
#define DCCTBTCCBLOCK_HH
#include <iostream> //STL
#include <string>
#include <vector>
#include <map>
#include <utility>
#include "DCCBlockPrototype.h" //DATA DECODER
#include "DCCDataParser.h"
#include "DCCDataMapper.h"
#include "DCCEventBlock.h"
class DCCTBEventBlock;
class DCCTBDataParser;
class DCCTBTCCBlock : public DCCTBBlockPrototype {
public:
/**
Class constructor
*/
DCCTBTCCBlock(DCCTBEventBlock* dccBlock,
DCCTBDataParser* parser,
const uint32_t* buffer,
uint32_t numbBytes,
uint32_t wordsToEnd,
uint32_t wordEventOffset,
uint32_t expectedId);
std::vector<std::pair<int, bool> > triggerSamples();
std::vector<int> triggerFlags();
protected:
/**
Checks header's data
*/
void dataCheck();
/**
Adds a new TCC block
*/
using DCCTBBlockPrototype::increment;
void increment(uint32_t numb);
/**
Define TCC block fields
BXMASK (mask for BX, 12bit)
L1MASK (mask for LV1, 12 bit)
BPOSITION_BLOCKID (bit position for TCC block id, bit=61/29 for 64/32bit words
BLOCKID (TCC block id B'011' = 3)
*/
enum tccFields {
BXMASK = 0xFFF,
L1MASK = 0xFFF,
BPOSITION_BLOCKID = 29,
BLOCKID = 3,
BPOSITION_FGVB = 8,
ETMASK = 0xFF
};
DCCTBEventBlock* dccBlock_;
uint32_t expectedId_;
};
#endif
|