|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
   38 TopoSteering::TopoSteering() :
 
   48   sc &= m_simulationResult.setupFromMenu( m_structure.outputConnectors(), m_structure.countConnectors() );
 
   93       TCS_EXCEPTION(
"L1Topo Steering has not been configured, can't run")
 
  126       TRG_MSG_WARNING(
"saveHist called without an L1TopoHistSvc being available");
 
  140       TRG_MSG_INFO(
"L1Topo Steering has not been configured, can't run");
 
  141       TCS_EXCEPTION(
"L1Topo Steering has not been configured, can't run");
 
  152       TRG_MSG_INFO(
"result of trigger line " << 
name << 
" : " << pConnector->decision().decision());
 
  173       TCS_EXCEPTION(
"TopoSteering has not been configured, can't run");
 
  197    if(
conn->isExecuted())
 
  198       return conn->executionStatusCode();
 
  202    if(
conn->isInputConnector()) {
 
  205    } 
else if(
conn->isSortingConnector()) {
 
  208    } 
else if(
conn->isDecisionConnector()){
 
  211    } 
else if(
conn->isCountingConnector()){
 
  215    conn->setIsExecuted(
true);
 
  216    conn->setExecutionStatusCode(
sc);
 
  236    conn->attachOutputData( inputData );
 
  237    conn->toggleInputOverflow(hasInputOverflow);
 
  239    TRG_MSG_DEBUG(
"  ... executing input connector '" << 
conn->name() << 
"' -> attaching '" << inputData->
name() << 
"' of size " << inputData->
size());
 
  258       conn->toggleInputOverflow(
conn->hasInputOverflow() ||
 
  259                                 inputConn->hasInputOverflow());
 
  269    TRG_MSG_DEBUG(
"  ... executing sorting connector '" << 
conn->name() << 
"' -> attaching '" << sortedOutput->
name() << 
"' of size " << sortedOutput->
size());
 
  271    conn->attachOutputData(sortedOutput);
 
  290       conn->toggleInputOverflow(
conn->hasInputOverflow() ||
 
  291                                 inputConn->hasInputOverflow());
 
  292       conn->toggleAmbiguity(
conn->hasAmbiguity() ||
 
  293                                 inputConn->hasAmbiguity());
 
  301    vector<TOBArray *> output( 
alg->numberOutputBits() );
 
  303    for(
unsigned int i=0; 
i<
alg->numberOutputBits(); ++
i) {
 
  305       output[
i]->setAmbiguityFlag(
conn->hasAmbiguity());
 
  310    TRG_MSG_DEBUG(
"  ... executing decision connector '" << 
conn->name() << 
"' -> attaching output data:");
 
  311    for(
TOBArray const * outarr : output) {
 
  312       TRG_MSG_DEBUG(
"           data '" << outarr->name() << 
"' of size " << outarr->size());
 
  313       conn->toggleAmbiguity(
conn->hasAmbiguity() || outarr->ambiguityFlag());
 
  316    conn->attachOutputData(output);
 
  318    conn->setIsExecuted(
true);
 
  319    conn->setExecutionStatusCode(
sc);
 
  320    bool sortOverflow = 
false;
 
  323        if(inputConnector->isSortingConnector()) {
 
  325            sortOverflow = sortConn->sortingAlgorithm()->overflow();
 
  326            if (sortOverflow) 
break;
 
  330    conn->m_decision.setOverflow(
conn->hasInputOverflow() || sortOverflow);
 
  331    conn->m_decision.setAmbiguity(
conn->hasAmbiguity());
 
  348       conn->toggleInputOverflow(
conn->hasInputOverflow() ||
 
  349                                 inputConn->hasInputOverflow());
 
  358    conn->setIsExecuted(
true);
 
  359    conn->setExecutionStatusCode(
sc);
 
  379    else alg->sort(*input, *sortedOutput);
 
  388                                        const std::vector<Connector*> & inputConnectors,
 
  389                                        const std::vector<TCS::TOBArray *> & output,
 
  395    if(inputConnectors.size()<1) {
 
  396       TCS_EXCEPTION(
"L1Topo Steering: Decision algorithm expects at least 1 input array but got 0");
 
  399    std::vector<TCS::TOBArray const *> input;  
 
  400    for(
const Connector* inConn: inputConnectors)
 
  402       if (inConn == 
nullptr) 
continue;
 
  405      TCS_EXCEPTION(
"L1Topo Steering: Decision algorithm " << 
alg->name() << 
" could not cast as SortingConnector* the input connector " << inConn->name());
 
  410           TCS_EXCEPTION(
"L1Topo Steering: Decision algorithm " << 
alg->name() << 
" expects TOBArray(s) as input, but did not get it from connector " << (inConn ? inConn->name() : 
""));
 
  412         input.push_back( tobA );
 
  420    else alg->process( input, output, decision );
 
  432    TRG_MSG_DEBUG(
"  ... executing multiplicity alg '" <<
alg->fullname() << 
"'");
 
  458    o << 
"==========================\n"  
  459      << 
"TopoSteering configuration\n"  
  460      << 
"--------------------------\n";
 
  462    o << 
"==========================" << endl;
 
  484       if(
alg==
nullptr) 
continue;
 
  485       alg->msg().setLevel(lvl);
 
  492                               const std::bitset<numberOfL1TopoBits> &ovrflowBits){
 
  500         outCon->decisionAlgorithm()->resetHardwareBits();
 
  501         unsigned int pos = 0; 
 
  503         unsigned int bitNumber = trigger.flatindex();
 
  504             outCon->decisionAlgorithm()->setHardwareBits(
pos,
 
  508             TRG_MSG_DEBUG(
"propagating hardware bit (dec/ovr) "<<bitNumber
 
  509                           <<
" to algo "<<connectorName<<
"["<<
pos<<
"]" 
  521            outCon->decisionAlgorithm()->setFillHistosBasedOnHardware(
value);
 
  523            TRG_MSG_DEBUG(
"skipping invalid DecisionConnector '"<<connectorName<<
"'");
 
  532            outCon->decisionAlgorithm()->setSkipHistos(
value);
 
  534            TRG_MSG_DEBUG(
"skipping invalid DecisionConnector '"<<connectorName<<
"'");
 
  
void setHardwareBits(const std::bitset< numberOfL1TopoBits > &triggerBits, const std::bitset< numberOfL1TopoBits > &ovrflowBits)
cache the decision/overflow bits from hardware These bits are propagated to the algorithms with propa...
static const Heap< TCS::JetTOB > & heap()
const std::vector< TCS::Connector * > & connectors() const
std::bitset< numberOfL1TopoBits > m_ovrflowHdwBits
StatusCode executeDecisionAlgorithm(TCS::DecisionAlg *alg, const std::vector< Connector * > &inputConnectors, const std::vector< TCS::TOBArray * > &output, Decision &decsion)
static const Heap< TCS::MuonTOB > & heap()
const std::map< std::string, TCS::CountingConnector * > & countConnectors() const
DecisionConnector * outputConnector(const std::string &output)
bool ambiguityFlag() const
void setOutputAlgosFillBasedOnHardware(const bool &value)
tell output algos to fill accept/reject histos based on hdw decision.
StatusCode executeInputConnector(TCS::InputConnector *conn)
const TopoSteeringStructure & structure() const
StatusCode executeSortingConnector(TCS::SortingConnector *conn)
void propagateHardwareBitsToAlgos()
propagate the bits from hardware to each simulated decision algo.
void printConfiguration(std::ostream &o) const
std::bitset< numberOfL1TopoBits > m_triggerHdwBits
static const Heap< TCS::eEmTOB > & heap()
const std::string & name() const
const std::map< std::string, TCS::DecisionConnector * > & outputConnectors() const
void setAlgMsgLevel(TrigConf::MSGTC::Level lvl)
TopoInputEvent & inputEvent()
void setMsgLevel(TrigConf::MSGTC::Level lvl)
Forward iterator to traverse the main components of the trigger configuration.
TrigConf::MSGTC::Level m_AlgMsgLvl
a TriggerLine entry describes the location of a threshold multiplicity on a cable (connector)
const GlobalOutput & globalOutput() const
static const Heap< TCS::LateMuonTOB > & heap()
StatusCode executeCountingAlgorithm(TCS::CountingAlg *alg, TCS::InputConnector *inputConnector, Count &count)
std::shared_ptr< IL1TopoHistSvc > m_histSvc
MsgStreamTC & msg() const
The standard message stream.
StatusCode executeConnector(TCS::Connector *conn)
StatusCode executeCountingConnector(TCS::CountingConnector *conn)
void setMsgLevel(TrigConf::MSGTC::Level lvl)
StatusCode executeEvent()
StatusCode executeSortingAlgorithm(SortingAlg *alg, TCS::InputConnector *inputConnector, TOBArray *&output)
#define TCS_EXCEPTION(MSG)
StatusCode initializeAlgorithms()
static const Heap< TCS::ClusterTOB > & heap()
StatusCode collectResult(TCS::DecisionConnector *outputConn=nullptr, TCS::CountingConnector *countConn=nullptr)
#define TRG_MSG_WARNING(x)
static const Heap< TCS::CompositeTOB > & heap()
TopoCoreSimResult m_simulationResult
Class to provide easy access to TrigConf::MsgStream for TrigConf classes.
TopoSteeringStructure m_structure
static const Heap< TCS::GenericTOB > & heap()
StatusCode executeDecisionConnector(TCS::DecisionConnector *conn)
void setLevel(MSGTC::Level lvl)
Set message level of stream.
StatusCode executeTrigger(const std::string &triggerName)
void setOutputAlgosSkipHistograms(const bool &value)
skip filling the histos
StatusCode setHistSvc(std::shared_ptr< IL1TopoHistSvc > histSvc)
enables the histogramming service
void print(std::ostream &o) const
static const Heap< TCS::jJetTOB > & heap()
unsigned int m_evtCounter
TCS::StatusCode TopoSteering::setupFromConfiguration ATLAS_NOT_THREAD_SAFE(const TrigConf::L1Menu &l1menu)