ATLAS Offline Software
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
TCS::Connector Class Referenceabstract

#include <Connector.h>

Inheritance diagram for TCS::Connector:
Collaboration diagram for TCS::Connector:

Public Types

enum  ConnectorType {
  NONE =0, INPUT, SORT, DECISION,
  COUNT
}
 

Public Member Functions

 Connector (const std::string &name, ConnectorType conntype)
 
 Connector (const std::string &name, const std::vector< std::string > &inputnames, const std::string &algorithm, const std::vector< std::string > &outputnames, ConnectorType conntype)
 
virtual ~Connector ()
 
bool isInputConnector () const
 
bool isSortingConnector () const
 
bool isDecisionConnector () const
 
bool isCountingConnector () const
 
const std::string & name () const
 
const std::string & algorithmName () const
 
const std::vector< std::string > & inputNames () const
 
const std::vector< std::string > & outputNames () const
 
const std::vector< TCS::Connector * > & inputConnectors () const
 
const TCS::ConfigurableAlgalgorithm () const
 
virtual void setAlgorithm (TCS::ConfigurableAlg *)
 
virtual StatusCode clearOutput ()=0
 
StatusCode reset ()
 
bool isExecuted () const
 
StatusCode executionStatusCode () const
 
unsigned int numberOutputBits () const
 
void toggleInputOverflow (const bool value)
 to be toggled after 'attachOutputData' is called. More...
 
bool hasInputOverflow () const
 
void toggleAmbiguity (const bool value)
 
bool hasAmbiguity () const
 

Protected Member Functions

void setIsExecuted (bool isExecuted)
 
void setExecutionStatusCode (StatusCode statusCode)
 
std::vector< TCS::Connector * > & inputConnectors ()
 
TCS::ConfigurableAlgalgorithm ()
 

Protected Attributes

std::string m_name {""}
 
std::string m_algorithmName {""}
 
std::vector< std::string > m_inputNames
 
std::vector< std::string > m_outputNames
 
std::vector< TCS::Connector * > m_inputConnectors
 
TCS::ConfigurableAlgm_algorithm { nullptr }
 the algorithm that belongs to this connector More...
 
bool m_isExecuted {false}
 
StatusCode m_executionStatusCode {StatusCode::SUCCESS}
 
bool m_hasInputOverflow
 whether the input data came with an overflow bit More...
 
bool m_hasAmbiguity
 

Private Attributes

ConnectorType m_conntype { NONE }
 

Friends

class TopoSteering
 
class TopoSteeringStructure
 

Detailed Description

Definition at line 22 of file Connector.h.

Member Enumeration Documentation

◆ ConnectorType

Enumerator
NONE 
INPUT 
SORT 
DECISION 
COUNT 

Definition at line 25 of file Connector.h.

25 { NONE=0, INPUT, SORT, DECISION, COUNT };

Constructor & Destructor Documentation

◆ Connector() [1/2]

TCS::Connector::Connector ( const std::string &  name,
ConnectorType  conntype 
)

Definition at line 31 of file Connector.cxx.

32  :
33  m_name(name),
34  m_conntype(conntype)
35 {}

◆ Connector() [2/2]

TCS::Connector::Connector ( const std::string &  name,
const std::vector< std::string > &  inputnames,
const std::string &  algorithm,
const std::vector< std::string > &  outputnames,
ConnectorType  conntype 
)

Definition at line 17 of file Connector.cxx.

21  :
22  m_name(name),
26  m_conntype(conntype)
27 {}

◆ ~Connector()

TCS::Connector::~Connector ( )
virtual

Definition at line 38 of file Connector.cxx.

38 {}

Member Function Documentation

◆ algorithm() [1/2]

TCS::ConfigurableAlg* TCS::Connector::algorithm ( )
inlineprotected

Definition at line 87 of file Connector.h.

87 { return m_algorithm; }

◆ algorithm() [2/2]

const TCS::ConfigurableAlg* TCS::Connector::algorithm ( ) const
inline

Definition at line 50 of file Connector.h.

50 { return m_algorithm; }

◆ algorithmName()

const std::string& TCS::Connector::algorithmName ( ) const
inline

Definition at line 45 of file Connector.h.

45 { return m_algorithmName; }

◆ clearOutput()

virtual StatusCode TCS::Connector::clearOutput ( )
pure virtual

◆ executionStatusCode()

StatusCode TCS::Connector::executionStatusCode ( ) const
inline

Definition at line 61 of file Connector.h.

61 { return m_executionStatusCode; }

◆ hasAmbiguity()

bool TCS::Connector::hasAmbiguity ( ) const
inline

Definition at line 73 of file Connector.h.

73 { return m_hasAmbiguity; }

◆ hasInputOverflow()

bool TCS::Connector::hasInputOverflow ( ) const
inline

Definition at line 70 of file Connector.h.

70 { return m_hasInputOverflow; }

◆ inputConnectors() [1/2]

std::vector<TCS::Connector*>& TCS::Connector::inputConnectors ( )
inlineprotected

Definition at line 85 of file Connector.h.

85 { return m_inputConnectors; }

◆ inputConnectors() [2/2]

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

Definition at line 49 of file Connector.h.

49 { return m_inputConnectors; }

◆ inputNames()

const std::vector<std::string>& TCS::Connector::inputNames ( ) const
inline

Definition at line 46 of file Connector.h.

46 { return m_inputNames; }

◆ isCountingConnector()

bool TCS::Connector::isCountingConnector ( ) const
inline

Definition at line 42 of file Connector.h.

42 { return m_conntype == COUNT; }

◆ isDecisionConnector()

bool TCS::Connector::isDecisionConnector ( ) const
inline

Definition at line 41 of file Connector.h.

41 { return m_conntype == DECISION; }

◆ isExecuted()

bool TCS::Connector::isExecuted ( ) const
inline

Definition at line 59 of file Connector.h.

59 { return m_isExecuted; }

◆ isInputConnector()

bool TCS::Connector::isInputConnector ( ) const
inline

Definition at line 39 of file Connector.h.

39 { return m_conntype == INPUT; }

◆ isSortingConnector()

bool TCS::Connector::isSortingConnector ( ) const
inline

Definition at line 40 of file Connector.h.

40 { return m_conntype == SORT; }

◆ name()

const std::string& TCS::Connector::name ( ) const
inline

Definition at line 44 of file Connector.h.

44 { return m_name; }

◆ numberOutputBits()

unsigned int TCS::Connector::numberOutputBits ( ) const

Definition at line 68 of file Connector.cxx.

68  {
69  if(isDecisionConnector()) {
70  return ((DecisionAlg*) algorithm())->numberOutputBits();
71  } else {
72  return 0;
73  }
74 }

◆ outputNames()

const std::vector<std::string>& TCS::Connector::outputNames ( ) const
inline

Definition at line 47 of file Connector.h.

47 { return m_outputNames; }

◆ reset()

TCS::StatusCode TCS::Connector::reset ( )

Definition at line 48 of file Connector.cxx.

48  {
50 
51  // clear the output data
52  sc &= clearOutput();
53  m_hasInputOverflow = false;
54  m_hasAmbiguity = false;
55 
56  // reset the algorithm
57  if(m_algorithm)
58  sc &= m_algorithm->reset();
59 
60  // reset the execution flags
61  m_isExecuted = false;
63 
64  return sc;
65 }

◆ setAlgorithm()

void TCS::Connector::setAlgorithm ( TCS::ConfigurableAlg alg)
virtual

Reimplemented in TCS::CountingConnector, TCS::DecisionConnector, and TCS::SortingConnector.

Definition at line 42 of file Connector.cxx.

42  { // alg ownership is with the factory
43  m_algorithm = alg;
44 }

◆ setExecutionStatusCode()

void TCS::Connector::setExecutionStatusCode ( StatusCode  statusCode)
inlineprotected

Definition at line 83 of file Connector.h.

◆ setIsExecuted()

void TCS::Connector::setIsExecuted ( bool  isExecuted)
inlineprotected

Definition at line 81 of file Connector.h.

◆ toggleAmbiguity()

void TCS::Connector::toggleAmbiguity ( const bool  value)

Definition at line 81 of file Connector.cxx.

82 {
84 }

◆ toggleInputOverflow()

void TCS::Connector::toggleInputOverflow ( const bool  value)

to be toggled after 'attachOutputData' is called.

This flag is reset with reset().

Definition at line 76 of file Connector.cxx.

77 {
79 }

Friends And Related Function Documentation

◆ TopoSteering

friend class TopoSteering
friend

Definition at line 77 of file Connector.h.

◆ TopoSteeringStructure

friend class TopoSteeringStructure
friend

Definition at line 78 of file Connector.h.

Member Data Documentation

◆ m_algorithm

TCS::ConfigurableAlg* TCS::Connector::m_algorithm { nullptr }
protected

the algorithm that belongs to this connector

Definition at line 102 of file Connector.h.

◆ m_algorithmName

std::string TCS::Connector::m_algorithmName {""}
protected

Definition at line 93 of file Connector.h.

◆ m_conntype

ConnectorType TCS::Connector::m_conntype { NONE }
private

Definition at line 117 of file Connector.h.

◆ m_executionStatusCode

StatusCode TCS::Connector::m_executionStatusCode {StatusCode::SUCCESS}
protected

Definition at line 107 of file Connector.h.

◆ m_hasAmbiguity

bool TCS::Connector::m_hasAmbiguity
protected

Definition at line 113 of file Connector.h.

◆ m_hasInputOverflow

bool TCS::Connector::m_hasInputOverflow
protected

whether the input data came with an overflow bit

Definition at line 111 of file Connector.h.

◆ m_inputConnectors

std::vector<TCS::Connector*> TCS::Connector::m_inputConnectors
protected

Definition at line 98 of file Connector.h.

◆ m_inputNames

std::vector<std::string> TCS::Connector::m_inputNames
protected

Definition at line 94 of file Connector.h.

◆ m_isExecuted

bool TCS::Connector::m_isExecuted {false}
protected

Definition at line 105 of file Connector.h.

◆ m_name

std::string TCS::Connector::m_name {""}
protected

Definition at line 92 of file Connector.h.

◆ m_outputNames

std::vector<std::string> TCS::Connector::m_outputNames
protected

Definition at line 95 of file Connector.h.


The documentation for this class was generated from the following files:
TCS::StatusCode::SUCCESS
@ SUCCESS
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:17
TCS::Connector::m_executionStatusCode
StatusCode m_executionStatusCode
Definition: Connector.h:107
SGout2dot.alg
alg
Definition: SGout2dot.py:243
TCS::Connector::m_inputConnectors
std::vector< TCS::Connector * > m_inputConnectors
Definition: Connector.h:98
TCS::Connector::m_algorithm
TCS::ConfigurableAlg * m_algorithm
the algorithm that belongs to this connector
Definition: Connector.h:102
TCS::Connector::m_hasAmbiguity
bool m_hasAmbiguity
Definition: Connector.h:113
athena.value
value
Definition: athena.py:124
TCS::Connector::COUNT
@ COUNT
Definition: Connector.h:25
TCS::Connector::m_name
std::string m_name
Definition: Connector.h:92
TCS::Connector::INPUT
@ INPUT
Definition: Connector.h:25
dumpTruth.statusCode
statusCode
Definition: dumpTruth.py:85
postInclude.inputs
inputs
Definition: postInclude.SortInput.py:15
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
TCS::DecisionAlg
Definition: Trigger/TrigT1/L1Topo/L1TopoInterfaces/L1TopoInterfaces/DecisionAlg.h:22
TCS::Connector::m_algorithmName
std::string m_algorithmName
Definition: Connector.h:93
TCS::Connector::m_conntype
ConnectorType m_conntype
Definition: Connector.h:117
TCS::ConfigurableAlg::reset
StatusCode reset()
Definition: ConfigurableAlg.h:58
TCS::Connector::isExecuted
bool isExecuted() const
Definition: Connector.h:59
python.CreateTierZeroArgdict.outputs
outputs
Definition: CreateTierZeroArgdict.py:189
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::Connector::m_outputNames
std::vector< std::string > m_outputNames
Definition: Connector.h:95
TCS::Connector::m_inputNames
std::vector< std::string > m_inputNames
Definition: Connector.h:94
TCS::Connector::DECISION
@ DECISION
Definition: Connector.h:25
TCS::Connector::SORT
@ SORT
Definition: Connector.h:25
TCS::Connector::m_isExecuted
bool m_isExecuted
Definition: Connector.h:105
TCS::Connector::isDecisionConnector
bool isDecisionConnector() const
Definition: Connector.h:41
TCS::Connector::NONE
@ NONE
Definition: Connector.h:25
TCS::Connector::clearOutput
virtual StatusCode clearOutput()=0
TCS::Connector::m_hasInputOverflow
bool m_hasInputOverflow
whether the input data came with an overflow bit
Definition: Connector.h:111
TCS::StatusCode
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:15