CMS 3D CMS Logo

GlobalAlgBlk.h
Go to the documentation of this file.
1 #ifndef DataFormats_L1TGlobal_GlobalAlgBlk_h
2 #define DataFormats_L1TGlobal_GlobalAlgBlk_h
3 
18 // system include files
19 #include <vector>
20 #include <iostream>
21 #include <iomanip>
22 
23 // user include files
26 //#include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetup.h"
28 
29 // forward declarations
30 
31 
34 
39 
40 // class interface
41 
43 {
44 public:
46  GlobalAlgBlk(); // empty constructor, all members set to zero;
47 
48  GlobalAlgBlk(int orbitNr, int bxNr, int bxInEvent);
49 
51  virtual ~GlobalAlgBlk();
52 
53 public:
54  static constexpr unsigned int maxPhysicsTriggers = 512;
55 
57  void setL1MenuUUID(int uuid) { m_orbitNr = uuid; }
58  void setL1FirmwareUUID(int fuuid) { m_bxNr = fuuid; }
59  void setbxInEventNr(int bxNr) { m_bxInEvent = bxNr; }
60  void setFinalORVeto(bool fOR) { m_finalORVeto = fOR; }
61  void setFinalORPreVeto(bool fOR){ m_finalORPreVeto = fOR; }
62  void setFinalOR(bool fOR) { m_finalOR = fOR; }
63  void setPreScColumn(int psC) { m_preScColumn = psC; }
64 
66  inline const int getL1MenuUUID() const { return m_orbitNr; }
67  inline const int getL1FirmwareUUID() const { return m_bxNr; }
68  inline const int getbxInEventNr() const { return m_bxInEvent; }
69  inline const bool getFinalOR() const { return m_finalOR; }
70  inline const bool getFinalORPreVeto() const { return m_finalORPreVeto; };
71  inline const bool getFinalORVeto() const { return m_finalORVeto; }
72  inline const int getPreScColumn() const { return m_preScColumn; }
73 
77 
79  void setAlgoDecisionInitial(unsigned int bit, bool val);
80  void setAlgoDecisionInterm(unsigned int bit, bool val);
81  void setAlgoDecisionFinal(unsigned int bit, bool val);
82 
84  std::vector<bool> const & getAlgoDecisionInitial() const {
85  return m_algoDecisionInitial;
86  }
87  std::vector<bool> const & getAlgoDecisionInterm() const {
89  }
90  std::vector<bool> const & getAlgoDecisionFinal() const {
91  return m_algoDecisionFinal;
92  }
93  bool getAlgoDecisionInitial(unsigned int bit) const;
94  bool getAlgoDecisionInterm(unsigned int bit) const;
95  bool getAlgoDecisionFinal(unsigned int bit) const;
96 
98  void reset();
99 
100  // compare the content of this GlobalAlgBlk with another one
101  virtual bool operator==(const GlobalAlgBlk& rhs) const;
102  virtual inline bool operator!=(const GlobalAlgBlk& rhs) const { return !(operator==(rhs)); };
103 
105  void print(std::ostream& myCout) const;
106 
107 private:
108 
109  // where noted member data has been re-interpreted, to keep persistant data the same, as these features were added late in release cycle.
110 
113 
115  int m_bxNr;
116 
119 
120  // finalOR
121  bool m_finalOR;
124 
125  //Prescale Column
127 
128  std::vector<bool> m_algoDecisionInitial;
129  std::vector<bool> m_algoDecisionPreScaled; // -> Interm
130  std::vector<bool> m_algoDecisionFinal;
131 };
132 
133 #endif /*DataFormats_L1TGlobal_GlobalAlgBlk_h*/
const int getL1MenuUUID() const
get simple members
Definition: GlobalAlgBlk.h:66
void setL1MenuUUID(int uuid)
set simple members
Definition: GlobalAlgBlk.h:57
const int getbxInEventNr() const
Definition: GlobalAlgBlk.h:68
std::vector< bool > const & getAlgoDecisionInitial() const
Get decision bits.
Definition: GlobalAlgBlk.h:84
std::vector< bool > m_algoDecisionInitial
Definition: GlobalAlgBlk.h:128
void copyIntermToFinal()
Definition: GlobalAlgBlk.h:76
void setFinalORPreVeto(bool fOR)
Definition: GlobalAlgBlk.h:61
std::vector< bool > const & getAlgoDecisionFinal() const
Definition: GlobalAlgBlk.h:90
void setAlgoDecisionInitial(unsigned int bit, bool val)
Set decision bits.
Definition: GlobalAlgBlk.cc:83
void setbxInEventNr(int bxNr)
Definition: GlobalAlgBlk.h:59
GlobalAlgBlk()
constructors
Definition: GlobalAlgBlk.cc:52
bool m_finalORPreVeto
Definition: GlobalAlgBlk.h:122
BXVector< GlobalAlgBlk > GlobalAlgBlkBxCollection
Definition: GlobalAlgBlk.h:32
void copyInitialToInterm()
Copy vectors words.
Definition: GlobalAlgBlk.h:75
int m_bxNr
bunch cross number of the actual bx -> L1FirmwareUUID
Definition: GlobalAlgBlk.h:115
const bool getFinalORVeto() const
Definition: GlobalAlgBlk.h:71
const bool getFinalORPreVeto() const
Definition: GlobalAlgBlk.h:70
const int getL1FirmwareUUID() const
Definition: GlobalAlgBlk.h:67
#define constexpr
l1t::ObjectRef< GlobalAlgBlk > GlobalAlgBlkRef
Definition: GlobalAlgBlk.h:35
const bool getFinalOR() const
Definition: GlobalAlgBlk.h:69
void print(std::ostream &myCout) const
pretty print the content of a GlobalAlgBlk
void reset()
reset the content of a GlobalAlgBlk
const int getPreScColumn() const
Definition: GlobalAlgBlk.h:72
virtual ~GlobalAlgBlk()
destructor
Definition: GlobalAlgBlk.cc:77
l1t::ObjectRefPair< GlobalAlgBlk > GlobalAlgBlkRefPair
Definition: GlobalAlgBlk.h:37
void setAlgoDecisionInterm(unsigned int bit, bool val)
Definition: GlobalAlgBlk.cc:96
void setFinalOR(bool fOR)
Definition: GlobalAlgBlk.h:62
std::pair< edm::Ref< BXVector< T >>, edm::Ref< BXVector< T >>> ObjectRefPair
l1t::ObjectRefPairBxCollection< GlobalAlgBlk > GlobalAlgBlkRefPairBxCollection
Definition: GlobalAlgBlk.h:38
void setFinalORVeto(bool fOR)
Definition: GlobalAlgBlk.h:60
static unsigned int maxPhysicsTriggers
Definition: GlobalAlgBlk.h:54
int m_orbitNr
orbit number -> L1MenuUUID
Definition: GlobalAlgBlk.h:112
virtual bool operator==(const GlobalAlgBlk &rhs) const
void setL1FirmwareUUID(int fuuid)
Definition: GlobalAlgBlk.h:58
std::vector< bool > m_algoDecisionFinal
Definition: GlobalAlgBlk.h:130
int m_bxInEvent
bunch cross in the GT event record (E,F,0,1,2)
Definition: GlobalAlgBlk.h:118
std::vector< bool > const & getAlgoDecisionInterm() const
Definition: GlobalAlgBlk.h:87
std::vector< bool > m_algoDecisionPreScaled
Definition: GlobalAlgBlk.h:129
void setPreScColumn(int psC)
Definition: GlobalAlgBlk.h:63
virtual bool operator!=(const GlobalAlgBlk &rhs) const
Definition: GlobalAlgBlk.h:102
l1t::ObjectRefBxCollection< GlobalAlgBlk > GlobalAlgBlkRefBxCollection
Definition: GlobalAlgBlk.h:36
bool m_finalORVeto
Definition: GlobalAlgBlk.h:123
void setAlgoDecisionFinal(unsigned int bit, bool val)