ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1TGC::TGCBIS78CoincidenceMap Class Reference

#include <TGCBIS78CoincidenceMap.h>

Inheritance diagram for LVL1TGC::TGCBIS78CoincidenceMap:
Collaboration diagram for LVL1TGC::TGCBIS78CoincidenceMap:

Public Member Functions

 TGCBIS78CoincidenceMap (LVL1TGCTrigger::TGCArguments *tgcargs, const std::string &version)
virtual ~TGCBIS78CoincidenceMap ()=default
 TGCBIS78CoincidenceMap (const TGCBIS78CoincidenceMap &right)
int TGCBIS78_pt (const BIS78TrigOut *bis78Out, int) const
int getFlagROI (const unsigned int roi, const unsigned int ssc, const unsigned int sec, const unsigned int side) const
const std::string & getVersion () const
bool readMap ()
LVL1TGCTrigger::TGCArgumentstgcArgs ()
const LVL1TGCTrigger::TGCArgumentstgcArgs () const
bool msgLvl (const MSG::Level lvl) const
 Test the output level.
MsgStream & msg () const
 The standard message stream.
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream.
void setLevel (MSG::Level lvl)
 Change the current logging level.

Private Member Functions

 TGCBIS78CoincidenceMap ()=delete
void initMessaging () const
 Initialize our message level and MessageSvc.

Private Attributes

std::vector< short int > m_CW [N_DETA][N_DPHI]
int m_flagROI [kNRoiInSSC][kNMaxSSC][kNEndcapTrigSector]
std::string m_verName
LVL1TGCTrigger::TGCArgumentsm_tgcArgs
std::string m_nm
 Message source name.
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels)
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer.
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level.
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging)

Static Private Attributes

static constexpr unsigned int N_DETA = 64
static constexpr unsigned int N_DPHI = 16

Detailed Description

Definition at line 23 of file TGCBIS78CoincidenceMap.h.

Constructor & Destructor Documentation

◆ TGCBIS78CoincidenceMap() [1/3]

LVL1TGC::TGCBIS78CoincidenceMap::TGCBIS78CoincidenceMap ( LVL1TGCTrigger::TGCArguments * tgcargs,
const std::string & version )

Definition at line 19 of file TGCBIS78CoincidenceMap.cxx.

20: AthMessaging("TGCBIS78CoincidenceMap"),
21 m_verName(version),
22 m_tgcArgs(tgcargs)
23{
24 setLevel(tgcArgs()->MSGLEVEL());
25
26 if(!tgcArgs()->USE_BIS78()){return;}
27
28 // initialize map
29 for (size_t sec=0; sec < kNEndcapTrigSector; sec++){
30 for (size_t ssc=0; ssc < kNMaxSSC; ssc++){
31 for (size_t pos=0; pos < kNRoiInSSC; pos++){
32 m_flagROI[pos][ssc][sec] = 1;
33 }
34 }
35 }
36
37 for (size_t dr=0; dr!=N_DETA; dr++) {
38 for (size_t dphi=0; dphi!=N_DPHI; dphi++) {
39 m_CW[dr][dphi].resize(kNumberOfEndcapRoI);
40 std::fill(m_CW[dr][dphi].begin(), m_CW[dr][dphi].end(), 0);
41 }
42 }
43
44 //---------Read out CW data---------
45 if (!this->readMap()) {
46 // BIS78 trigger flag is set to false when the map reading failed.
47 tgcArgs()->set_USE_BIS78(false);
48 ATH_MSG_INFO("NOT using BIS78");
49 } else {
50 ATH_MSG_INFO("TGC BIS78 CW version of " << m_verName << " is selected");
51 }
52}
#define ATH_MSG_INFO(x)
void setLevel(MSG::Level lvl)
Change the current logging level.
AthMessaging()
Default constructor:
int m_flagROI[kNRoiInSSC][kNMaxSSC][kNEndcapTrigSector]
static constexpr unsigned int N_DPHI
LVL1TGCTrigger::TGCArguments * tgcArgs()
LVL1TGCTrigger::TGCArguments * m_tgcArgs
std::vector< short int > m_CW[N_DETA][N_DPHI]
static constexpr unsigned int N_DETA
static constexpr unsigned int kNEndcapTrigSector
The number of endcap trigger sectors per side.
static constexpr unsigned int kNumberOfEndcapRoI
The number of ROIs in a endcap trigger sector.
static constexpr unsigned int kNMaxSSC
The maximim number of SubSector-Clusters (SSC) (i.e.
static constexpr unsigned int kNRoiInSSC
The default number of ROIs in SSC.

◆ ~TGCBIS78CoincidenceMap()

virtual LVL1TGC::TGCBIS78CoincidenceMap::~TGCBIS78CoincidenceMap ( )
virtualdefault

◆ TGCBIS78CoincidenceMap() [2/3]

LVL1TGC::TGCBIS78CoincidenceMap::TGCBIS78CoincidenceMap ( const TGCBIS78CoincidenceMap & right)

◆ TGCBIS78CoincidenceMap() [3/3]

LVL1TGC::TGCBIS78CoincidenceMap::TGCBIS78CoincidenceMap ( )
privatedelete

Member Function Documentation

◆ getFlagROI()

int LVL1TGC::TGCBIS78CoincidenceMap::getFlagROI ( const unsigned int roi,
const unsigned int ssc,
const unsigned int sec,
const unsigned int side ) const

Definition at line 76 of file TGCBIS78CoincidenceMap.cxx.

80{
81 if (side != TGCSide::ASIDE) return 0; // BIS78 only in A side
82
83 if (roi >= kNRoiInSSC) return -1;
84 if (ssc >= kNMaxSSC) return 0;
85 if (sec >= kNEndcapTrigSector) return -1;
86
87 // which inner LUT will be implemented
88 return m_flagROI[roi][ssc][sec];
89}

◆ getVersion()

const std::string & LVL1TGC::TGCBIS78CoincidenceMap::getVersion ( ) const
inline

Definition at line 33 of file TGCBIS78CoincidenceMap.h.

33{ return m_verName; }

◆ initMessaging()

void AthMessaging::initMessaging ( ) const
privateinherited

Initialize our message level and MessageSvc.

This method should only be called once.

Definition at line 39 of file AthMessaging.cxx.

40{
42 // If user did not set an explicit level, set a default
43 if (m_lvl == MSG::NIL) {
44 m_lvl = m_imsg ?
45 static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
46 MSG::INFO;
47 }
48}
std::string m_nm
Message source name.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
std::atomic< MSG::Level > m_lvl
Current logging level.
IMessageSvc * getMessageSvc(bool quiet=false)

◆ msg() [1/2]

MsgStream & AthMessaging::msg ( ) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 163 of file AthMessaging.h.

164{
165 MsgStream* ms = m_msg_tls.get();
166 if (!ms) {
167 if (!m_initialized.test_and_set()) initMessaging();
168 ms = new MsgStream(m_imsg,m_nm);
169 m_msg_tls.reset( ms );
170 }
171
172 ms->setLevel (m_lvl);
173 return *ms;
174}
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
void initMessaging() const
Initialize our message level and MessageSvc.

◆ msg() [2/2]

MsgStream & AthMessaging::msg ( const MSG::Level lvl) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 178 of file AthMessaging.h.

179{ return msg() << lvl; }
MsgStream & msg() const
The standard message stream.

◆ msgLvl()

bool AthMessaging::msgLvl ( const MSG::Level lvl) const
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicating if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 151 of file AthMessaging.h.

152{
153 if (m_lvl <= lvl) {
154 msg() << lvl;
155 return true;
156 } else {
157 return false;
158 }
159}

◆ readMap()

bool LVL1TGC::TGCBIS78CoincidenceMap::readMap ( )

Definition at line 91 of file TGCBIS78CoincidenceMap.cxx.

92{
93 // no LUT available for TGC-BIS78 coincidence
94 // just return true for now
95
96 return true;
97}

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 28 of file AthMessaging.cxx.

29{
30 m_lvl = lvl;
31}

◆ tgcArgs() [1/2]

LVL1TGCTrigger::TGCArguments * LVL1TGC::TGCBIS78CoincidenceMap::tgcArgs ( )
inline

Definition at line 36 of file TGCBIS78CoincidenceMap.h.

36{ return m_tgcArgs;}

◆ tgcArgs() [2/2]

const LVL1TGCTrigger::TGCArguments * LVL1TGC::TGCBIS78CoincidenceMap::tgcArgs ( ) const
inline

Definition at line 37 of file TGCBIS78CoincidenceMap.h.

37{ return m_tgcArgs;}

◆ TGCBIS78_pt()

int LVL1TGC::TGCBIS78CoincidenceMap::TGCBIS78_pt ( const BIS78TrigOut * bis78Out,
int  ) const

Definition at line 56 of file TGCBIS78CoincidenceMap.cxx.

57{
58 std::vector<uint8_t> bis78Eta_vec=bis78Out->getBIS78eta();
59 std::vector<uint8_t> bis78Phi_vec=bis78Out->getBIS78phi();
60 std::vector<uint8_t> bis78Deta_vec=bis78Out->getBIS78Deta();
61 std::vector<uint8_t> bis78Dphi_vec=bis78Out->getBIS78Dphi();
62 std::vector<uint8_t> bis78flag3over3eta_vec=bis78Out->getBIS78flag3over3eta();
63 std::vector<uint8_t> bis78flag3over3phi_vec=bis78Out->getBIS78flag3over3phi();
64
65 int pt=0;
66 // temporal algorithm
67 for(unsigned int bis78hit_id=0; bis78hit_id!=bis78Eta_vec.size(); bis78hit_id++){
68 // calculate dR, dPhi bin # from eta/phiIndex?
69 // for now, if there is a hit at BIS78, it returns true always
70 pt=1;
71 }
72
73 return pt;
74}

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
mutableprivateinherited

Messaging initialized (initMessaging)

Definition at line 141 of file AthMessaging.h.

◆ m_CW

std::vector<short int> LVL1TGC::TGCBIS78CoincidenceMap::m_CW[N_DETA][N_DPHI]
private

Definition at line 47 of file TGCBIS78CoincidenceMap.h.

◆ m_flagROI

int LVL1TGC::TGCBIS78CoincidenceMap::m_flagROI[kNRoiInSSC][kNMaxSSC][kNEndcapTrigSector]
private

Definition at line 49 of file TGCBIS78CoincidenceMap.h.

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

135{ nullptr };

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

138{ MSG::NIL };

◆ m_msg_tls

boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls
mutableprivateinherited

MsgStream instance (a std::cout like with print-out levels)

Definition at line 132 of file AthMessaging.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_tgcArgs

LVL1TGCTrigger::TGCArguments* LVL1TGC::TGCBIS78CoincidenceMap::m_tgcArgs
private

Definition at line 54 of file TGCBIS78CoincidenceMap.h.

◆ m_verName

std::string LVL1TGC::TGCBIS78CoincidenceMap::m_verName
private

Definition at line 52 of file TGCBIS78CoincidenceMap.h.

◆ N_DETA

unsigned int LVL1TGC::TGCBIS78CoincidenceMap::N_DETA = 64
staticconstexprprivate

Definition at line 43 of file TGCBIS78CoincidenceMap.h.

◆ N_DPHI

unsigned int LVL1TGC::TGCBIS78CoincidenceMap::N_DPHI = 16
staticconstexprprivate

Definition at line 44 of file TGCBIS78CoincidenceMap.h.


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