ATLAS Offline Software
Public Member Functions | Private Attributes | Friends | List of all members
TCS::TopoCoreSimResult Class Reference

#include <TopoCoreSimResult.h>

Inheritance diagram for TCS::TopoCoreSimResult:
Collaboration diagram for TCS::TopoCoreSimResult:

Public Member Functions

 TopoCoreSimResult ()
 
 ~TopoCoreSimResult ()
 
bool triggerDecision (const std::string &triggerName) const
 
const TCS::TOBArraytriggerOutput (const std::string &triggerName) const
 
const GlobalOutputglobalOutput () const
 
const std::vector< const TCS::TOBArray * > & output (const std::string &connName) const
 
StatusCode setupFromMenu (const std::map< std::string, TCS::DecisionConnector * > &outputConnectorMap, const std::map< std::string, TCS::CountingConnector * > &countConnectorMap)
 
StatusCode collectResult (TCS::DecisionConnector *outputConn=nullptr, TCS::CountingConnector *countConn=nullptr)
 
StatusCode reset ()
 
void setMsgLevel (TrigConf::MSGTC::Level lvl)
 
bool msgLvl (const MSGTC::Level lvl) const
 Test the output level. More...
 
MsgStreamTC & msg () const
 The standard message stream. More...
 
MsgStreamTC & msg (const MSGTC::Level lvl) const
 The standard message stream. More...
 

Private Attributes

GlobalOutput m_globalOutput
 
std::map< std::string, TCS::DecisionConnector * > m_outputConnectorMap
 
std::map< std::string, TCS::DecisionConnector * > m_triggerLocationDec
 
std::set< TCS::DecisionConnector * > m_outputConnectors
 
std::map< std::string, TCS::CountingConnector * > m_countConnectorMap
 
std::map< std::string, TCS::CountingConnector * > m_triggerLocationCount
 
std::set< TCS::CountingConnector * > m_countConnectors
 
boost::thread_specific_ptr< MsgStreamTC > m_msg_tls
 MsgStreamTC instance (a std::cout like with print-out levels) More...
 
std::string m_name
 

Friends

std::ostream & operator<< (std::ostream &, const TCS::TopoCoreSimResult &)
 

Detailed Description

Definition at line 36 of file TopoCoreSimResult.h.

Constructor & Destructor Documentation

◆ TopoCoreSimResult()

TopoCoreSimResult::TopoCoreSimResult ( )

Definition at line 26 of file TopoCoreSimResult.cxx.

26  :
27  TrigConfMessaging("TopoCoreSimResult")
28 {}

◆ ~TopoCoreSimResult()

TopoCoreSimResult::~TopoCoreSimResult ( )

Definition at line 30 of file TopoCoreSimResult.cxx.

31 {}

Member Function Documentation

◆ collectResult()

TCS::StatusCode TopoCoreSimResult::collectResult ( TCS::DecisionConnector outputConn = nullptr,
TCS::CountingConnector countConn = nullptr 
)

Definition at line 53 of file TopoCoreSimResult.cxx.

53  {
55  if ( (outputConn == nullptr ) && (countConn == nullptr) ) {
57  } else if ( !(outputConn == nullptr ) && (countConn == nullptr) ){
58  set<DecisionConnector*> c = { outputConn };
60  } else if ( (outputConn == nullptr ) && !(countConn == nullptr) ){
61  set<CountingConnector*> c = { countConn };
63  } else {
64  set<DecisionConnector*> c1 = { outputConn };
65  set<CountingConnector*> c2 = { countConn };
67  }
68  return sc;
69 }

◆ globalOutput()

const GlobalOutput& TCS::TopoCoreSimResult::globalOutput ( ) const
inline

Definition at line 45 of file TopoCoreSimResult.h.

45 { return m_globalOutput; }

◆ msg() [1/2]

MsgStreamTC & TrigConf::TrigConfMessaging::msg ( ) const
inlineinherited

The standard message stream.

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

Definition at line 81 of file TrigConfMessaging.h.

82  {
83  MsgStreamTC* ms = m_msg_tls.get();
84  if (!ms) {
85  ms = new MsgStreamTC(m_name);
86  m_msg_tls.reset(ms);
87  }
88  return *ms;
89  }

◆ msg() [2/2]

MsgStreamTC & TrigConf::TrigConfMessaging::msg ( const MSGTC::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 91 of file TrigConfMessaging.h.

92  {
93  return msg() << lvl;
94  }

◆ msgLvl()

bool TrigConf::TrigConfMessaging::msgLvl ( const MSGTC::Level  lvl) const
inlineinherited

Test the output level.

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

Definition at line 70 of file TrigConfMessaging.h.

71  {
72  if (msg().level() <= lvl) {
73  msg() << lvl;
74  return true;
75  }
76  else {
77  return false;
78  }
79  }

◆ output()

const std::vector< const TCS::TOBArray * > & TCS::TopoCoreSimResult::output ( const std::string &  connName) const

Definition at line 125 of file TopoCoreSimResult.cxx.

125  {
126 
127  for( const DecisionConnector * conn : m_outputConnectors ) {
128  if( conn->name() != connName ) continue;
129  return conn->outputData();
130  }
131 
132  // returns first matching connector as there should only be one, otherwise non match, arrive here and throw an exception.
133  TCS_EXCEPTION("No connector with name '" << connName << "'");
134 
135  //return (*m_outputConnectors.begin())->outputData();
136 }

◆ reset()

TCS::StatusCode TopoCoreSimResult::reset ( )

Definition at line 73 of file TopoCoreSimResult.cxx.

73  {
74  return m_globalOutput.resetOutput();
75 }

◆ setMsgLevel()

void TopoCoreSimResult::setMsgLevel ( TrigConf::MSGTC::Level  lvl)

Definition at line 160 of file TopoCoreSimResult.cxx.

160  {
161  msg().setLevel( lvl );
162 
163  m_globalOutput.msg().setLevel( lvl );
164 }

◆ setupFromMenu()

TCS::StatusCode TopoCoreSimResult::setupFromMenu ( const std::map< std::string, TCS::DecisionConnector * > &  outputConnectorMap,
const std::map< std::string, TCS::CountingConnector * > &  countConnectorMap 
)

Definition at line 79 of file TopoCoreSimResult.cxx.

79  {
80 
81  // Set decision trigger lines
82 
83  m_outputConnectorMap = outputConnectorMap;
84 
85  vector<TrigConf::TriggerLine> triggerLinesDec;
86 
87  for(auto & x : m_outputConnectorMap) {
88  // fill the set
89  m_outputConnectors.insert(x.second);
90 
91  // fill the trigger line map (trigger name --> (TCS::DecisionConnector*,unsigned int index) )
92  for( const TrigConf::TriggerLine & trigger : x.second->triggers() ) {
93  m_triggerLocationDec[trigger.name()] = x.second;
94  triggerLinesDec.push_back(trigger);
95  }
96  }
97 
98  m_globalOutput.setDecisionTriggerLines(triggerLinesDec);
99 
100  // Set multiplicity trigger lines
101 
102  m_countConnectorMap = countConnectorMap;
103 
104  vector<TrigConf::TriggerLine> triggerLinesCount;
105 
106  for(auto & x : m_countConnectorMap) {
107  // fill the set
108  m_countConnectors.insert(x.second);
109 
110  // fill the trigger line map (trigger name --> (TCS::CountingConnector*,unsigned int index) )
111  for( const TrigConf::TriggerLine & trigger : x.second->triggers() ) {
112  m_triggerLocationCount[trigger.name()] = x.second;
113  triggerLinesCount.push_back(trigger);
114  }
115  }
116 
118 
120 }

◆ triggerDecision()

bool TopoCoreSimResult::triggerDecision ( const std::string &  triggerName) const

Definition at line 35 of file TopoCoreSimResult.cxx.

35  {
36  auto x = m_triggerLocationDec.find(triggerName);
37  if( x == end(m_triggerLocationDec) )
38  TCS_EXCEPTION("No trigger with name '" << triggerName << "' defined");
39  return x->second->decision(triggerName);
40 }

◆ triggerOutput()

const TCS::TOBArray * TopoCoreSimResult::triggerOutput ( const std::string &  triggerName) const

Definition at line 43 of file TopoCoreSimResult.cxx.

43  {
44  auto x = m_triggerLocationDec.find(triggerName);
45  if( x == end(m_triggerLocationDec) )
46  TCS_EXCEPTION("No trigger with name '" << triggerName << "' defined");
47  return x->second->output(triggerName);
48 }

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  o,
const TCS::TopoCoreSimResult simRes 
)
friend

Definition at line 141 of file TopoCoreSimResult.cxx.

142  {
143 
144  o << simRes.globalOutput();
145 
146  for( const DecisionConnector * conn : simRes.m_outputConnectors ) {
147  o << conn->name() << endl;
148  // for(const TrigConf::TriggerLine & trigger : conn->triggers()) {
149  // o << " " << trigger << endl;
150  // }
151  for(const TCS::TOBArray* output : conn->outputData())
152  o << " output " << output << endl;
153  }
154 
155  return o;
156 }

Member Data Documentation

◆ m_countConnectorMap

std::map<std::string, TCS::CountingConnector*> TCS::TopoCoreSimResult::m_countConnectorMap
private

Definition at line 71 of file TopoCoreSimResult.h.

◆ m_countConnectors

std::set<TCS::CountingConnector*> TCS::TopoCoreSimResult::m_countConnectors
private

Definition at line 76 of file TopoCoreSimResult.h.

◆ m_globalOutput

GlobalOutput TCS::TopoCoreSimResult::m_globalOutput
private

Definition at line 60 of file TopoCoreSimResult.h.

◆ m_msg_tls

boost::thread_specific_ptr<MsgStreamTC> TrigConf::TrigConfMessaging::m_msg_tls
mutableprivateinherited

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

Definition at line 66 of file TrigConfMessaging.h.

◆ m_name

std::string TrigConf::TrigConfMessaging::m_name
privateinherited

Definition at line 67 of file TrigConfMessaging.h.

◆ m_outputConnectorMap

std::map<std::string, TCS::DecisionConnector*> TCS::TopoCoreSimResult::m_outputConnectorMap
private

Definition at line 63 of file TopoCoreSimResult.h.

◆ m_outputConnectors

std::set<TCS::DecisionConnector*> TCS::TopoCoreSimResult::m_outputConnectors
private

Definition at line 68 of file TopoCoreSimResult.h.

◆ m_triggerLocationCount

std::map<std::string, TCS::CountingConnector*> TCS::TopoCoreSimResult::m_triggerLocationCount
private

Definition at line 74 of file TopoCoreSimResult.h.

◆ m_triggerLocationDec

std::map<std::string, TCS::DecisionConnector*> TCS::TopoCoreSimResult::m_triggerLocationDec
private

Definition at line 66 of file TopoCoreSimResult.h.


The documentation for this class was generated from the following files:
TCS::GlobalOutput::setDecisionTriggerLines
void setDecisionTriggerLines(const std::vector< TrigConf::TriggerLine > &triggers)
Definition: GlobalOutput.cxx:19
checkCorrelInHIST.conn
conn
Definition: checkCorrelInHIST.py:25
TCS::StatusCode::SUCCESS
@ SUCCESS
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:17
TCS::GlobalOutput::collectOutput
StatusCode collectOutput(const std::set< DecisionConnector * > &outConn, const std::set< CountingConnector * > &countConn)
Definition: GlobalOutput.cxx:150
TCS::TopoCoreSimResult::m_globalOutput
GlobalOutput m_globalOutput
Definition: TopoCoreSimResult.h:60
TCS::TopoCoreSimResult::m_countConnectorMap
std::map< std::string, TCS::CountingConnector * > m_countConnectorMap
Definition: TopoCoreSimResult.h:71
TrigConf::TrigConfMessaging::m_msg_tls
boost::thread_specific_ptr< MsgStreamTC > m_msg_tls
MsgStreamTC instance (a std::cout like with print-out levels)
Definition: TrigConfMessaging.h:66
TCS::GlobalOutput::resetOutput
StatusCode resetOutput()
Definition: GlobalOutput.cxx:194
extractSporadic.c1
c1
Definition: extractSporadic.py:134
TCS::TopoCoreSimResult::m_outputConnectors
std::set< TCS::DecisionConnector * > m_outputConnectors
Definition: TopoCoreSimResult.h:68
TCS::TopoCoreSimResult::output
const std::vector< const TCS::TOBArray * > & output(const std::string &connName) const
Definition: TopoCoreSimResult.cxx:125
x
#define x
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
TCS::TopoCoreSimResult::m_countConnectors
std::set< TCS::CountingConnector * > m_countConnectors
Definition: TopoCoreSimResult.h:76
TCS::TopoCoreSimResult::m_triggerLocationCount
std::map< std::string, TCS::CountingConnector * > m_triggerLocationCount
Definition: TopoCoreSimResult.h:74
TrigConf::TriggerLine
a TriggerLine entry describes the location of a threshold multiplicity on a cable (connector)
Definition: L1Connector.h:21
TCS::TopoCoreSimResult::globalOutput
const GlobalOutput & globalOutput() const
Definition: TopoCoreSimResult.h:45
TrigConf::TrigConfMessaging::m_name
std::string m_name
Definition: TrigConfMessaging.h:67
TrigConf::TrigConfMessaging::msg
MsgStreamTC & msg() const
The standard message stream.
Definition: TrigConfMessaging.h:81
TrigConf::TrigConfMessaging::TrigConfMessaging
TrigConfMessaging()=delete
TCS_EXCEPTION
#define TCS_EXCEPTION(MSG)
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Exception.h:14
TCS::TOBArray
Definition: TOBArray.h:24
TCS::TopoCoreSimResult::m_triggerLocationDec
std::map< std::string, TCS::DecisionConnector * > m_triggerLocationDec
Definition: TopoCoreSimResult.h:66
python.DataFormatRates.c2
c2
Definition: DataFormatRates.py:123
TCS::TopoCoreSimResult::m_outputConnectorMap
std::map< std::string, TCS::DecisionConnector * > m_outputConnectorMap
Definition: TopoCoreSimResult.h:63
TrigConf::MsgStreamTC::setLevel
void setLevel(MSGTC::Level lvl)
Set message level of stream.
Definition: Trigger/TrigConfiguration/TrigConfBase/Root/MsgStream.cxx:52
python.compressB64.c
def c
Definition: compressB64.py:93
TCS::GlobalOutput::setMultiplicityTriggerLines
void setMultiplicityTriggerLines(const std::vector< TrigConf::TriggerLine > &triggers)
Definition: GlobalOutput.cxx:33
TCS::DecisionConnector
Definition: DecisionConnector.h:23
TCS::StatusCode
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:15