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
73
74
75
76
|
#ifndef DCCMEMBLOCK_HH
#define DCCMEMBLOCK_HH
/*
*\ Class DCCMemBlock
*
* Class responsible for MEMs unpacking
*
* \file DCCTCCBlock.h
*
*
* \author N. Almeida
* \author G. Franzoni
*
*/
#include <iostream>
#include <memory>
#include <cstdint>
#include <string>
#include <vector>
#include <map>
#include <utility>
#include <DataFormats/EcalDigi/interface/EcalDigiCollections.h>
#include <DataFormats/EcalRawData/interface/EcalRawDataCollections.h>
#include <DataFormats/EcalDetId/interface/EcalDetIdCollections.h>
#include <FWCore/MessageLogger/interface/MessageLogger.h>
#include "DCCDataBlockPrototype.h"
class DCCEventBlock;
class DCCDataUnpacker;
class DCCMemBlock : public DCCDataBlockPrototype {
public:
DCCMemBlock(DCCDataUnpacker* u, EcalElectronicsMapper* m, DCCEventBlock* e);
~DCCMemBlock() override {}
void updateCollectors() override;
void display(std::ostream& o) override;
using DCCDataBlockPrototype::unpack;
int unpack(const uint64_t** data, unsigned int* dwToEnd, unsigned int expectedTowerID);
protected:
void unpackMemTowerData();
void fillPnDiodeDigisCollection();
std::vector<short> pn_;
unsigned int expTowerID_;
unsigned int expXtalTSamples_;
unsigned int kSamplesPerPn_;
unsigned int lastStripId_;
unsigned int lastXtalId_;
unsigned int lastTowerBeforeMem_;
unsigned int towerId_;
unsigned int numbDWInXtalBlock_;
unsigned int xtalBlockSize_;
unsigned int nTSamples_;
unsigned int unfilteredTowerBlockLength_;
unsigned int bx_;
unsigned int l1_;
std::unique_ptr<EcalElectronicsIdCollection>* invalidMemChIds_;
std::unique_ptr<EcalElectronicsIdCollection>* invalidMemBlockSizes_;
std::unique_ptr<EcalElectronicsIdCollection>* invalidMemTtIds_;
std::unique_ptr<EcalElectronicsIdCollection>* invalidMemGains_;
std::unique_ptr<EcalPnDiodeDigiCollection>* pnDiodeDigis_;
};
#endif
|