ATLAS Offline Software
Loading...
Searching...
No Matches
Trigger/TrigT1/TrigT1Result/TrigT1Result/CTPResult.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5
6#ifndef TRIGT1RESULT_CTPRESULT_H
7#define TRIGT1RESULT_CTPRESULT_H
8
9// std include(s):
10#include <stdint.h>
11
12// STL include(s):
13#include <vector>
14#include <bitset>
15#include <string>
16
17// Local include(s):
18#include "TrigT1Result/Header.h"
20#include "TrigT1Result/CTPRoI.h"
21
22#include "CTPfragment/CTPdataformatVersion.h"
23
24// Forward declaration(s):
25class MsgStream;
26
27namespace ROIB {
28
51
52 class CTPResult {
53
54 public:
57 m_useRoIB(false),
58 m_l1aBunch(0) {}
59
61 CTPResult(unsigned int ctpVersion, Header&&, Trailer&&, std::vector<CTPRoI>&& );
62
64 CTPResult(unsigned int ctpVersion, Header&&, Trailer&&, const std::vector<uint32_t>& );
65
66 /*
67 * Methods:
68 *
69 * */
70
71 /* status information */
72
74 bool isValid() const;
76 bool isComplete() const;
77
78 /* raw data access */
79
81 const Header& header() const;
83 const Trailer& trailer() const;
85 const std::vector<CTPRoI>& roIVec() const;
86
87 /* access the trigger information */
88
90 const std::vector<CTPRoI> TBP() const;
92 const std::vector<CTPRoI> TAP() const;
94 const std::vector<CTPRoI> TAV() const;
96 bool acceptBP() const;
98 bool acceptAP() const;
100 bool acceptAV() const;
102 bool accept() const { return acceptAV(); }
103
104 /* debug object content */
105
107
108 const std::string dump() const;
110 const std::string print(const bool longFormat = false) const;
111
113 void dumpData() const;
115 void dumpData(MsgStream&) const;
116
117 private:
118
119 /* Data members = header, trailer and RoI vector */
122 std::vector<CTPRoI> m_CTPResultRoIVec;
123
124 //CTP version
125 //unsigned int m_ctpVersionNumber;
126 CTPdataformatVersion m_ctpDataformat;
127
129 const std::string convert(const std::vector<CTPRoI>& data, const bool longFormat = false) const;
130
131 // flag to tell if this is a RoIB result or a DAQ result
133
134 // the L1 accept bunch for the DAQ CTP result
135 unsigned int m_l1aBunch;
136
137 }; // class CTPResult
138
139 // converter functions
140
142 std::bitset<512> convertToBitset(const std::vector<uint32_t>&);
144 std::bitset<512> convertToBitset(const std::vector<CTPRoI>&);
145
146} // namespace ROIB
147
148// include inline implementations
149
151
152#endif // TRIGT1RESULT_CTPRESULT_H
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
const std::string convert(const std::vector< CTPRoI > &data, const bool longFormat=false) const
convert data content into string (used by dump and print)
Definition CTPResult.cxx:84
bool acceptBP() const
get trigger accept before prescale
const Header & header() const
return header
void dumpData() const
print object content to default message stream
Trailer m_CTPResultTrailer
trailer fragment in LVL1 eformat
bool acceptAP() const
get trigger accept after prescale
bool isComplete() const
returns true if object isValid() and data has the expected length
std::vector< CTPRoI > m_CTPResultRoIVec
raw data content (RoIs)
const std::string print(const bool longFormat=false) const
print object content in a human readable format to string
Definition CTPResult.cxx:71
const std::vector< CTPRoI > TBP() const
get trigger result before prescale
Header m_CTPResultHeader
header fragment in LVL1 eformat
const std::vector< CTPRoI > & roIVec() const
return the RoI vector *‍/
bool isValid() const
returns true if header and trailer exist, data can be empty
bool acceptAV() const
get trigger accept after veto
const std::string dump() const
dump raw object content to string
Definition CTPResult.cxx:56
bool accept() const
get standard trigger accept
const std::vector< CTPRoI > TAP() const
get trigger result after prescale
const Trailer & trailer() const
return trailer
const std::vector< CTPRoI > TAV() const
get trigger result after veto
CTPResult()
default constructor: empty object
Header models the LVL1 ROD Header.
ROIB::Trailer models the LVL1 ROD Trailer.
Definition Trailer.h:37
Namespace of the LVL1 RoIB simulation.
std::bitset< 512 > convertToBitset(const std::vector< uint32_t > &words)
convert vector of unsigned int into bitset