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
|
#ifndef BLOCKFORMATTER_H
#define BLOCKFORMATTER_H
#include <iostream>
#include <vector>
#include <map>
#include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
#include <DataFormats/FEDRawData/interface/FEDRawDataCollection.h>
#include <DataFormats/FEDRawData/interface/FEDRawData.h>
#include <DataFormats/FEDRawData/interface/FEDRawDataCollection.h>
#include "DataFormats/Provenance/interface/RunLumiEventNumber.h"
class BlockFormatter {
public:
typedef uint64_t Word64;
typedef uint16_t Word16;
struct Config {
const std::vector<int32_t>* plistDCCId_;
bool debug_;
bool doBarrel_;
bool doEndCap_;
bool doTCC_;
bool doSR_;
bool doTower_;
};
struct Params {
int orbit_number_;
int bx_;
unsigned int lv1_;
edm::RunNumber_t runnumber_;
};
explicit BlockFormatter(Config const& iC, Params const& iP);
static const int kCardsPerTower = 5; // Number of VFE cards per trigger tower
void DigiToRaw(FEDRawDataCollection* productRawData);
void print(FEDRawData& rawdata);
// void CleanUp(FEDRawDataCollection* productRawData);
void CleanUp(FEDRawDataCollection* productRawData, std::map<int, std::map<int, int> >* FEDorder);
void PrintSizes(FEDRawDataCollection* productRawData);
protected:
const std::vector<int32_t>* plistDCCId_;
int orbit_number_;
int bx_;
unsigned int lv1_;
edm::RunNumber_t runnumber_;
const bool debug_;
const bool doBarrel_;
const bool doEndCap_;
const bool doTCC_;
const bool doSR_;
const bool doTower_;
};
#endif
|