|
ATLAS Offline Software
|
|
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 () |
|
◆ ADP
◆ GSCount
◆ GSDecision
◆ GSInputTOBArray
◆ GSTOBArray
◆ GSTOBArrayPtrVec
◆ L1AlgVec
◆ StringMap
◆ AlgDataDesc
Enumerator |
---|
notSet | |
decision | |
sort | |
count | |
input | |
root | |
Definition at line 18 of file AlgData.h.
◆ addAlgorithmsToFactory()
Definition at line 507 of file GlobalL1TopoSimulation.cxx.
509 auto createAlg = [](
const auto& c_alg){
510 auto alg = TCS::AlgFactory::mutable_instance().algorithm(c_alg->name());
512 auto classname = c_alg->klass();
515 if(classname==
"eEmVarMultiplicity") {classname=
"eEmMultiplicity";}
517 alg = TCS::AlgFactory::mutable_instance().create(classname,
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());
529 std::for_each(conf_algs.cbegin(),
◆ algGraphOut()
◆ ATLAS_NOT_THREAD_SAFE() [1/2]
Definition at line 102 of file GlobalL1TopoSimulation.cxx.
106 if (!(m_doEConns or m_doOConns)) {
108 return StatusCode::FAILURE;
136 std::shared_ptr<IL1TopoHistSvc>(
new GlobalTopoHistSvc);
143 const bool& dec_algs =
true;
163 initialiseCountingAlgorithms(countingConfAlgs,
191 if (!(optAlgDataFetcherPair.first).has_value()){
193 for (
const auto&
msg : optAlgDataFetcherPair.second) {
196 return StatusCode::FAILURE;
198 auto algDataFetcher = *(optAlgDataFetcherPair.first);
200 CHECK(addGSAlgorithms(algDataFetcher->execOrderedAlgData()));
208 CHECK( m_jetInputProvider.retrieve() );
211 CHECK( m_emtauInputProvider.retrieve() );
214 CHECK( m_energyInputProvider.retrieve() );
226 return StatusCode::SUCCESS;
◆ ATLAS_NOT_THREAD_SAFE() [2/2]
Definition at line 583 of file GlobalL1TopoSimulation.cxx.
588 auto setAlgParametersAndInit =
592 TCS::AlgFactory::mutable_instance().algorithm(c_alg->name());
594 throw std::runtime_error(
"Unable to retrieve TCS::Alg " +
598 const auto& l1thr =
l1menu->threshold(c_alg->outputs().at(0));
601 throw std::runtime_error(
"Error down casting to CountingAlg");
604 pca->setThreshold(l1thr);
609 std::for_each(conf_algs.cbegin(), conf_algs.cend(),
610 setAlgParametersAndInit);
◆ conf_connectors_()
Definition at line 492 of file GlobalL1TopoSimulation.cxx.
495 std::vector<const TrigConf::L1Connector*> connectors;
498 connectorNames.cend(),
499 std::back_inserter(connectors),
501 return &(menu->connector(name));});
◆ confAlgs_()
Definition at line 653 of file GlobalL1TopoSimulation.cxx.
663 std::vector<const TrigConf::L1Connector*> pConnectors;
669 for (
const auto& pboard : boards) {
671 pConnectors.insert(pConnectors.end(),
679 [](
const auto& pcon) {
680 return pcon->connectorType() ==
681 TrigConf::L1Connector::ConnectorType::ELECTRICAL;});
◆ dot() [1/2]
Definition at line 10 of file dot.cxx.
12 std::size_t V =
G.V();
14 ofs <<
"digraph G{\n";
15 ofs <<
"layout=twopi ranksep=3 ratio=auto\n";
17 for (std::size_t
v = 0;
v != V; ++
v) {
18 for (
const auto&
w :
G.adj(
v)) {
19 ofs <<
v <<
"->" <<
w <<
'\n';
◆ dot() [2/2]
◆ get_boards_()
Definition at line 476 of file GlobalL1TopoSimulation.cxx.
477 std::vector<const TrigConf::L1Board*> boards;
478 for (
const std::string & boardName :
l1menu->boardNames() ){
480 auto & l1board =
l1menu->board(boardName);
482 if (l1board.type() !=
"TOPO")
continue;
483 if (l1board.legacy())
continue;
484 boards.push_back(&l1board);
◆ get_tuple_size()
template<typename T >
std::size_t GlobalSim::get_tuple_size |
( |
T |
| ) |
|
◆ initialiseNonCountingAlgorithms()
Definition at line 536 of file GlobalL1TopoSimulation.cxx.
539 auto setAlgParametersAndInit = [&
histSvc](
const auto& c_alg) {
542 TCS::AlgFactory::mutable_instance().algorithm(c_alg->name());
544 throw std::runtime_error(
"Unable to retrieve TCS::Alg " +
549 for (
const auto&
pe : c_alg->parameters()) {
550 ps.addParameter(
pe.name(),
pe.value(),
pe.selection());
553 for (
const auto& pname : c_alg->generics().getKeys()) {
554 const auto&
pe = c_alg->generics().getObject(pname);
557 if (pname ==
"NumResultBits") {
558 auto sz = c_alg->outputs().size();
560 std::stringstream
ss;
561 ss <<
"Algorithm <" << pname <<
"parameter OutputBits ("
562 <<
val <<
") != output size ("
564 throw std::runtime_error(
ss.str());
569 ps.addParameter(pname,
val);
572 alg->setParameters(ps);
573 alg->setLegacyMode(
false);
578 std::for_each(conf_algs.cbegin(),
580 setAlgParametersAndInit);
◆ interpretGenericParam()
uint32_t GlobalSim::interpretGenericParam |
( |
const std::string & |
parvalue | ) |
|
Definition at line 613 of file GlobalL1TopoSimulation.cxx.
616 val = boost::lexical_cast<uint32_t, std::string>(parvalue);
618 catch(
const boost::bad_lexical_cast & bc) {
619 if( parvalue.size()>=3 && parvalue[0]==
':'
620 and parvalue[parvalue.size()-1]==
':' ) {
625 std::string
parname = parvalue.substr(1,parvalue.size()-2);
628 val =
x->second.value;
630 std::stringstream
ss;
631 ss <<
"Generic parameter value "
633 <<
" has the hardware contrained parameter format, but '"
635 <<
"' is not listed in L1TopoHardware.cxx";
637 throw std::runtime_error(
ss.str());
640 std::stringstream
ss;
641 ss <<
"Generic parameter value "
643 <<
" is not a uint32_t and does not match the hardware "
644 <<
" contrained parameter specification ':<parname>:' ";
645 throw std::runtime_error(
ss.str());
◆ 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.
10 auto adf = std::shared_ptr<IAlgDataFetcher>(
nullptr);
11 adf.reset(
new AlgDataFetcher(do_eConn, do_oConn,
menu));
13 return adf->isValid() ?
14 std::pair(std::make_optional(adf), std::vector<std::string>()) :
15 std::pair(std::optional<std::shared_ptr<IAlgDataFetcher>> (),
◆ operator<<() [1/2]
◆ operator<<() [2/2]
std::ostream & GlobalSim::operator<< |
( |
std::ostream & |
os, |
|
|
const Digraph & |
G |
|
) |
| |
Definition at line 66 of file Digraph.cxx.
67 os <<
"Digraph V: " <<
G.V() <<
" E: " <<
G.E() <<
" adj \n";
68 for (std::size_t
v = 0;
v !=
G.V(); ++
v) {
70 for (
const auto&
w :
G.adj(
v)){
◆ tuple_at()
template<std::size_t Index, typename Tuple , typename Functor >
auto GlobalSim::tuple_at |
( |
const Tuple & |
tpl, |
|
|
const Functor & |
func |
|
) |
| -> void |
◆ 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.
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);
◆ unique_conf_counting_algs_()
Definition at line 431 of file GlobalL1TopoSimulation.cxx.
441 auto tlnames = std::vector<std::string>();
443 for (
auto iter =
begin; iter !=
end; ++iter) {
445 const auto& triggerLines = l1conn->triggerLines(0, 0);
449 std::back_inserter(tlnames),
450 [](
const auto&
tl) {return tl.name();});
453 std::sort(tlnames.begin(), tlnames.end());
455 auto iter =
std::unique(tlnames.begin(), tlnames.end());
456 tlnames.erase(iter, tlnames.end());
459 auto algs = std::vector<const TrigConf::L1TopoAlgorithm*>();
460 algs.reserve(tlnames.size());
463 std::back_inserter(
algs),
465 return &(l1menu->algorithmFromTriggerline(name));});
◆ unique_conf_decision_algs_()
Definition at line 360 of file GlobalL1TopoSimulation.cxx.
364 auto tlnames = std::vector<std::string>();
365 for (
auto iter =
begin; iter !=
end; ++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());
376 std::sort(tlnames.begin(), tlnames.end());
378 auto iter =
std::unique(tlnames.begin(), tlnames.end());
380 tlnames.erase(iter, tlnames.end());
382 auto algs = std::vector<const TrigConf::L1TopoAlgorithm*>();
383 algs.reserve(tlnames.size());
386 std::back_inserter(
algs),
388 return &(l1menu->algorithmFromTriggerline(name));});
◆ unique_conf_sorting_algs_()
Definition at line 399 of file GlobalL1TopoSimulation.cxx.
402 auto sortNames = std::vector<std::pair<std::string,std::string>>();
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());
410 std::sort(sortNames.begin(), sortNames.end());
414 sortNames.erase(iter, sortNames.end());
416 auto sort_algs = std::vector<const TrigConf::L1TopoAlgorithm*>();
417 sort_algs.reserve(sortNames.size());
421 std::back_inserter(sort_algs),
422 [&
l1menu](
const auto& s_name){
423 return &(l1menu->algorithm(s_name.first, s_name.second));});
def retrieve(aClass, aKey=None)
std::pair< std::optional< std::shared_ptr< IAlgDataFetcher > >, std::vector< std::string > > makeAlgDataFetcher(bool do_eConn, bool do_oConn, const TrigConf::L1Menu *menu)
void addAlgorithmsToFactory(const std::vector< const TrigConf::L1TopoAlgorithm * > &)
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
const std::vector< std::string > & connectorNames() const
Accessor to connector names.
static const std::map< std::string, HardwareParam > & get()
IndexedConstituentUserInfo::Index Index
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.
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
std::vector< const TrigConf::L1TopoAlgorithm * > unique_conf_counting_algs_(Iter begin, Iter end, const TrigConf::L1Menu *)
#define CHECK(...)
Evaluate an expression and check for errors.
std::vector< const TrigConf::L1Connector * > conf_connectors_(const TrigConf::L1Menu *, const TrigConf::L1Board *)
std::vector< const TrigConf::L1Board * > get_boards_(const TrigConf::L1Menu *)
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.
uint32_t interpretGenericParam(const std::string &)
void initialiseNonCountingAlgorithms(const std::vector< const TrigConf::L1TopoAlgorithm * > &, std::shared_ptr< IL1TopoHistSvc >)
std::vector< const TrigConf::L1TopoAlgorithm * > unique_conf_sorting_algs_(const std::vector< const TrigConf::L1TopoAlgorithm * > &, const TrigConf::L1Menu *)
std::vector< const TrigConf::L1TopoAlgorithm * > confAlgs_(const TrigConf::L1Menu *, bool decisionAlgs)
std::vector< const TrigConf::L1TopoAlgorithm * > unique_conf_decision_algs_(Iter begin, Iter end, const TrigConf::L1Menu *)
void dot(const std::unique_ptr< Digraph > &G, const std::string &fn)
void dot(const Digraph &G, const std::string &fn)