-
Notifications
You must be signed in to change notification settings - Fork 4.2k
/
GlobalAlgBlk.h
132 lines (96 loc) · 3.69 KB
/
GlobalAlgBlk.h
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#ifndef L1Trigger_GlobalAlgBlk_h
#define L1Trigger_GlobalAlgBlk_h
/**
* \class GlobalAlgBlk
*
*
* Description: L1 micro Global Trigger - Block holding Algorithm Information
*
* Implementation:
* <TODO: enter implementation details>
*
* \author: Brian Winer - Ohio State
*
*
*/
// system include files
#include <vector>
#include <iostream>
#include <iomanip>
// user include files
#include "FWCore/Utilities/interface/typedefs.h"
#include "DataFormats/L1Trigger/interface/BXVector.h"
//#include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetup.h"
// forward declarations
class GlobalAlgBlk;
typedef BXVector<GlobalAlgBlk> GlobalAlgBlkBxCollection;
// class interface
class GlobalAlgBlk
{
public:
/// constructors
GlobalAlgBlk(); // empty constructor, all members set to zero;
GlobalAlgBlk(int orbitNr, int bxNr, int bxInEvent);
/// destructor
virtual ~GlobalAlgBlk();
public:
static constexpr unsigned int maxPhysicsTriggers = 512;
/// set simple members
void setL1MenuUUID(int uuid) { m_orbitNr = uuid; }
void setL1FirmwareUUID(int fuuid) { m_bxNr = fuuid; }
void setbxInEventNr(int bxNr) { m_bxInEvent = bxNr; }
void setFinalORVeto(bool fOR) { m_finalORVeto = fOR; }
void setFinalORPreVeto(bool fOR){ m_finalORPreVeto = fOR; }
void setFinalOR(bool fOR) { m_finalOR = fOR; }
void setPreScColumn(int psC) { m_preScColumn = psC; }
/// get simple members
inline const int getL1MenuUUID() const { return m_orbitNr; }
inline const int getL1FirmwareUUID() const { return m_bxNr; }
inline const int getbxInEventNr() const { return m_bxInEvent; }
inline const bool getFinalOR() const { return m_finalOR; }
inline const bool getFinalORPreVeto() const { return m_finalORPreVeto; };
inline const bool getFinalORVeto() const { return m_finalORVeto; }
inline const int getPreScColumn() const { return m_preScColumn; }
/// Copy vectors words
void copyInitialToInterm() { m_algoDecisionPreScaled = m_algoDecisionInitial; }
void copyIntermToFinal() { m_algoDecisionFinal = m_algoDecisionPreScaled; }
/// Set decision bits
void setAlgoDecisionInitial(unsigned int bit, bool val);
void setAlgoDecisionInterm(unsigned int bit, bool val);
void setAlgoDecisionFinal(unsigned int bit, bool val);
/// Get decision bits
std::vector<bool> const & getAlgoDecisionInitial() const {
return m_algoDecisionInitial;
}
std::vector<bool> const & getAlgoDecisionInterm() const {
return m_algoDecisionPreScaled;
}
std::vector<bool> const & getAlgoDecisionFinal() const {
return m_algoDecisionFinal;
}
bool getAlgoDecisionInitial(unsigned int bit) const;
bool getAlgoDecisionInterm(unsigned int bit) const;
bool getAlgoDecisionFinal(unsigned int bit) const;
/// reset the content of a GlobalAlgBlk
void reset();
/// pretty print the content of a GlobalAlgBlk
void print(std::ostream& myCout) const;
private:
// where noted member data has been re-interpreted, to keep persistant data the same, as these features were added late in release cycle.
/// orbit number -> L1MenuUUID
int m_orbitNr;
/// bunch cross number of the actual bx -> L1FirmwareUUID
int m_bxNr;
/// bunch cross in the GT event record (E,F,0,1,2)
int m_bxInEvent;
// finalOR
bool m_finalOR;
bool m_finalORPreVeto;
bool m_finalORVeto;
//Prescale Column
int m_preScColumn;
std::vector<bool> m_algoDecisionInitial;
std::vector<bool> m_algoDecisionPreScaled; // -> Interm
std::vector<bool> m_algoDecisionFinal;
};
#endif /*L1Trigger_GlobalAlgBlk_h*/