ATLAS Offline Software
Loading...
Searching...
No Matches
CTPSLink.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef TRIGT1INTERFACES_CTPSLINK_H
5#define TRIGT1INTERFACES_CTPSLINK_H
6
7// std include(s):
8#include <stdint.h>
9
10// STL include(s):
11#include <vector>
12#include <string>
13
14
15// tdaq-common includes for CTP format definition
16#include "CTPfragment/CTPdataformatVersion.h"
17
18namespace LVL1CTP {
19
42 class CTPSLink {
43
44 public:
45
46 /* constructor, destructor */
47
49 CTPSLink( const std::vector<uint32_t>& roiVec, unsigned int ctpVersionNumber );
51 ~CTPSLink();
52
53 // no copy or assignment allowed
54 CTPSLink(CTPSLink const&) = delete;
55 CTPSLink& operator=(CTPSLink const&) = delete;
56
57 /* data format */
58
60 unsigned int getHeaderSize() const;
62 unsigned int getTrailerSize() const;
64 unsigned int getDataElementSize() const;
66 unsigned int getSize() const;
67
69 unsigned int getCTPVersionNumber() const { return m_ctpVersionNumber;}
70
71 /* access data content */
72
74 const std::vector<uint32_t> getHeader() const;
76 const std::vector<uint32_t> getTrailer() const;
78 const std::vector<uint32_t> getDataElements() const;
80 const std::vector<uint32_t>& getCTPToRoIBWords() const;
81
82 /* access the trigger information */
83
85 const std::vector<uint32_t> getTBP() const;
87 const std::vector<uint32_t> getTAP() const;
89 const std::vector<uint32_t> getTAV() const;
91 bool getAcceptBP() const;
93 bool getAcceptAP() const;
95 bool getAcceptAV() const;
97 bool getAccept() const { return getAcceptAV(); }
98
99 /* debug object content */
100
102 const std::string dump() const;
104 const std::string print(const bool longFormat = false) const;
105
106 /* data format constants */
107 //static const unsigned int wordsPerCTPSLink;
108 unsigned int getNumWordsPerCTPSLink() const { return m_wordsPerCTPSLink; }
109
110 private:
111
113 const std::vector<uint32_t> m_CTPSLinkVector;
114
115 unsigned int m_ctpVersionNumber;
116 CTPdataformatVersion * m_ctpVersion;
117
118 unsigned int m_wordsPerHeader;
120 unsigned int m_wordsPerTrailer;
121 unsigned int m_wordsPerCTPSLink;
122
124 const std::string convert(const std::vector<uint32_t>& data,
125 const bool longFormat = false) const;
126
127
128 }; // class CTPSlink
129
130} // namespace LVL1CTP
131
134
135#endif // TRIGT1INTERFACES_CTPSLINK_H
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11