ATLAS Offline Software
Classes | Typedefs | Enumerations | Functions
GlobalSim Namespace Reference

Classes

class  Alg_gsCounting
 
class  Alg_gsDecision
 
class  Alg_gsInput
 
class  Alg_gsRoot
 
class  Alg_gsSorting
 
struct  AlgData
 
class  AlgDataFetcher
 
class  AlgRegister
 
class  DataRepository
 
class  DepthFirstOrder
 
class  Digraph
 
class  DirectedCycle
 
class  DirectedDFS
 
class  GEPBoard
 
class  GlobalData
 
class  GlobalL1TopoSimulation
 
class  GlobalSystem
 
class  GlobalTopoHistSvc
 
class  IAlgDataFetcher
 
class  IDataRepositoryVisitor
 
class  IGlobalAlg
 
class  IGSAlg
 
class  SimpleRepositoryDumper
 
class  Topological
 
struct  Tracer
 

Typedefs

using StringMap = std::map< std::string, std::vector< std::string > >
 
using L1AlgVec = std::vector< const TrigConf::L1TopoAlgorithm * >
 
using ADP = std::shared_ptr< AlgData >
 
using GSInputTOBArray = GlobalData< const TCS::InputTOBArray * >
 
using GSTOBArray = GlobalData< TCS::TOBArray >
 
using GSTOBArrayPtrVec = GlobalData< std::vector< TCS::TOBArray * > >
 
using GSCount = GlobalData< TCS::Count >
 
using GSDecision = GlobalData< TCS::Decision >
 

Enumerations

enum  AlgDataDesc {
  AlgDataDesc::notSet, AlgDataDesc::decision, AlgDataDesc::sort, AlgDataDesc::count,
  AlgDataDesc::input, AlgDataDesc::root
}
 

Functions

void algGraphOut (const Digraph &G, const std::string &name_stub)
 
std::pair< std::optional< std::shared_ptr< IAlgDataFetcher > >, std::vector< std::string > > makeAlgDataFetcher (bool do_eConn, bool do_oConn, const TrigConf::L1Menu *menu)
 
template<typename T >
std::size_t get_tuple_size (T)
 
template<std::size_t Index, typename Tuple , typename Functor >
auto tuple_at (const Tuple &tpl, const Functor &func) -> void
 
template<typename Tuple , typename Functor , std::size_t Index = 0>
auto tuple_for_each (const Tuple &tpl, const Functor &f) -> void
 
std::ostream & operator<< (std::ostream &os, const DataRepository &ds)
 
std::ostream & operator<< (std::ostream &os, const Digraph &G)
 
void dot (const Digraph &G, const std::string &fn)
 
void dot (const std::unique_ptr< Digraph > &G, const std::string &fn)
 
std::vector< const TrigConf::L1Board * > get_boards_ (const TrigConf::L1Menu *)
 
std::vector< const TrigConf::L1TopoAlgorithm * > confAlgs_ (const TrigConf::L1Menu *, bool decisionAlgs)
 
void addAlgorithmsToFactory (const std::vector< const TrigConf::L1TopoAlgorithm * > &)
 
void initialiseNonCountingAlgorithms (const std::vector< const TrigConf::L1TopoAlgorithm * > &, std::shared_ptr< IL1TopoHistSvc >)
 
void initialiseCountingAlgorithms ATLAS_NOT_THREAD_SAFE (const std::vector< const TrigConf::L1TopoAlgorithm * > &, const TrigConf::L1Menu *, std::shared_ptr< IL1TopoHistSvc > histSvc)
 
std::vector< const TrigConf::L1Connector * > conf_connectors_ (const TrigConf::L1Menu *, const TrigConf::L1Board *)
 
template<typename Iter >
std::vector< const TrigConf::L1TopoAlgorithm * > unique_conf_decision_algs_ (Iter begin, Iter end, const TrigConf::L1Menu *)
 
std::vector< const TrigConf::L1TopoAlgorithm * > unique_conf_sorting_algs_ (const std::vector< const TrigConf::L1TopoAlgorithm * > &, const TrigConf::L1Menu *)
 
template<typename Iter >
std::vector< const TrigConf::L1TopoAlgorithm * > unique_conf_counting_algs_ (Iter begin, Iter end, const TrigConf::L1Menu *)
 
uint32_t interpretGenericParam (const std::string &)
 
StatusCode GlobalL1TopoSimulation::initialize ATLAS_NOT_THREAD_SAFE ()
 

Typedef Documentation

◆ ADP

typedef std::shared_ptr< AlgData > GlobalSim::ADP

Definition at line 56 of file GlobalL1TopoSimulation.h.

◆ GSCount

Definition at line 22 of file GlobalSimDefs.h.

◆ GSDecision

Definition at line 23 of file GlobalSimDefs.h.

◆ GSInputTOBArray

Definition at line 19 of file GlobalSimDefs.h.

◆ GSTOBArray

Definition at line 20 of file GlobalSimDefs.h.

◆ GSTOBArrayPtrVec

using GlobalSim::GSTOBArrayPtrVec = typedef GlobalData<std::vector<TCS::TOBArray*> >

Definition at line 21 of file GlobalSimDefs.h.

◆ L1AlgVec

using GlobalSim::L1AlgVec = typedef std::vector<const TrigConf::L1TopoAlgorithm*>

Definition at line 55 of file GlobalL1TopoSimulation.h.

◆ StringMap

using GlobalSim::StringMap = typedef std::map<std::string, std::vector<std::string> >

Definition at line 100 of file GlobalL1TopoSimulation.cxx.

Enumeration Type Documentation

◆ AlgDataDesc

Enumerator
notSet 
decision 
sort 
count 
input 
root 

Definition at line 18 of file AlgData.h.

Function Documentation

◆ addAlgorithmsToFactory()

void GlobalSim::addAlgorithmsToFactory ( const std::vector< const TrigConf::L1TopoAlgorithm * > &  conf_algs)

Definition at line 507 of file GlobalL1TopoSimulation.cxx.

507  {
508 
509  auto createAlg = [](const auto& c_alg){
510  auto alg = TCS::AlgFactory::mutable_instance().algorithm(c_alg->name());
511  if(!alg){
512  auto classname = c_alg->klass();
513  // in sim, use the same multiplicity algo
514  // for fixed and variable thresholds
515  if(classname=="eEmVarMultiplicity") {classname="eEmMultiplicity";}
516 
517  alg = TCS::AlgFactory::mutable_instance().create(classname,
518  c_alg->name());
519  if(!alg){
520  std::stringstream msg;
521  msg << "instantiateAlgorithms failed to create L1TopoAlg "
522  << " name " << c_alg->name()
523  << " klass " << c_alg->klass();
524  throw std::runtime_error(msg.str());
525  }
526  }
527  };
528 
529  std::for_each(conf_algs.cbegin(),
530  conf_algs.cend(),
531  createAlg);
532 
533  }

◆ algGraphOut()

void GlobalSim::algGraphOut ( const Digraph G,
const std::string &  name_stub 
)

Definition at line 21 of file AlgDataFetcher.cxx.

22  {
23  dot(G, name_stub + ".dot");
24  std::ofstream g_stream(name_stub+".txt", std::ios_base::out);
25  g_stream << G << '\n';
26  }

◆ ATLAS_NOT_THREAD_SAFE() [1/2]

StatusCode GlobalL1TopoSimulation::initialize GlobalSim::ATLAS_NOT_THREAD_SAFE ( )

Definition at line 102 of file GlobalL1TopoSimulation.cxx.

102  {
103 
104  ATH_MSG_DEBUG("initialising");
105 
106  if (!(m_doEConns or m_doOConns)) {
107  ATH_MSG_ERROR ("No Algorithms requested");
108  return StatusCode::FAILURE;
109  }
110 
111 
112  /*
113  * Set up a graph based set of calls to L1Topo Algorithms.
114  *
115  * connectorGraph() uses the
116  * hardware entity objects from the menu to find the Algorithms
117  * to use, and build a graph
118  * from the connectors (each connector has a single Algorithm).
119  *
120  */
121 
122  /*
123  * Retrieve the L1menu. This will be used to
124  * - build the call graph bsed on TrigConf::Connectors.
125  * - instantiate and initialise the TCS::Algorithms held in the global
126  * AlgFactory,
127  */
128 
129  const TrigConf::L1Menu* l1menu;
131 
132 
133  // The hist svc is used by the L1Topo Algotihms, so initialise
134  // this before Alg instaniation
135  m_topoHistSvc =
136  std::shared_ptr<IL1TopoHistSvc>(new GlobalTopoHistSvc);
137 
138  /*
139  * add TCS Algorithm instances to AlgFactory. Initialise
140  * the TCS Algorithms from conf Algoritithms
141  */
142 
143  const bool& dec_algs = true;
144 
145  auto decisionConfAlgs = confAlgs_(l1menu, dec_algs);
146  auto sortingConfAlgs = unique_conf_sorting_algs_(decisionConfAlgs,
147  l1menu);
148  auto countingConfAlgs = confAlgs_(l1menu, !dec_algs);
149 
150  // Instantiate and initialise TCS Algorithms
151 
152  if (m_doEConns) {
153  addAlgorithmsToFactory(decisionConfAlgs); // add TCS alg to AlgFactory
154  addAlgorithmsToFactory(sortingConfAlgs); // add TCS alg to AlgFactory
155  initialiseNonCountingAlgorithms(decisionConfAlgs,
156  m_topoHistSvc);
157  initialiseNonCountingAlgorithms(sortingConfAlgs,
158  m_topoHistSvc);
159  }
160 
161  if (m_doOConns) {
162  addAlgorithmsToFactory(countingConfAlgs); // add TCS alg to AlgFactory
163  initialiseCountingAlgorithms(countingConfAlgs,
164  l1menu,
165  m_topoHistSvc);
166  }
167 
168  /*
169  * Obtain information used to build the call digraph
170  * Need the connectors In the L1TopoSimulation package
171  * Decision, Sorting and Counting connectors each
172  * contain a single Algorithm. All Connectors, except for Input
173  * Connectors, know (as strings) their input connectors:
174  *
175  * DecisionConnector <- Sorting Connector
176  * SortingConnector <- InputConnector
177  * CountingConnector <- InputConnectors.
178  *
179  * In GlobalSim, we are interested in the TCS Algorithms. Further,
180  * we add the notion of InputAlgorithm (these are Algorithms
181  * which extract data from the TopoInputEvent, and write it
182  * to the DataRepository.
183  */
184 
185  ATH_MSG_DEBUG("obtaining AlgData");
186 
187 
188  auto optAlgDataFetcherPair = makeAlgDataFetcher(m_doEConns,
189  m_doOConns,
190  l1menu);
191  if (!(optAlgDataFetcherPair.first).has_value()){
192  ATH_MSG_ERROR("invalid algDataFetcher");
193  for (const auto& msg : optAlgDataFetcherPair.second) {
195  }
196  return StatusCode::FAILURE;
197  }
198  auto algDataFetcher = *(optAlgDataFetcherPair.first);
199 
200  CHECK(addGSAlgorithms(algDataFetcher->execOrderedAlgData()));
201 
202 
203  /*
204  * Allow inputs from the Event Store
205  */
206 
207  ATH_MSG_DEBUG("retrieving " << m_jetInputProvider);
208  CHECK( m_jetInputProvider.retrieve() );
209 
210  ATH_MSG_DEBUG("retrieving " << m_emtauInputProvider);
211  CHECK( m_emtauInputProvider.retrieve() );
212 
213  ATH_MSG_DEBUG("retrieving " << m_energyInputProvider);
214  CHECK( m_energyInputProvider.retrieve() );
215 
216 
217  /* 26/09/2023 - with asetup Athena, main -> detstore error
218 
219  ATH_MSG_DEBUG("retrieving " << m_muonInputProvider);
220  constexpr auto no_legacy = DisableTool(false);
221  CHECK( m_muonInputProvider.retrieve(DisableTool{no_legacy}));
222 
223  */
224 
225 
226  return StatusCode::SUCCESS;
227 
228  }

◆ ATLAS_NOT_THREAD_SAFE() [2/2]

void initialiseCountingAlgorithms GlobalSim::ATLAS_NOT_THREAD_SAFE ( const std::vector< const TrigConf::L1TopoAlgorithm * > &  conf_algs,
const TrigConf::L1Menu l1menu,
std::shared_ptr< IL1TopoHistSvc histSvc 
)

Definition at line 583 of file GlobalL1TopoSimulation.cxx.

586  {
587 
588  auto setAlgParametersAndInit =
589  [&l1menu, &histSvc](const auto& c_alg) {
590 
592  TCS::AlgFactory::mutable_instance().algorithm(c_alg->name());
593  if(!alg) {
594  throw std::runtime_error("Unable to retrieve TCS::Alg " +
595  c_alg->name());
596  }
597 
598  const auto& l1thr = l1menu->threshold(c_alg->outputs().at(0));
599  auto* pca = dynamic_cast<TCS::CountingAlg*>(alg);
600  if (!pca){
601  throw std::runtime_error("Error down casting to CountingAlg");
602  }
603 
604  pca->setThreshold(l1thr);
605  alg->setL1TopoHistSvc(histSvc);
606  pca->initialize();
607  };
608 
609  std::for_each(conf_algs.cbegin(), conf_algs.cend(),
610  setAlgParametersAndInit);
611  }

◆ conf_connectors_()

std::vector< const TrigConf::L1Connector * > GlobalSim::conf_connectors_ ( const TrigConf::L1Menu menu,
const TrigConf::L1Board board 
)

Definition at line 492 of file GlobalL1TopoSimulation.cxx.

493  {
494 
495  std::vector<const TrigConf::L1Connector*> connectors;
496  const auto& connectorNames = board->connectorNames();
497  std::transform(connectorNames.cbegin(),
498  connectorNames.cend(),
499  std::back_inserter(connectors),
500  [&menu](const auto& name) {
501  return &(menu->connector(name));});
502  return connectors;
503  }

◆ confAlgs_()

std::vector< const TrigConf::L1TopoAlgorithm * > GlobalSim::confAlgs_ ( const TrigConf::L1Menu l1menu,
bool  decisionAlgs 
)

Definition at line 653 of file GlobalL1TopoSimulation.cxx.

653  {
654 
655  /* find the Decision or Counting Configuration Algorithms:
656  * boards->connectors->algs.
657  * the boolean flag determines whether Decision or Counting algs
658  * are returned.
659  */
660 
661  auto boards = get_boards_(l1menu);
662 
663  std::vector<const TrigConf::L1Connector*> pConnectors;
664 
665  /*
666  * obtain the conf connectors the L1 topo boards know about.
667  */
668 
669  for (const auto& pboard : boards) {
670  auto connectors = conf_connectors_(l1menu, pboard);
671  pConnectors.insert(pConnectors.end(),
672  connectors.begin(),
673  connectors.end());
674  }
675 
676  auto econn_end =
677  std::partition(pConnectors.begin(),
678  pConnectors.end(),
679  [](const auto& pcon) {
680  return pcon->connectorType() ==
681  TrigConf::L1Connector::ConnectorType::ELECTRICAL;});
682 
683  if (decisionAlgs) {
684  return unique_conf_decision_algs_(pConnectors.begin(),
685  econn_end,
686  l1menu);
687  } else {
688  return unique_conf_counting_algs_(econn_end,
689  pConnectors.end(),
690  l1menu);
691  }
692  }

◆ dot() [1/2]

void GlobalSim::dot ( const Digraph G,
const std::string &  fn 
)

Definition at line 10 of file dot.cxx.

10  {
11  std::ofstream ofs (fn, std::ofstream::out);
12  std::size_t V = G.V();
13 
14  ofs << "digraph G{\n";
15  ofs << "layout=twopi ranksep=3 ratio=auto\n";
16 
17  for (std::size_t v = 0; v != V; ++v) {
18  for (const auto& w : G.adj(v)) {
19  ofs << v << "->" << w << '\n';
20  }
21  }
22  ofs << "}\n";
23  }

◆ dot() [2/2]

void GlobalSim::dot ( const std::unique_ptr< Digraph > &  G,
const std::string &  fn 
)

Definition at line 25 of file dot.cxx.

25  {
26  dot(*G, fn);
27  }

◆ get_boards_()

std::vector< const TrigConf::L1Board * > GlobalSim::get_boards_ ( const TrigConf::L1Menu l1menu)

Definition at line 476 of file GlobalL1TopoSimulation.cxx.

476  {
477  std::vector<const TrigConf::L1Board*> boards;
478  for (const std::string & boardName : l1menu->boardNames() ){
479 
480  auto & l1board = l1menu->board(boardName);
481 
482  if (l1board.type() != "TOPO") continue;
483  if (l1board.legacy()) continue;
484  boards.push_back(&l1board); // l1board is a reference
485  }
486 
487  return boards;
488 
489  }

◆ get_tuple_size()

template<typename T >
std::size_t GlobalSim::get_tuple_size ( )

Definition at line 11 of file DataRepository.cxx.

11  {
12  return std::tuple_size<T>();
13  };

◆ initialiseNonCountingAlgorithms()

void GlobalSim::initialiseNonCountingAlgorithms ( const std::vector< const TrigConf::L1TopoAlgorithm * > &  conf_algs,
std::shared_ptr< IL1TopoHistSvc histSvc 
)

Definition at line 536 of file GlobalL1TopoSimulation.cxx.

537  {
538 
539  auto setAlgParametersAndInit = [&histSvc](const auto& c_alg) {
540 
542  TCS::AlgFactory::mutable_instance().algorithm(c_alg->name());
543  if(!alg) {
544  throw std::runtime_error("Unable to retrieve TCS::Alg " +
545  c_alg->name());
546  }
547 
548  auto ps = TCS::ParameterSpace(alg->name());
549  for (const auto& pe : c_alg->parameters()) {
550  ps.addParameter(pe.name(), pe.value(), pe.selection());
551  }
552 
553  for (const auto& pname : c_alg->generics().getKeys()) {
554  const auto& pe = c_alg->generics().getObject(pname);
555  uint32_t val = interpretGenericParam(pe.getAttribute("value"));
556 
557  if (pname == "NumResultBits") {
558  auto sz = c_alg->outputs().size();
559  if(val != sz) {
560  std::stringstream ss;
561  ss << "Algorithm <" << pname << "parameter OutputBits ("
562  << val << ") != output size ("
563  << sz << ")";
564  throw std::runtime_error(ss.str());
565  }
566  // parameter is not added as is defined through the output list
567  continue;
568  }
569  ps.addParameter(pname, val);
570  }
571 
572  alg->setParameters(ps);
573  alg->setLegacyMode(false);
574  alg->setL1TopoHistSvc(histSvc);
575  alg->initialize();
576  };
577 
578  std::for_each(conf_algs.cbegin(),
579  conf_algs.cend(),
580  setAlgParametersAndInit);
581  }

◆ interpretGenericParam()

uint32_t GlobalSim::interpretGenericParam ( const std::string &  parvalue)

Definition at line 613 of file GlobalL1TopoSimulation.cxx.

613  {
614  uint32_t val;
615  try {
616  val = boost::lexical_cast<uint32_t, std::string>(parvalue);
617  }
618  catch(const boost::bad_lexical_cast & bc) {
619  if( parvalue.size()>=3 && parvalue[0]==':'
620  and parvalue[parvalue.size()-1]==':' ) {
621 
622  auto x =
623  TCS::L1TopoHWParameters::get().find(parvalue.substr(1,parvalue.size()-2));
624 
625  std::string parname = parvalue.substr(1,parvalue.size()-2);
626 
627  if( x != TCS::L1TopoHWParameters::get().end()) {
628  val = x->second.value;
629  } else {
630  std::stringstream ss;
631  ss <<"Generic parameter value "
632  << parvalue
633  << " has the hardware contrained parameter format, but '"
634  << parname
635  << "' is not listed in L1TopoHardware.cxx";
636 
637  throw std::runtime_error(ss.str());
638  }
639  } else {
640  std::stringstream ss;
641  ss << "Generic parameter value "
642  << parvalue
643  << " is not a uint32_t and does not match the hardware "
644  << " contrained parameter specification ':<parname>:' ";
645  throw std::runtime_error(ss.str());
646  }
647  }
648  return val;
649  }

◆ makeAlgDataFetcher()

std::pair< std::optional< std::shared_ptr< IAlgDataFetcher > >, std::vector< std::string > > GlobalSim::makeAlgDataFetcher ( bool  do_eConn,
bool  do_oConn,
const TrigConf::L1Menu menu 
)

Definition at line 7 of file AlgDataFetcherFactory.cxx.

9  {
10  auto adf = std::shared_ptr<IAlgDataFetcher>(nullptr);
11  adf.reset(new AlgDataFetcher(do_eConn, do_oConn, menu));
12 
13  return adf->isValid() ?
14  std::pair(std::make_optional(adf), std::vector<std::string>()) :
15  std::pair(std::optional<std::shared_ptr<IAlgDataFetcher>> (),
16  adf->errMsgs());
17 
18  }

◆ operator<<() [1/2]

std::ostream& GlobalSim::operator<< ( std::ostream &  os,
const DataRepository ds 
)

Definition at line 74 of file DataRepository.cxx.

74  {
75  return ds.print(os);
76  }

◆ operator<<() [2/2]

std::ostream & GlobalSim::operator<< ( std::ostream &  os,
const Digraph G 
)

Definition at line 66 of file Digraph.cxx.

66  {
67  os << "Digraph V: " << G.V() << " E: " << G.E() << " adj \n";
68  for (std::size_t v = 0; v != G.V(); ++v) {
69  os << v << ": ";
70  for (const auto& w : G.adj(v)){
71  os << w << " ";
72  }
73  os << '\n';
74  }
75  return os;
76  }

◆ tuple_at()

template<std::size_t Index, typename Tuple , typename Functor >
auto GlobalSim::tuple_at ( const Tuple tpl,
const Functor &  func 
) -> void

Definition at line 28 of file DataRepository.cxx.

28  {
29  const auto& v = std::get<Index>(tpl);
30  func(v);
31  }

◆ tuple_for_each()

template<typename Tuple , typename Functor , std::size_t Index = 0>
auto GlobalSim::tuple_for_each ( const Tuple tpl,
const Functor &  f 
) -> void

Definition at line 34 of file DataRepository.cxx.

34  {
35  constexpr auto tuple_size = std::tuple_size_v<Tuple>;
36  if constexpr(Index < tuple_size) {
37  tuple_at<Index>(tpl, f);
38  tuple_for_each<Tuple, Functor, Index+1> (tpl, f);
39  }
40  }

◆ unique_conf_counting_algs_()

template<typename Iter >
std::vector< const TrigConf::L1TopoAlgorithm * > GlobalSim::unique_conf_counting_algs_ ( Iter  begin,
Iter  end,
const TrigConf::L1Menu l1menu 
)

Definition at line 431 of file GlobalL1TopoSimulation.cxx.

433  {
434  /*
435  Configure optical connectors - multiplicity algorithms
436  In multiplicity boards all trigger lines are copied into the
437  L1Menu::Connector 4 times (fpga 0,1 and clock 0,1)
438  Take (fpga, clock) = (0, 0)
439  */
440 
441  auto tlnames = std::vector<std::string>();
442 
443  for (auto iter = begin; iter != end; ++iter) {// config connectors
444  auto l1conn = *iter;
445  const auto& triggerLines = l1conn->triggerLines(0, 0);
446 
447  std::transform(triggerLines.cbegin(),
448  triggerLines.cend(),
449  std::back_inserter(tlnames),
450  [](const auto& tl) {return tl.name();});
451  }
452 
453  std::sort(tlnames.begin(), tlnames.end());
454 
455  auto iter = std::unique(tlnames.begin(), tlnames.end());
456  tlnames.erase(iter, tlnames.end());
457 
458  // it seems that different names give rise to the same Algorithm...
459  auto algs = std::vector<const TrigConf::L1TopoAlgorithm*>();
460  algs.reserve(tlnames.size());
461  std::transform(tlnames.cbegin(),
462  tlnames.cend(),
463  std::back_inserter(algs),
464  [&l1menu](const auto& name) {
465  return &(l1menu->algorithmFromTriggerline(name));});
466 
467  // it seems that different names give rise to the same Algorithm...
468  std::sort(algs.begin(), algs.end());
469  auto iter1 = std::unique(algs.begin(), algs.end());
470  algs.erase(iter1, algs.end());
471 
472  return algs;
473  }

◆ unique_conf_decision_algs_()

template<typename Iter >
std::vector< const TrigConf::L1TopoAlgorithm * > GlobalSim::unique_conf_decision_algs_ ( Iter  begin,
Iter  end,
const TrigConf::L1Menu l1menu 
)

Definition at line 360 of file GlobalL1TopoSimulation.cxx.

362  {
363 
364  auto tlnames = std::vector<std::string>();
365  for (auto iter = begin; iter != end; ++iter) {// config connectors
366  auto l1conn = *iter;
367  for( size_t fpga_ind : { 0, 1} ) {
368  for( size_t clock_ind : { 0, 1} ) {
369  for( auto & tl : l1conn->triggerLines(fpga_ind, clock_ind)) {
370  tlnames.push_back(tl.name());
371  }
372  }
373  }
374  }
375 
376  std::sort(tlnames.begin(), tlnames.end());
377 
378  auto iter = std::unique(tlnames.begin(), tlnames.end());
379 
380  tlnames.erase(iter, tlnames.end());
381 
382  auto algs = std::vector<const TrigConf::L1TopoAlgorithm*>();
383  algs.reserve(tlnames.size());
384  std::transform(tlnames.cbegin(),
385  tlnames.cend(),
386  std::back_inserter(algs),
387  [&l1menu](const auto& name) {
388  return &(l1menu->algorithmFromTriggerline(name));});
389 
390  // it seems that different names give rise to the same Algorithm...
391  std::sort(algs.begin(), algs.end());
392  auto iter1 = std::unique(algs.begin(), algs.end());
393 
394  algs.erase(iter1, algs.end());
395  return algs;
396  }

◆ unique_conf_sorting_algs_()

std::vector< const TrigConf::L1TopoAlgorithm * > GlobalSim::unique_conf_sorting_algs_ ( const std::vector< const TrigConf::L1TopoAlgorithm * > &  decision_algs,
const TrigConf::L1Menu l1menu 
)

Definition at line 399 of file GlobalL1TopoSimulation.cxx.

400  {
401 
402  auto sortNames = std::vector<std::pair<std::string,std::string>>();
403 
404  for (const auto& d_alg : decision_algs) {
405  for (const auto& sc_name : d_alg->inputs()){
406  sortNames.emplace_back(sc_name, d_alg->category());
407  }
408  }
409 
410  std::sort(sortNames.begin(), sortNames.end());
411  auto iter = std::unique(sortNames.begin(),
412  sortNames.end());
413 
414  sortNames.erase(iter, sortNames.end());
415 
416  auto sort_algs = std::vector<const TrigConf::L1TopoAlgorithm*>();
417  sort_algs.reserve(sortNames.size());
418 
419  std::transform(sortNames.cbegin(),
420  sortNames.cend(),
421  std::back_inserter(sort_algs),
422  [&l1menu](const auto& s_name){
423  return &(l1menu->algorithm(s_name.first, s_name.second));});
424 
425 
426  return sort_algs;
427  }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
python.PyAthenaComps.algs
algs
Definition: PyAthenaComps.py:43
beamspotPlotBcids.sz
sz
Definition: beamspotPlotBcids.py:521
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
checkxAOD.ds
ds
Definition: Tools/PyUtils/bin/checkxAOD.py:257
SGout2dot.alg
alg
Definition: SGout2dot.py:243
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
GlobalSim::makeAlgDataFetcher
std::pair< std::optional< std::shared_ptr< IAlgDataFetcher > >, std::vector< std::string > > makeAlgDataFetcher(bool do_eConn, bool do_oConn, const TrigConf::L1Menu *menu)
Definition: AlgDataFetcherFactory.cxx:7
GlobalSim::addAlgorithmsToFactory
void addAlgorithmsToFactory(const std::vector< const TrigConf::L1TopoAlgorithm * > &)
Definition: GlobalL1TopoSimulation.cxx:507
python.CreateTierZeroArgdict.parname
parname
Definition: CreateTierZeroArgdict.py:194
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
TrigConf::L1Menu
L1 menu configuration.
Definition: L1Menu.h:28
atn_test_sgProducerConsumerDataPool_jobOptions.end
end
Definition: atn_test_sgProducerConsumerDataPool_jobOptions.py:25
sendEI_SPB.root
root
Definition: sendEI_SPB.py:34
x
#define x
LArG4AODNtuplePlotter.pe
pe
Definition: LArG4AODNtuplePlotter.py:116
beamspotPlotBcids.count
int count
Definition: beamspotPlotBcids.py:486
std::sort
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:554
TrigConf::L1Board::connectorNames
const std::vector< std::string > & connectorNames() const
Accessor to connector names.
Definition: L1Board.cxx:92
TCS::L1TopoHWParameters::get
static const std::map< std::string, HardwareParam > & get()
Definition: L1TopoHardware.cxx:22
TCS::ParameterSpace
Definition: ParameterSpace.h:18
menu
make the sidebar many part of the config
Definition: hcg.cxx:551
GlobalSim::AlgDataDesc::decision
@ decision
Index
IndexedConstituentUserInfo::Index Index
Definition: IndexedConstituentUserInfo.cxx:12
python.getCurrentFolderTag.fn
fn
Definition: getCurrentFolderTag.py:65
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
GlobalSim::AlgDataDesc::notSet
@ notSet
G
#define G(x, y, z)
Definition: MD5.cxx:113
std::unique
std::reverse_iterator< DataModel_detail::iterator< DVL > > unique(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, BinaryPredicate pred)
Specialization of unique for DataVector/List.
Definition: DVL_algorithms.h:199
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
GlobalSim::unique_conf_counting_algs_
std::vector< const TrigConf::L1TopoAlgorithm * > unique_conf_counting_algs_(Iter begin, Iter end, const TrigConf::L1Menu *)
Definition: GlobalL1TopoSimulation.cxx:431
MuonSegmentReaderConfig.histSvc
histSvc
Definition: MuonSegmentReaderConfig.py:91
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
GlobalSim::conf_connectors_
std::vector< const TrigConf::L1Connector * > conf_connectors_(const TrigConf::L1Menu *, const TrigConf::L1Board *)
Definition: GlobalL1TopoSimulation.cxx:492
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
TCS::ConfigurableAlg
Definition: ConfigurableAlg.h:30
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
GlobalSim::get_boards_
std::vector< const TrigConf::L1Board * > get_boards_(const TrigConf::L1Menu *)
Definition: GlobalL1TopoSimulation.cxx:476
test_pythinning.out
out
Definition: test_pythinning.py:94
python.PyAthena.v
v
Definition: PyAthena.py:157
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
GlobalSim::interpretGenericParam
uint32_t interpretGenericParam(const std::string &)
Definition: GlobalL1TopoSimulation.cxx:613
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
GlobalSim::initialiseNonCountingAlgorithms
void initialiseNonCountingAlgorithms(const std::vector< const TrigConf::L1TopoAlgorithm * > &, std::shared_ptr< IL1TopoHistSvc >)
Definition: GlobalL1TopoSimulation.cxx:536
StateLessPT_NewConfig.partition
partition
Definition: StateLessPT_NewConfig.py:49
GlobalSim::unique_conf_sorting_algs_
std::vector< const TrigConf::L1TopoAlgorithm * > unique_conf_sorting_algs_(const std::vector< const TrigConf::L1TopoAlgorithm * > &, const TrigConf::L1Menu *)
Definition: GlobalL1TopoSimulation.cxx:399
python.XMLReader.l1menu
l1menu
Definition: XMLReader.py:73
GlobalSim::confAlgs_
std::vector< const TrigConf::L1TopoAlgorithm * > confAlgs_(const TrigConf::L1Menu *, bool decisionAlgs)
Definition: GlobalL1TopoSimulation.cxx:653
python.test_cfgItemList.msg
msg
Definition: test_cfgItemList.py:7
dqt_zlumi_alleff_HIST.tl
tl
Definition: dqt_zlumi_alleff_HIST.py:73
GlobalSim::unique_conf_decision_algs_
std::vector< const TrigConf::L1TopoAlgorithm * > unique_conf_decision_algs_(Iter begin, Iter end, const TrigConf::L1Menu *)
Definition: GlobalL1TopoSimulation.cxx:360
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
GlobalSim::dot
void dot(const std::unique_ptr< Digraph > &G, const std::string &fn)
Definition: dot.cxx:25
GlobalSim::dot
void dot(const Digraph &G, const std::string &fn)
Definition: dot.cxx:10
TCS::CountingAlg
Definition: CountingAlg.h:25