ATLAS Offline Software
Loading...
Searching...
No Matches
NSWTriggerMMMonElink.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4#include <vector>
5#include <exception>
6#include <sstream>
7#include <string>
8
10
14
15Muon::nsw::NSWTriggerMMMonElink::NSWTriggerMMMonElink (const uint32_t *bs, const uint32_t remaining):
16 NSWTriggerElink (bs, remaining)
17{
18
19 std::size_t size_word{sizeof(uint32_t) * 8};
20 // 2 felix header 32b words already decoded;
21 std::size_t readPointer{2 * 32};
22 std::span<const std::uint32_t> data{bs, remaining};
23 //once format finalized, checking a minimum size or at least the structure
24
37
38 //already checked in NSWTriggerElink that remaining >= m_wordCountFlx
39 while ( readPointer < (m_wordCountFlx-1) * size_word ) {
40 //later during commissioning, need to change to ( readPointer < (m_wordCountFlx-1-stream_block_size) * size_word )
41
45
46 if (current_streamID == 0b10110001){
47 //finder
48 m_finder_streamID.push_back(current_streamID);
49 m_finder_regionCount.push_back(current_regionCount);
50 m_finder_triggerID.push_back(current_triggerID);
59
60 } else if (current_streamID == 0b10110010) {
61 //fitter
62 m_fitter_streamID.push_back(current_streamID);
63 m_fitter_regionCount.push_back(current_regionCount);
64 m_fitter_triggerID.push_back(current_triggerID);
76
77
78 } else {
79 Muon::nsw::NSWTriggerException e ( Muon::nsw::format("Stream ID in MMTP Monitoring packet now recognized: {}", current_streamID), 4);
80 throw e;
81 }
82
83 }
84
85 //warning: how the swROD is behaving if the last work is a uint16 only? Just 0-padding
87
88
89}
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
constexpr int size_fitter_mxG
constexpr int size_head_coincBCID
constexpr int size_finder_triggerID
constexpr int size_head_flags
constexpr int size_finder_streamID
constexpr int size_fitter_mx_ROI
constexpr int size_fitter_zero
constexpr int size_fitter_muG
constexpr int size_head_sectID
constexpr int size_fitter_dTheta
constexpr int size_head_reserved
constexpr int size_head_fragID
constexpr int size_fitter_mxL
constexpr int size_fitter_phiSign
constexpr int size_finder_regionCount
constexpr int size_head_spare
constexpr int size_trailer_CRC
constexpr int size_fitter_mvG
constexpr int size_fitter_rBin
constexpr int size_head_regionCount
constexpr int size_head_coincRegion
constexpr int size_fitter_phiBin
constexpr int size_head_orbit
constexpr int size_fitter_filler
std::string format(const std::string &str, const T &arg)
constexpr Target decode_and_advance(const std::span< const Source > words, std::size_t &start, const std::size_t size)
Decode bits from data of words and advance the read pointer.