ATLAS Offline Software
Loading...
Searching...
No Matches
ROIB::RoIBResult Class Reference

Class holding the LVL1 RoIB result build by the RoIBuilder. More...

#include <RoIBResult.h>

Collaboration diagram for ROIB::RoIBResult:

Public Types

enum  {
  EM1_DOFL =1 , EM2_DOFL =2 , EM3_DOFL =4 , EM4_DOFL =8 ,
  J1_DOFL =16 , J2_DOFL =32 , MU_DOFL =64 , MU_SUP1 =128 ,
  MU_SUP2 =256 , MU_SOFL =512
}

Public Member Functions

 RoIBResult ()=default
 default constructor: empty object
 RoIBResult (MuCTPIResult &&, CTPResult &&, std::vector< JetEnergyResult > &&, std::vector< EMTauResult > &&)
 Full move constructor, with all RODs provided.
 RoIBResult (CTPResult &&, std::vector< EMTauResult > &&, std::vector< JetEnergyResult > &&)
 Constructor without Muon rod.
 RoIBResult (CTPResult &&, std::vector< EMTauResult > &&)
 Constructor for only CTP and egamma rods.
 RoIBResult (CTPResult &&)
 Constructor for only CTP rod.
const MuCTPIResultmuCTPIResult () const
 Gets the MuCTPI part of the L1 RDO.
const CTPResultcTPResult () const
 Gets the CTP part of the L1 RDO.
const std::vector< JetEnergyResult > & jetEnergyResult () const
 Gets the jet/energy part of the L1 RDO.
const std::vector< EMTauResult > & eMTauResult () const
 Gets the egamma part of the L1 RDO.
const std::vector< L1TopoResult > & l1TopoResult () const
 Gets the L1Topo part of the L1 RDO.
void l1TopoResult (std::vector< L1TopoResult > &&) noexcept
 Sets the L1Topo part of the L1 RDO.
const std::string dump () const
 dump raw object content to string
const std::string print (const bool longFormat=false) const
 print object content in a human readable format to string
void dumpData () const
 print object content to default message stream
void dumpData (MsgStream &) const
 print object content to given message stream
bool CheckOverflow () const
bool CheckEMOverflow () const
bool CheckJOverflow () const
bool CheckMuOverflow () const
bool CheckMu1Suppression () const
bool CheckMu2Suppression () const
bool CheckMuSorterOverflow () const
bool CheckEMLinkOverflow (unsigned int link) const
bool CheckJLinkOverflow (unsigned int link) const

Static Public Attributes

static constexpr unsigned int DOFL_bitMask = 16
static constexpr unsigned int SUP1_bitMask = 1 << 16
static constexpr unsigned int SUP2_bitMask = 1 << 17
static constexpr unsigned int emOverflow = EM1_DOFL | EM2_DOFL | EM3_DOFL | EM4_DOFL
static constexpr unsigned int jOverflow = J1_DOFL | J2_DOFL
static constexpr unsigned int anyOverflow = emOverflow | jOverflow | MU_DOFL
static constexpr unsigned int emLink [4] = {EM1_DOFL, EM2_DOFL, EM3_DOFL, EM4_DOFL}
static constexpr unsigned int jLink [2] = {J1_DOFL, J2_DOFL}

Private Member Functions

unsigned int GetOverflowMask (bool setMu, bool setEM, bool setJE) const

Private Attributes

MuCTPIResult m_RoIBResultMuCTPI
 result from muon system
CTPResult m_RoIBResultCTP
 result from CTP
std::vector< JetEnergyResultm_RoIBResultJetEnergy
 result from calo system: JetEnergy
std::vector< EMTauResultm_RoIBResultEMTau
 result from calo system: EmTauResult
std::vector< L1TopoResultm_RoIBResultL1Topo
 result from L1Topo

Detailed Description

Class holding the LVL1 RoIB result build by the RoIBuilder.

   RoIBResult holds the complete LVL1 information send by the
   subsystems to the RoIBuilder.

   RoIBResult is the L1 RDO structure.
See also
ROIB::Header
ROIB::Trailer
ROIB::CTPResult
ROIB::MuCTPIResult
ROIB::EMTauResult
ROIB::JetEnergyResult
ROIB::L1TopoResult
Author
Thomas Schoerner-Sadenius thoma.nosp@m.s.sc.nosp@m.hoern.nosp@m.er@c.nosp@m.ern.c.nosp@m.h
Version
$Id: RoIBResult.h,v 1.8 2008-02-01 17:07:23 efeld Exp $

Definition at line 47 of file RoIBResult.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
EM1_DOFL 
EM2_DOFL 
EM3_DOFL 
EM4_DOFL 
J1_DOFL 
J2_DOFL 
MU_DOFL 
MU_SUP1 
MU_SUP2 
MU_SOFL 

Definition at line 93 of file RoIBResult.h.

Constructor & Destructor Documentation

◆ RoIBResult() [1/5]

ROIB::RoIBResult::RoIBResult ( )
default

default constructor: empty object

◆ RoIBResult() [2/5]

ROIB::RoIBResult::RoIBResult ( MuCTPIResult && muctpi,
CTPResult && ctp,
std::vector< JetEnergyResult > && jetEnergy,
std::vector< EMTauResult > && emtau )

Full move constructor, with all RODs provided.

Definition at line 22 of file RoIBResult.cxx.

26 : m_RoIBResultMuCTPI( std::move(muctpi) ),
27 m_RoIBResultCTP( std::move(ctp) ),
28 m_RoIBResultJetEnergy( std::move(jetEnergy) ),
29 m_RoIBResultEMTau( std::move(emtau) ),
31 {
32 }
std::vector< JetEnergyResult > m_RoIBResultJetEnergy
result from calo system: JetEnergy
Definition RoIBResult.h:142
MuCTPIResult m_RoIBResultMuCTPI
result from muon system
Definition RoIBResult.h:140
std::vector< L1TopoResult > m_RoIBResultL1Topo
result from L1Topo
Definition RoIBResult.h:144
CTPResult m_RoIBResultCTP
result from CTP
Definition RoIBResult.h:141
std::vector< EMTauResult > m_RoIBResultEMTau
result from calo system: EmTauResult
Definition RoIBResult.h:143

◆ RoIBResult() [3/5]

ROIB::RoIBResult::RoIBResult ( CTPResult && ctp,
std::vector< EMTauResult > && emtau,
std::vector< JetEnergyResult > && jetEnergy )

Constructor without Muon rod.

Definition at line 34 of file RoIBResult.cxx.

37 : m_RoIBResultMuCTPI(), m_RoIBResultCTP( std::move(ctp) ),
38 m_RoIBResultJetEnergy( std::move(jetEnergy) ), m_RoIBResultEMTau( std::move(emtau) ),
40
41 }

◆ RoIBResult() [4/5]

ROIB::RoIBResult::RoIBResult ( CTPResult && ctp,
std::vector< EMTauResult > && emtau )

Constructor for only CTP and egamma rods.

Definition at line 43 of file RoIBResult.cxx.

44 : m_RoIBResultMuCTPI(), m_RoIBResultCTP( std::move(ctp) ),
45 m_RoIBResultJetEnergy(), m_RoIBResultEMTau( std::move(emtau) ),
47 }

◆ RoIBResult() [5/5]

ROIB::RoIBResult::RoIBResult ( CTPResult && ctp)

Constructor for only CTP rod.

Definition at line 49 of file RoIBResult.cxx.

Member Function Documentation

◆ CheckEMLinkOverflow()

bool ROIB::RoIBResult::CheckEMLinkOverflow ( unsigned int link) const
inline

Definition at line 130 of file RoIBResult.h.

131 { if(link > 3) return false; return (GetOverflowMask(false,true,false) & emLink[link]) != 0;}
static constexpr unsigned int emLink[4]
Definition RoIBResult.h:104
unsigned int GetOverflowMask(bool setMu, bool setEM, bool setJE) const

◆ CheckEMOverflow()

bool ROIB::RoIBResult::CheckEMOverflow ( ) const
inline

Definition at line 112 of file RoIBResult.h.

112{ return (GetOverflowMask(false,true,false) & emOverflow) != 0;}
static constexpr unsigned int emOverflow
Definition RoIBResult.h:101

◆ CheckJLinkOverflow()

bool ROIB::RoIBResult::CheckJLinkOverflow ( unsigned int link) const
inline

Definition at line 134 of file RoIBResult.h.

135 { if(link > 1) return false; return (GetOverflowMask(false,false,true) & jLink[link]) != 0;}
static constexpr unsigned int jLink[2]
Definition RoIBResult.h:105

◆ CheckJOverflow()

bool ROIB::RoIBResult::CheckJOverflow ( ) const
inline

Definition at line 115 of file RoIBResult.h.

115{ return (GetOverflowMask(false,false,true) & jOverflow) != 0;}
static constexpr unsigned int jOverflow
Definition RoIBResult.h:102

◆ CheckMu1Suppression()

bool ROIB::RoIBResult::CheckMu1Suppression ( ) const
inline

Definition at line 121 of file RoIBResult.h.

121{return (GetOverflowMask(true,false,false) & MU_SUP1) != 0;}

◆ CheckMu2Suppression()

bool ROIB::RoIBResult::CheckMu2Suppression ( ) const
inline

Definition at line 124 of file RoIBResult.h.

124{return (GetOverflowMask(true,false,false) & MU_SUP2) != 0;}

◆ CheckMuOverflow()

bool ROIB::RoIBResult::CheckMuOverflow ( ) const
inline

Definition at line 118 of file RoIBResult.h.

118{ return (GetOverflowMask(true,false,false) & MU_DOFL) != 0;}

◆ CheckMuSorterOverflow()

bool ROIB::RoIBResult::CheckMuSorterOverflow ( ) const
inline

Definition at line 127 of file RoIBResult.h.

127{return (GetOverflowMask(true,false,false) & MU_DOFL) != 0;}

◆ CheckOverflow()

bool ROIB::RoIBResult::CheckOverflow ( ) const
inline

Definition at line 109 of file RoIBResult.h.

109{ return (GetOverflowMask(true,true,true) & anyOverflow) != 0;}
static constexpr unsigned int anyOverflow
Definition RoIBResult.h:103

◆ cTPResult()

const CTPResult & ROIB::RoIBResult::cTPResult ( ) const

Gets the CTP part of the L1 RDO.

Definition at line 60 of file RoIBResult.cxx.

60 {
61 return m_RoIBResultCTP;
62 }

◆ dump()

const std::string ROIB::RoIBResult::dump ( ) const

dump raw object content to string

method used for read/write testing and T/P separation

Definition at line 80 of file RoIBResult.cxx.

81 {
82 std::ostringstream s;
83
84 for (std::vector< EMTauResult >::size_type i(0); i < eMTauResult().size(); ++i) {
85 s << "EMTauResult [" << eMTauResult()[i].dump() << "] ";
86 }
87 for (std::vector< JetEnergyResult >::size_type i(0); i < jetEnergyResult().size(); ++i) {
88 s << "JetEnergyResult [" << jetEnergyResult()[i].dump() << "] ";
89 }
90 s << "MuCTPIResult [ " << muCTPIResult().dump() << "] ";
91 s << "CTPResult [ " << cTPResult().dump() << "] ";
92 for (auto & elem: l1TopoResult()){
93 s << "L1TopoResult [" << elem.dump() << "] ";
94 }
95 return s.str();
96 }
const std::string dump() const
dump raw object content to string
Definition CTPResult.cxx:56
const std::string dump() const
dump raw object content to string
const std::vector< L1TopoResult > & l1TopoResult() const
Gets the L1Topo part of the L1 RDO.
const std::vector< JetEnergyResult > & jetEnergyResult() const
Gets the jet/energy part of the L1 RDO.
const CTPResult & cTPResult() const
Gets the CTP part of the L1 RDO.
const std::vector< EMTauResult > & eMTauResult() const
Gets the egamma part of the L1 RDO.
const MuCTPIResult & muCTPIResult() const
Gets the MuCTPI part of the L1 RDO.

◆ dumpData() [1/2]

void ROIB::RoIBResult::dumpData ( ) const

print object content to default message stream

Definition at line 126 of file RoIBResult.cxx.

127 {
128 SmartIF<IMessageSvc> msgSvc{Gaudi::svcLocator()->service("MessageSvc")};
129 if ( !msgSvc ) {
130 return;
131 }
132 MsgStream log(msgSvc, "RoIBResult");
133 dumpData(log);
134 }
void dumpData() const
print object content to default message stream
msgSvc
Provide convenience handles for various services.
Definition StdJOSetup.py:36

◆ dumpData() [2/2]

void ROIB::RoIBResult::dumpData ( MsgStream & log) const

print object content to given message stream

Definition at line 136 of file RoIBResult.cxx.

137 {
138 log << MSG::DEBUG << "=================================================" << endmsg;
139 log << MSG::DEBUG << "Dump of available RoIB Results" << endmsg;
140 m_RoIBResultMuCTPI.dumpData(log);
141 m_RoIBResultCTP.dumpData(log);
142 log << MSG::DEBUG << "=================================================" << endmsg;
143 }
#define endmsg

◆ eMTauResult()

const std::vector< EMTauResult > & ROIB::RoIBResult::eMTauResult ( ) const

Gets the egamma part of the L1 RDO.

Definition at line 68 of file RoIBResult.cxx.

68 {
69 return m_RoIBResultEMTau;
70 }

◆ GetOverflowMask()

unsigned int ROIB::RoIBResult::GetOverflowMask ( bool setMu,
bool setEM,
bool setJE ) const
private

Definition at line 145 of file RoIBResult.cxx.

145 {
146
147 const static unsigned int LRS_bitMask = 1 << 1;
148 const static unsigned int SOFL_bitMask = 1 << 19;
149
150 unsigned int overflowMask = 0;
151
152 // uint32_t errorStatus = m_RoIBResultMuCTPI.trailer().errorStatus();
153
154
155 if(setMu) {
156 uint32_t statusInfo = m_RoIBResultMuCTPI.trailer().statusInfo();
157
158 overflowMask |= ((statusInfo & LRS_bitMask) != 0)? MU_DOFL : 0;
159 overflowMask |= ((statusInfo & SUP1_bitMask) != 0)? MU_SUP1 : 0;
160 //overflowMask |= ((statusInfo & SUP2_bitMask) != 0)? MU_SUP2 : 0;
161 // Kludge: use MU_SUP2 to indicate SOFL overflow instead to avoid changing pub interface
162 overflowMask |= ((statusInfo & SOFL_bitMask) != 0)? MU_SUP2 : 0;
163 }
164
165 if(setEM) {
166 int link = 0;
167
168 for (const EMTauResult& item : m_RoIBResultEMTau) {
169 const Trailer &trailer = item.trailer();
170 uint32_t statusInfo = trailer.statusInfo();
171
172 overflowMask |= ((statusInfo & LRS_bitMask) != 0)? emLink[link] : 0;
173
174 if(link == 3) break; // just to be sure
175 ++link;
176
177 }
178 }
179
180 if(setJE) {
181 int link = 0;
182 for (const JetEnergyResult& item : m_RoIBResultJetEnergy) {
183 const Trailer &trailer = item.trailer();
184 uint32_t statusInfo = trailer.statusInfo();
185
186 overflowMask |= ((statusInfo & LRS_bitMask) != 0)? jLink[link] : 0;
187
188 if(link == 1) break;
189
190 ++link;
191 }
192 }
193
194 return overflowMask;
195 }
static constexpr unsigned int SUP1_bitMask
Definition RoIBResult.h:98
setEventNumber uint32_t

◆ jetEnergyResult()

const std::vector< JetEnergyResult > & ROIB::RoIBResult::jetEnergyResult ( ) const

Gets the jet/energy part of the L1 RDO.

Definition at line 64 of file RoIBResult.cxx.

64 {
66 }

◆ l1TopoResult() [1/2]

const std::vector< L1TopoResult > & ROIB::RoIBResult::l1TopoResult ( ) const

Gets the L1Topo part of the L1 RDO.

Definition at line 72 of file RoIBResult.cxx.

72 {
73 return m_RoIBResultL1Topo;
74 }

◆ l1TopoResult() [2/2]

void ROIB::RoIBResult::l1TopoResult ( std::vector< L1TopoResult > && vL1TopoResult)
noexcept

Sets the L1Topo part of the L1 RDO.

Definition at line 76 of file RoIBResult.cxx.

76 {
77 m_RoIBResultL1Topo = std::move(vL1TopoResult);
78 }

◆ muCTPIResult()

const MuCTPIResult & ROIB::RoIBResult::muCTPIResult ( ) const

Gets the MuCTPI part of the L1 RDO.

Definition at line 56 of file RoIBResult.cxx.

56 {
57 return m_RoIBResultMuCTPI;
58 }

◆ print()

const std::string ROIB::RoIBResult::print ( const bool longFormat = false) const

print object content in a human readable format to string

Definition at line 98 of file RoIBResult.cxx.

99 {
100 std::ostringstream s;
101
102 for (std::vector< EMTauResult >::size_type i(0); i < eMTauResult().size(); ++i) {
103 if (i == 0 || longFormat) s << "\n EMTauResult ";
104 if (longFormat) s << std::setw(2) << i;
105 s << eMTauResult()[i].print(longFormat);
106 if (longFormat) s << std::endl;
107 }
108 for (std::vector< JetEnergyResult >::size_type i(0); i < jetEnergyResult().size(); ++i) {
109 if (i == 0 || longFormat) s << "\n JetEnergyResult ";
110 if (longFormat) s << std::setw(2) << i;
111 s << jetEnergyResult()[i].print(longFormat);
112 if (longFormat) s << std::endl;
113 }
114 s << "\n MuCTPIResult " << muCTPIResult().print(longFormat);
115 if (longFormat) s << std::endl;
116 s << "\n CTPResult " << cTPResult().print(longFormat);
117 if (longFormat) s << std::endl;
118 for (auto & elem: l1TopoResult()){
119 s << "L1TopoResult [" << elem.dump() << "] ";
120 }
121 if (longFormat) s << std::endl;
122
123 return s.str();
124 }
const std::string print(const bool longFormat=false) const
print object content in a human readable format to string
Definition CTPResult.cxx:71
const std::string print(const bool longFormat=false) const
print object content in a human readable format to string

Member Data Documentation

◆ anyOverflow

unsigned int ROIB::RoIBResult::anyOverflow = emOverflow | jOverflow | MU_DOFL
staticconstexpr

Definition at line 103 of file RoIBResult.h.

◆ DOFL_bitMask

unsigned int ROIB::RoIBResult::DOFL_bitMask = 16
staticconstexpr

Definition at line 97 of file RoIBResult.h.

◆ emLink

unsigned int ROIB::RoIBResult::emLink[4] = {EM1_DOFL, EM2_DOFL, EM3_DOFL, EM4_DOFL}
staticconstexpr

Definition at line 104 of file RoIBResult.h.

◆ emOverflow

unsigned int ROIB::RoIBResult::emOverflow = EM1_DOFL | EM2_DOFL | EM3_DOFL | EM4_DOFL
staticconstexpr

Definition at line 101 of file RoIBResult.h.

◆ jLink

unsigned int ROIB::RoIBResult::jLink[2] = {J1_DOFL, J2_DOFL}
staticconstexpr

Definition at line 105 of file RoIBResult.h.

◆ jOverflow

unsigned int ROIB::RoIBResult::jOverflow = J1_DOFL | J2_DOFL
staticconstexpr

Definition at line 102 of file RoIBResult.h.

◆ m_RoIBResultCTP

CTPResult ROIB::RoIBResult::m_RoIBResultCTP
private

result from CTP

Definition at line 141 of file RoIBResult.h.

◆ m_RoIBResultEMTau

std::vector< EMTauResult > ROIB::RoIBResult::m_RoIBResultEMTau
private

result from calo system: EmTauResult

Definition at line 143 of file RoIBResult.h.

◆ m_RoIBResultJetEnergy

std::vector< JetEnergyResult > ROIB::RoIBResult::m_RoIBResultJetEnergy
private

result from calo system: JetEnergy

Definition at line 142 of file RoIBResult.h.

◆ m_RoIBResultL1Topo

std::vector< L1TopoResult> ROIB::RoIBResult::m_RoIBResultL1Topo
private

result from L1Topo

Definition at line 144 of file RoIBResult.h.

◆ m_RoIBResultMuCTPI

MuCTPIResult ROIB::RoIBResult::m_RoIBResultMuCTPI
private

result from muon system

Definition at line 140 of file RoIBResult.h.

◆ SUP1_bitMask

unsigned int ROIB::RoIBResult::SUP1_bitMask = 1 << 16
staticconstexpr

Definition at line 98 of file RoIBResult.h.

◆ SUP2_bitMask

unsigned int ROIB::RoIBResult::SUP2_bitMask = 1 << 17
staticconstexpr

Definition at line 99 of file RoIBResult.h.


The documentation for this class was generated from the following files: