#include <MatchingImplementation.h>
Definition at line 33 of file MatchingImplementation.h.
◆ MatchingImplementation()
| Trig::MatchingImplementation::MatchingImplementation |
( |
MatchingTool & | mt, |
|
|
double | threshold = 0.4 ) |
Definition at line 12 of file MatchingImplementation.cxx.
12 : asg::AsgMessaging(
"MatchingImplementation"),
m_tool(mt),
m_threshold(threshold) {
14}
std::map< Trig::MatchingStrategy::Strategy, std::unique_ptr< IAssociationStrategy > > m_strategies
◆ assocIsMatched()
Definition at line 20 of file MatchingImplementation.cxx.
20 {
22 if(!ndim) return false;
23
25 for(auto trig_reco : association){
29 ATH_MSG_DEBUG(
"reco: " << trig_reco.first <<
" associated to trig: " << trig_reco.second <<
30 " with distance: " <<
distance <<
" ok: " << single_assoc <<
" overall: " << result);
31 }
33}
int distance(const BunchCrossing bc1, const BunchCrossing bc2)
I need this function only for technical reasons.
◆ 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
43 if (
m_lvl == MSG::NIL) {
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)
◆ matchDistanceMatrix()
Definition at line 35 of file MatchingImplementation.cxx.
35 {
37 int ncols =
matrix.at(0).size();
38
39 ATH_MSG_DEBUG(
"matching a " << nrows <<
"x" << ncols <<
"matrix now");
40
41
42 auto MSG_MATRIX = MSG::DEBUG;
44 msg() << MSG_MATRIX <<
"===========" <<
endmsg;
45 for(auto& row : matrix){
46 msg() << MSG_MATRIX <<
"|";
49 }
51 }
52 msg() << MSG_MATRIX <<
"===========" <<
endmsg;
53 }
54
55
56
57 for(auto& row : matrix) {
58 bool rowOk=false;
60 if(
distance < threshold ) { rowOk =
true;
break; }
61 }
62 if(!rowOk) {
63 ATH_MSG_DEBUG(
"row of matrix does not contain any distance below threshold. Return false");
return false;
64 }
65 }
66
67 auto association_map =
m_strategies.at(strategy)->associate(matrix);
69}
bool assocIsMatched(const IAssociationStrategy::index_assignment_t &association, const std::vector< std::vector< double > > &matrix, double threshold) const
MsgStream & msg() const
The standard message stream.
bool msgLvl(const MSG::Level lvl) const
Test the output level of the object.
◆ msg() [1/2]
| MsgStream & asg::AsgMessaging::msg |
( |
| ) |
const |
|
inherited |
The standard message stream.
- Returns
- A reference to the default message stream of this object.
Definition at line 49 of file AsgMessaging.cxx.
49 {
50#ifndef XAOD_STANDALONE
51 return ::AthMessaging::msg();
52#else
53 return m_msg;
54#endif
55 }
◆ msg() [2/2]
| MsgStream & asg::AsgMessaging::msg |
( |
const MSG::Level | lvl | ) |
const |
|
inherited |
The standard message stream.
- Parameters
-
| lvl | The message level to set the stream to |
- Returns
- A reference to the default message stream, set to level "lvl"
Definition at line 57 of file AsgMessaging.cxx.
57 {
58#ifndef XAOD_STANDALONE
59 return ::AthMessaging::msg( lvl );
60#else
61 m_msg << lvl;
62 return m_msg;
63#endif
64 }
◆ msgLvl()
| bool asg::AsgMessaging::msgLvl |
( |
const MSG::Level | lvl | ) |
const |
|
inherited |
Test the output level of the object.
- Parameters
-
| lvl | The message level to test against |
- Returns
- boolean Indicting if messages at given level will be printed
-
true If messages at level "lvl" will be printed
Definition at line 41 of file AsgMessaging.cxx.
41 {
42#ifndef XAOD_STANDALONE
43 return ::AthMessaging::msgLvl( lvl );
44#else
45 return m_msg.msgLevel( lvl );
46#endif
47 }
◆ setLevel()
| void AthMessaging::setLevel |
( |
MSG::Level | lvl | ) |
|
|
inherited |
◆ setThreshold()
| void Trig::MatchingImplementation::setThreshold |
( |
double | in | ) |
|
|
inline |
◆ tdt()
◆ ATLAS_THREAD_SAFE
| std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_imsg
| std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_lvl
| std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ 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 |
◆ m_strategies
◆ m_threshold
| double Trig::MatchingImplementation::m_threshold |
|
private |
◆ m_tool
The documentation for this class was generated from the following files: