ATLAS Offline Software
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 
14 namespace Muon
15 {
16  namespace nsw
17  {
18 
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{};
69  bool m_packet_sus{};
70 
71  //decoding felix header
73  std::shared_ptr<Muon::nsw::NSWResourceId> m_elinkId;
74 
75  };
76  }
77 }
78 
79 
80 #endif // _MUON_NSW_TRIGGER_ELINK_H_
Muon::nsw::mml1a_inv_id
@ mml1a_inv_id
Definition: NSWTriggerElink.h:42
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
Muon::nsw::flx_status
@ flx_status
Definition: NSWTriggerElink.h:39
Muon::nsw::NSWTriggerException::m_description
std::string m_description
Definition: NSWTriggerElink.h:26
Muon::nsw::not_assigned
@ not_assigned
Definition: NSWTriggerElink.h:35
Muon::nsw::mml1a_trg_sz
@ mml1a_trg_sz
Definition: NSWTriggerElink.h:44
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:45
Muon::nsw::mml1a_art_sz
@ mml1a_art_sz
Definition: NSWTriggerElink.h:43
Muon::nsw::NSWTriggerException::id
int id() const
Definition: NSWTriggerElink.h:26
calibdata.exception
exception
Definition: calibdata.py:496
Muon::nsw::NSWTriggerException::NSWTriggerException
NSWTriggerException(const std::string &s, const int id=-999)
Definition: NSWTriggerElink.h:22
Muon::nsw::flx_short
@ flx_short
Definition: NSWTriggerElink.h:40
Muon::nsw::NSWTriggerException::what
virtual const char * what() const
Definition: NSWTriggerElink.h:25
Muon::nsw::incomplete
@ incomplete
Definition: NSWTriggerElink.h:37
Muon::nsw::mmmon_inv_id
@ mmmon_inv_id
Definition: NSWTriggerElink.h:41
Muon::nsw::unknown
@ unknown
Definition: NSWTriggerElink.h:36
NSWResourceId.h
Muon::nsw::NSWTriggerExceptions
NSWTriggerExceptions
Definition: NSWTriggerElink.h:34
Muon::nsw::NSWTriggerException::m_id
int m_id
Definition: NSWTriggerElink.h:30
Muon::nsw::too_short
@ too_short
Definition: NSWTriggerElink.h:38
Muon::nsw::NSWTriggerException
Definition: NSWTriggerElink.h:20