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

#include <TopoSteeringStructure.h>

Collaboration diagram for TCS::TopoSteeringStructure:

Public Member Functions

 TopoSteeringStructure ()
 
 ~TopoSteeringStructure ()
 
StatusCode setupFromMenu ATLAS_NOT_THREAD_SAFE (const TrigConf::L1Menu &l1menu, bool legacy=false, bool debug=false)
 
bool isConfigured () const
 
const std::vector< TCS::Connector * > & connectors () const
 
const std::map< std::string, TCS::DecisionConnector * > & outputConnectors () const
 
const std::map< std::string, TCS::CountingConnector * > & countConnectors () const
 
Connectorconnector (const std::string &connectorName) const
 
DecisionConnectoroutputConnector (const std::string &output)
 
CountingConnectorcountingConnector (const std::string &output)
 
StatusCode reset ()
 
void print (std::ostream &o) const
 
void printParameters (std::ostream &o) const
 

Private Member Functions

SortingConnectorsortingConnector (const std::string &output) const
 
StatusCode addDecisionConnector (DecisionConnector *conn)
 
StatusCode addSortingConnector (SortingConnector *conn)
 
StatusCode addCountingConnector (CountingConnector *conn)
 
StatusCode linkConnectors ()
 
StatusCode instantiateAlgorithms ATLAS_NOT_THREAD_SAFE (bool debug)
 

Private Attributes

bool m_isConfigured { false }
 
std::vector< TCS::Connector * > m_connectors
 
std::map< std::string, TCS::DecisionConnector * > m_outputLookup
 
std::map< std::string, TCS::SortingConnector * > m_sortedLookup
 
std::map< std::string, TCS::CountingConnector * > m_countLookup
 
std::map< std::string, TCS::InputConnector * > m_inputLookup
 
std::vector< TCS::ParameterSpace * > m_parameters
 

Detailed Description

Definition at line 31 of file TopoSteeringStructure.h.

Constructor & Destructor Documentation

◆ TopoSteeringStructure()

TCS::TopoSteeringStructure::TopoSteeringStructure ( )

Definition at line 66 of file TopoSteeringStructure.cxx.

66  :
68 {}

◆ ~TopoSteeringStructure()

TopoSteeringStructure::~TopoSteeringStructure ( )

Definition at line 71 of file TopoSteeringStructure.cxx.

71  {
72  for( Connector* c: m_connectors )
73  delete c;
74  for( ParameterSpace * ps : m_parameters )
75  delete ps;
76 }

Member Function Documentation

◆ addCountingConnector()

TCS::StatusCode TopoSteeringStructure::addCountingConnector ( CountingConnector conn)
private

Definition at line 420 of file TopoSteeringStructure.cxx.

420  {
421  m_connectors.push_back(conn);
422  for( const string & output : conn->outputNames() )
425 }

◆ addDecisionConnector()

TCS::StatusCode TopoSteeringStructure::addDecisionConnector ( DecisionConnector conn)
private

Definition at line 411 of file TopoSteeringStructure.cxx.

411  {
412  m_connectors.push_back(conn);
413  for( const string & output : conn->outputNames() )
416 }

◆ addSortingConnector()

TCS::StatusCode TopoSteeringStructure::addSortingConnector ( SortingConnector conn)
private

Definition at line 403 of file TopoSteeringStructure.cxx.

403  {
404  m_connectors.push_back(conn);
405  for( const string & output : conn->outputNames() )
408 }

◆ ATLAS_NOT_THREAD_SAFE() [1/2]

StatusCode instantiateAlgorithms TCS::TopoSteeringStructure::ATLAS_NOT_THREAD_SAFE ( bool  debug)
private

◆ ATLAS_NOT_THREAD_SAFE() [2/2]

StatusCode setupFromMenu TCS::TopoSteeringStructure::ATLAS_NOT_THREAD_SAFE ( const TrigConf::L1Menu l1menu,
bool  legacy = false,
bool  debug = false 
)

◆ connector()

TCS::Connector * TCS::TopoSteeringStructure::connector ( const std::string &  connectorName) const

Definition at line 470 of file TopoSteeringStructure.cxx.

470  {
471  for( TCS::Connector* conn: m_connectors ) {
472  if( conn->name() == connectorName )
473  return conn;
474  }
475  TCS_EXCEPTION("L1Topo Steering: can not find connector of name " << connectorName << ". Need to abort!");
476  return 0;
477 }

◆ connectors()

const std::vector<TCS::Connector*>& TCS::TopoSteeringStructure::connectors ( ) const
inline

Definition at line 43 of file TopoSteeringStructure.h.

43 { return m_connectors; }

◆ countConnectors()

const std::map<std::string, TCS::CountingConnector*>& TCS::TopoSteeringStructure::countConnectors ( ) const
inline

Definition at line 47 of file TopoSteeringStructure.h.

47 { return m_countLookup; }

◆ countingConnector()

TCS::CountingConnector * TCS::TopoSteeringStructure::countingConnector ( const std::string &  output)

Definition at line 508 of file TopoSteeringStructure.cxx.

508  {
509  auto c = m_countLookup.find(output);
510  if( c != m_countLookup.end() )
511  return c->second;
512  TCS_EXCEPTION("L1Topo Steering: can not find counting connector of that produces " << output << ". Need to abort!");
513  return 0;
514 }

◆ isConfigured()

bool TCS::TopoSteeringStructure::isConfigured ( ) const
inline

Definition at line 41 of file TopoSteeringStructure.h.

41 { return m_isConfigured; }

◆ linkConnectors()

TCS::StatusCode TopoSteeringStructure::linkConnectors ( )
private

Definition at line 429 of file TopoSteeringStructure.cxx.

429  {
430 
432  for(const std::string & inconn: conn->inputNames())
433  conn->inputConnectors().push_back( connector(inconn) );
434 
436 }

◆ outputConnector()

TCS::DecisionConnector * TCS::TopoSteeringStructure::outputConnector ( const std::string &  output)

Definition at line 498 of file TopoSteeringStructure.cxx.

498  {
499  auto c = m_outputLookup.find(output);
500  if( c != m_outputLookup.end() )
501  return c->second;
502  TCS_EXCEPTION("L1Topo Steering: can not find output connector of that produces " << output << ". Need to abort!");
503  return 0;
504 }

◆ outputConnectors()

const std::map<std::string, TCS::DecisionConnector*>& TCS::TopoSteeringStructure::outputConnectors ( ) const
inline

Definition at line 45 of file TopoSteeringStructure.h.

45 { return m_outputLookup; }

◆ print()

void TCS::TopoSteeringStructure::print ( std::ostream &  o) const

Definition at line 87 of file TopoSteeringStructure.cxx.

87  {
88  o << "Topo Steering Structure" << endl
89  << "-----------------------" << endl;
90 
91  o << "Output summary:" << endl;
92  for(auto conn: outputConnectors() ) {
93  o << " " << *conn.second << endl;
94  }
95 
96  o << endl
97  << "Algorithm detail:" << endl;
98  for(auto nc: outputConnectors() ) {
99  DecisionConnector * conn = nc.second;
100  unsigned int firstBit = conn->decision().firstBit();
101  unsigned int lastBit = conn->numberOutputBits() + firstBit - 1;
102  const ConfigurableAlg* alg = conn->algorithm();
103  const Connector* inputconn = conn->inputConnectors().back();
104  const ConfigurableAlg* sortalg = inputconn->algorithm();
105  o << std::setw(2) << "bits " << firstBit << "-" << lastBit << ": " << conn->name() << " [input " << inputconn->name() <<"]" << endl;
106  o << *alg << endl << endl;
107  o << *sortalg << endl;
108  }
109 }

◆ printParameters()

void TCS::TopoSteeringStructure::printParameters ( std::ostream &  o) const

Definition at line 113 of file TopoSteeringStructure.cxx.

113  {
114  unsigned int idx(0);
115  for(const ParameterSpace* ps: m_parameters) {
116  if(ps && ps->isInitialized())
117  o << "pos " << std::setw(2) << idx << ": " << ps << endl;
118  idx++;
119  }
120 }

◆ reset()

TCS::StatusCode TopoSteeringStructure::reset ( )

Definition at line 79 of file TopoSteeringStructure.cxx.

79  {
81  conn->reset();
83 }

◆ sortingConnector()

SortingConnector * TopoSteeringStructure::sortingConnector ( const std::string &  output) const
private

Definition at line 481 of file TopoSteeringStructure.cxx.

481  {
482  SortingConnector * sc = nullptr;
483  for( TCS::Connector* conn: m_connectors ) {
484  if( conn->name() == connectorName ) {
485  sc = dynamic_cast<SortingConnector*>(conn);
486  if(sc==nullptr) {
487  TCS_EXCEPTION("TopoSteeringStructure: connector of name " << connectorName << " exists, but is not a SortingConnector. Need to abort!");
488  }
489  }
490  }
491 
492  return sc;
493 }

Member Data Documentation

◆ m_connectors

std::vector<TCS::Connector*> TCS::TopoSteeringStructure::m_connectors
private

Definition at line 81 of file TopoSteeringStructure.h.

◆ m_countLookup

std::map<std::string, TCS::CountingConnector*> TCS::TopoSteeringStructure::m_countLookup
private

Definition at line 87 of file TopoSteeringStructure.h.

◆ m_inputLookup

std::map<std::string, TCS::InputConnector*> TCS::TopoSteeringStructure::m_inputLookup
private

Definition at line 89 of file TopoSteeringStructure.h.

◆ m_isConfigured

bool TCS::TopoSteeringStructure::m_isConfigured { false }
private

Definition at line 79 of file TopoSteeringStructure.h.

◆ m_outputLookup

std::map<std::string, TCS::DecisionConnector*> TCS::TopoSteeringStructure::m_outputLookup
private

Definition at line 83 of file TopoSteeringStructure.h.

◆ m_parameters

std::vector<TCS::ParameterSpace*> TCS::TopoSteeringStructure::m_parameters
private

Definition at line 91 of file TopoSteeringStructure.h.

◆ m_sortedLookup

std::map<std::string, TCS::SortingConnector*> TCS::TopoSteeringStructure::m_sortedLookup
private

Definition at line 85 of file TopoSteeringStructure.h.


The documentation for this class was generated from the following files:
TCS::TopoSteeringStructure::m_sortedLookup
std::map< std::string, TCS::SortingConnector * > m_sortedLookup
Definition: TopoSteeringStructure.h:85
checkCorrelInHIST.conn
conn
Definition: checkCorrelInHIST.py:25
TCS::StatusCode::SUCCESS
@ SUCCESS
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:17
SGout2dot.alg
alg
Definition: SGout2dot.py:243
TCS::Connector
Definition: Connector.h:22
TCS::SortingConnector
Definition: SortingConnector.h:24
TCS::TopoSteeringStructure::m_countLookup
std::map< std::string, TCS::CountingConnector * > m_countLookup
Definition: TopoSteeringStructure.h:87
TCS::LayoutConstraints::maxComponents
static unsigned int maxComponents()
Definition: LayoutConstraints.h:18
TCS::TopoSteeringStructure::outputConnectors
const std::map< std::string, TCS::DecisionConnector * > & outputConnectors() const
Definition: TopoSteeringStructure.h:45
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
TCS::ParameterSpace
Definition: ParameterSpace.h:18
TCS::TopoSteeringStructure::m_connectors
std::vector< TCS::Connector * > m_connectors
Definition: TopoSteeringStructure.h:81
TCS::TopoSteeringStructure::connector
Connector * connector(const std::string &connectorName) const
Definition: TopoSteeringStructure.cxx:470
TCS::TopoSteeringStructure::m_isConfigured
bool m_isConfigured
Definition: TopoSteeringStructure.h:79
TCS_EXCEPTION
#define TCS_EXCEPTION(MSG)
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Exception.h:14
merge.output
output
Definition: merge.py:17
TCS::ConfigurableAlg
Definition: ConfigurableAlg.h:30
TCS::TopoSteeringStructure::m_parameters
std::vector< TCS::ParameterSpace * > m_parameters
Definition: TopoSteeringStructure.h:91
TCS::Connector::algorithm
const TCS::ConfigurableAlg * algorithm() const
Definition: Connector.h:50
TCS::Connector::name
const std::string & name() const
Definition: Connector.h:44
TCS::TopoSteeringStructure::m_outputLookup
std::map< std::string, TCS::DecisionConnector * > m_outputLookup
Definition: TopoSteeringStructure.h:83
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
python.compressB64.c
def c
Definition: compressB64.py:93
TCS::DecisionConnector
Definition: DecisionConnector.h:23
plotBeamSpotMon.nc
int nc
Definition: plotBeamSpotMon.py:83