ATLAS Offline Software
Loading...
Searching...
No Matches
NSWTriggerElink.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef _MUON_NSW_TRIGGER_ELINK_H_
5#define _MUON_NSW_TRIGGER_ELINK_H_
6
7#include <stdint.h>
8#include <exception>
9#include <string>
10#include <memory>
11
13
14namespace Muon
15{
16 namespace nsw
17 {
18
19 class NSWTriggerException: public std::exception
20 {
21 public:
22 explicit NSWTriggerException (const std::string& s, const int id = -999)
23 : m_description(s), m_id(id) {};
24
25 virtual const char *what () const throw () {return m_description.c_str ();};
26 int id () const {return m_id;};
27
28 private:
29 std::string m_description;
30 int m_id;
31 };
32
33 //giving a name to the exceptions
35 not_assigned = -999, //default constructor valued for NSWTriggerException
36 unknown = -1, //unknown exception
37 incomplete = 0, //incomplete decoding for ROBFrag
38 too_short = 1, //shorter than minimum (2)
39 flx_status = 2, //felix status different from 0
40 flx_short = 3, //flx length shorter than bystream available
41 mmmon_inv_id = 4, //MMTP Mon elink invalid streamID
42 mml1a_inv_id = 5, //MMTP L1A elink invalid streamID
43 mml1a_art_sz = 6, //MMTP L1A ART stream data size invalid
44 mml1a_trg_sz = 7 //MMTP L1A Trigger stream data size invalid
45 };
46
48 {
49 public:
50
51 NSWTriggerElink (const uint32_t *bs, uint32_t remaining);
52 virtual ~NSWTriggerElink () = default;
53
54 //general checks
55 unsigned int nwords () const {return m_wordCount;}; //self counted or expected in case it will be possible
56 unsigned int nwordsFlx () const {return m_wordCountFlx;}; //reading from packet felix header
57 unsigned int status () const {return m_packet_status;}; //felix status
58 bool suspect () const {return m_packet_sus;}; //elink decoded but with triggering suspects
59
60
61 // Detector Logical ID and components
62 uint32_t elinkWord () const {return m_elinkWord;};
63 const std::shared_ptr<Muon::nsw::NSWResourceId>& elinkId () const {return m_elinkId;};
64
65 protected:
66 unsigned int m_wordCount{};
67 unsigned int m_wordCountFlx{};
68 unsigned int m_packet_status{};
70
71 //decoding felix header
72 uint32_t m_elinkWord{};
73 std::shared_ptr<Muon::nsw::NSWResourceId> m_elinkId;
74
75 };
76 }
77}
78
79
80#endif // _MUON_NSW_TRIGGER_ELINK_H_
virtual const char * what() const
NSWTriggerException(const std::string &s, const int id=-999)
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.