ATLAS Offline Software
Loading...
Searching...
No Matches
Connector.cxx
Go to the documentation of this file.
1// Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
4
9
13
14using namespace std;
15using namespace TCS;
16
17TCS::Connector::Connector( const std::string & name,
18 const std::vector<std::string> & inputs,
19 const std::string & algorithm,
20 const std::vector<std::string> & outputs,
21 ConnectorType conntype ) :
22 m_name(name),
24 m_inputNames(inputs),
25 m_outputNames(outputs),
26 m_conntype(conntype)
27{}
28
29
30
31TCS::Connector::Connector( const std::string & name,
32 ConnectorType conntype ) :
33 m_name(name),
34 m_conntype(conntype)
35{}
36
37
39
40
41void
42TCS::Connector::setAlgorithm(TCS::ConfigurableAlg* alg) { // alg ownership is with the factory
43 m_algorithm = alg;
44}
45
46
50
51 // clear the output data
52 //coverity[USELESS_CALL:FALSE]
53 sc &= clearOutput();
54 m_hasInputOverflow = false;
55 m_hasAmbiguity = false;
56
57 // reset the algorithm
58 if(m_algorithm)
59 //coverity[USELESS_CALL:FALSE]
60 sc &= m_algorithm->reset();
61
62 // reset the execution flags
63 m_isExecuted = false;
65
66 return sc;
67}
68
69unsigned int
72 return (static_cast<const DecisionAlg*>(algorithm()))->numberOutputBits();
73 } else {
74 return 0;
75 }
76}
77
79{
80 m_hasInputOverflow = value;
81}
82
83void TCS::Connector::toggleAmbiguity(const bool value)
84{
85 m_hasAmbiguity = value;
86}
87
88ostream &
89operator<<(ostream &o, const TCS::Connector & conn) {
90 try {
91 o << dynamic_cast<const TCS::DecisionConnector&>(conn);
92 return o;
93 } catch(...) {}
94 try {
95 o << dynamic_cast<const TCS::SortingConnector&>(conn);
96 return o;
97 } catch(...) {}
98 try {
99 o << dynamic_cast<const TCS::InputConnector&>(conn);
100 return o;
101 } catch(...) {}
102
103 return o;
104}
static Double_t sc
StatusCode reset()
Definition Connector.cxx:48
std::string m_algorithmName
Definition Connector.h:93
void toggleInputOverflow(const bool value)
to be toggled after 'attachOutputData' is called.
Definition Connector.cxx:78
std::string m_name
Definition Connector.h:92
virtual StatusCode clearOutput()=0
Connector(const std::string &name, ConnectorType conntype)
Definition Connector.cxx:31
StatusCode m_executionStatusCode
Definition Connector.h:107
void toggleAmbiguity(const bool value)
Definition Connector.cxx:83
bool isDecisionConnector() const
Definition Connector.h:41
unsigned int numberOutputBits() const
Definition Connector.cxx:70
ConnectorType m_conntype
Definition Connector.h:117
bool m_hasAmbiguity
Definition Connector.h:113
bool m_hasInputOverflow
whether the input data came with an overflow bit
Definition Connector.h:111
std::vector< std::string > m_inputNames
Definition Connector.h:94
const std::string & name() const
Definition Connector.h:44
virtual void setAlgorithm(TCS::ConfigurableAlg *)
Definition Connector.cxx:42
const TCS::ConfigurableAlg * algorithm() const
Definition Connector.h:50
virtual ~Connector()
Definition Connector.cxx:38
std::vector< std::string > m_outputNames
Definition Connector.h:95
TCS::ConfigurableAlg * m_algorithm
the algorithm that belongs to this connector
Definition Connector.h:102
std::string algorithm
Definition hcg.cxx:85
std::ostream & operator<<(std::ostream &os, const TCS::Bin &bin)
STL namespace.