7 #include "Identifier/Identifier.h"
8 #include "eformat/Issue.h"
9 #include "eformat/SourceIdentifier.h"
20 declareInterface<INSWMMTP_ROD_Decoder>(
this );
26 return StatusCode::SUCCESS;
36 return StatusCode::SUCCESS;
44 return StatusCode::SUCCESS;
47 if (
decoder.get_elinks().size()!=3) {
48 ATH_MSG_DEBUG(
"NSW MMTP Common Decoder didn't give 3 elinks in output: something off with this fragment. Skipping.");
49 return StatusCode::SUCCESS;
58 const auto l0 = std::dynamic_pointer_cast<Muon::nsw::NSWTriggerMML1AElink>(
decoder.get_elinks()[0]);
61 uint32_t sid = fragment.rob_source_id ();
62 eformat::helper::SourceIdentifier source_id (sid);
68 rdo->set_sourceID(sid);
70 rdo->set_ROD_L1ID(fragment.rod_lvl1_id ());
71 rdo->set_ROD_BCID(fragment.rod_bc_id ());
74 rdo->set_EC(
l0->head_EC());
75 rdo->set_sectID(
l0->head_sectID());
76 rdo->set_L1ID(
l0->L1ID());
77 rdo->set_BCID(
l0->head_BCID());
80 rdo->set_l1a_request_BCID(
l0->l1a_local_req_BCID());
81 rdo->set_l1a_release_BCID(
l0->l1a_local_rel_BCID());
82 rdo->set_l1a_window_open(
l0->l1a_open_BCID());
83 rdo->set_l1a_window_center(
l0->l1a_req_BCID());
84 rdo->set_l1a_window_close(
l0->l1a_close_BCID());
85 rdo->set_l1a_window_open_offset(
l0->l1a_open_BCID_offset());
86 rdo->set_l1a_window_center_offset(
l0->l1a_req_BCID_offset());
87 rdo->set_l1a_window_close_offset(
l0->l1a_close_BCID_offset());
90 rdo->set_l1a_timeout(
l0->l1a_timeout());
91 rdo->set_l1a_engines(
l0->l1a_engine_snapshot());
93 for(
const auto& baseLink:
decoder.get_elinks()){
94 const auto l = std::dynamic_pointer_cast<Muon::nsw::NSWTriggerMML1AElink>(baseLink);
96 if (
l->l1a_timeout()==0) {
ATH_MSG_DEBUG(
"NSW MMTP Common Decoder reporting timeout condition: unclear if current event can be trusted");}
98 for (
const auto&
a:
l->art_packets()) {
99 for (
const auto&
c:
a->channels()) {
100 rdo->art_BCID().push_back(
a->art_BCID());
101 rdo->art_layer().push_back(
c.first);
102 rdo->art_channel().push_back(
c.second);
105 for (
const auto&
t:
l->trig_packets()) {
106 rdo->trig_BCID().push_back(
t->trig_BCID());
107 rdo->trig_dTheta().push_back(
t->trig_dTheta());
108 rdo->trig_ROI_rID().push_back(
t->trig_rBin());
109 rdo->trig_ROI_phiID().push_back(
t->trig_phiBin());
115 return StatusCode::SUCCESS;