ATLAS Offline Software
Loading...
Searching...
No Matches
xAOD::CTPResult_v1 Class Reference

This is the trigger result for each item before prescale, after prescale and after veto. More...

#include <CTPResult_v1.h>

Inheritance diagram for xAOD::CTPResult_v1:
Collaboration diagram for xAOD::CTPResult_v1:

Classes

struct  CTPBunchCrossing
 This is the trigger result for each item before prescale, after prescale and after veto for a single bunch crossing. More...

Public Member Functions

uint32_t ctpVersionNumber () const
 Get the CTP version number.
void setCtpVersionNumber (const uint32_t ctpNumber)
 Set the CTP version number.
uint32_t headerMarker () const
 Retrieve the header marker word.
uint32_t headerSize () const
 Retrieve the number of words in the header.
uint32_t headerFormatVersion () const
 Retrieve the format version of the header.
uint32_t sourceID () const
 Retrieve the sub-detector source ID.
uint32_t runNumber () const
 Retrieve the run number.
uint32_t L1ID () const
 Retrieve the extended LVL1 ID.
uint32_t BCID () const
 Retrieve the bunch crossing ID.
uint32_t triggerType () const
 Retrieve the LVL1 trigger type.
uint32_t eventType () const
 Retrieve the LVL1 event type.
void setHeaderMarker (const uint32_t word)
 Set the header marker word.
void setHeaderSize (const uint32_t word)
 Set the number of words in the header.
void setHeaderFormatVersion (const uint32_t word)
 Set the format version of the header.
void setSourceID (const uint32_t word)
 Set the sub-detector source ID.
void setRunNumber (const uint32_t word)
 Set the run number.
void setL1ID (const uint32_t word)
 Set the extended LVL1 ID.
void setBCID (const uint32_t word)
 Set the bunch crossing ID.
void setTriggerType (const uint32_t word)
 Set the LVL1 trigger type.
void setEventType (const uint32_t word)
 Set the LVL1 event type.
const CTPResult_v1::CTPBunchCrossing getBC (const int bunch=-1) const
 Get the CTPBunchCrossing object for a specific bunch in the readout window.
const std::vector< uint32_theader () const
 Get the header words.
void setHeader (const uint32_t marker, const uint32_t version, const uint32_t sourceid, const uint32_t l1id=0, const uint32_t runNum=0, const uint32_t bcid=0, const uint32_t trigType=0, const uint32_t evtType=0)
 Set the header words.
const std::vector< uint32_ttrailer () const
 Get the trailer words.
void setTrailer (const uint32_t numData, const uint32_t errStat=0, const uint32_t infoStat=0, const uint32_t numStat=2, const uint32_t statPos=1)
 Set the trailer words.
uint32_t numberOfBunches () const
 Get the number of bunch crossings.
void setNumberOfBunches (const uint32_t nBCs)
 Set the number of bunch crossings.
uint32_t l1AcceptBunchPosition () const
 Get the L1 accept bunch position.
void setL1AcceptBunchPosition (uint32_t pos)
 Set the L1Accept bunch position.
const std::vector< std::vector< uint32_t > > & tipWords () const
 Get the TIP words for all bunch crossings.
void setTIPWords (const std::vector< std::vector< uint32_t > > &words)
 Set the TIP words for all bunch crossings.
const std::vector< std::vector< uint32_t > > & tbpWords () const
 Get the TBP words for all bunch crossings.
void setTBPWords (const std::vector< std::vector< uint32_t > > &words)
 Set the TBP words for all bunch crossings.
const std::vector< std::vector< uint32_t > > & tapWords () const
 Get the TAP words for all bunch crossings.
void setTAPWords (const std::vector< std::vector< uint32_t > > &words)
 Set the TAP words for all bunch crossings.
const std::vector< std::vector< uint32_t > > & tavWords () const
 Get the TAV words for all bunch crossings.
void setTAVWords (const std::vector< std::vector< uint32_t > > &words)
 Set the TAV words for all bunch crossings.
uint32_t timeSec () const
 Get the time in seconds.
void setTimeSec (const uint32_t sec)
 Set the time in seconds.
uint32_t timeNanoSec () const
 Get the time in nanoseconds.
void setTimeNanoSec (const uint32_t nano)
 Set the time in nanoseconds.
uint32_t numberOfAdditionalWords () const
 Get the number of additional data words.
void setNumberOfAdditionalWords (const uint32_t nExtraWords)
 Set the number of additional data words.
const std::vector< uint32_t > & additionalWords () const
 Get the additional data words.
void setAdditionalWords (const std::vector< uint32_t > &words)
 Set the additional data words.
uint32_t turnCounter () const
 Get the turn counter.
void setTurnCounter (const uint32_t val)
 Set the turn counter.
std::vector< uint32_tgetTIPWords (const int bunchPosition=-1) const
 Get the TIP (Trigger Inputs to the CTP) words (in Run3 512 items).
std::vector< uint32_tgetTBPWords (const int bunchPosition=-1) const
 Get the TBP (Trigger Before Prescale) words.
std::vector< uint32_tgetTAPWords (const int bunchPosition=-1) const
 Get the TAP (Trigger After Prescale) words.
std::vector< uint32_tgetTAVWords (const int bunchPosition=-1) const
 Get the TAV (Trigger After Veto) words.
uint32_t errorStatus () const
 Retrieve the error status word.
uint32_t infoStatus () const
 Retrieve the info status word.
uint32_t numStatusWords () const
 Retrieve the number of status words in the trailer.
uint32_t numDataWords () const
 Retrieve the number of data words.
uint32_t statusPosition () const
 Retrieve the position of status information in the ROD.
void setErrorStatus (const uint32_t word)
 Set the error status word.
void setInfoStatus (const uint32_t word)
 Set the info status word.
void setNumStatusWords (const uint32_t word)
 Set the number of status words in the trailer.
void setStatusPosition (const uint32_t word)
 Set the position of status information in the ROD.
void setNumDataWords (const uint32_t num)
 Set the number of data words.

Detailed Description

This is the trigger result for each item before prescale, after prescale and after veto.

Utility functions for xAOD::CTPResult objects are defined in TrigT1Interfacts/CTPResultUtils.h that depend on tdaq-common code.

Definition at line 23 of file CTPResult_v1.h.

Member Function Documentation

◆ additionalWords()

const std::vector< uint32_t > & xAOD::CTPResult_v1::additionalWords ( ) const

Get the additional data words.

Returns
Vector of additional data words.

◆ BCID()

uint32_t xAOD::CTPResult_v1::BCID ( ) const

Retrieve the bunch crossing ID.

Returns
BCID

◆ ctpVersionNumber()

uint32_t xAOD::CTPResult_v1::ctpVersionNumber ( ) const

Get the CTP version number.

Returns
CTP version number.

◆ errorStatus()

uint32_t xAOD::CTPResult_v1::errorStatus ( ) const

Retrieve the error status word.

Returns
Error status word.

◆ eventType()

uint32_t xAOD::CTPResult_v1::eventType ( ) const

Retrieve the LVL1 event type.

Returns
Event type word.

◆ getBC()

const CTPResult_v1::CTPBunchCrossing xAOD::CTPResult_v1::getBC ( const int bunch = -1) const

Get the CTPBunchCrossing object for a specific bunch in the readout window.

Returns
Read-only CTPBunchCrossing object.

Definition at line 94 of file CTPResult_v1.cxx.

94 {
95 int idx;
96 if (bunch == -1) {
98 } else {
99 idx = bunch;
100 }
101 CTPResult_v1::CTPBunchCrossing bc;
102 bc.tipWords = tipWords()[idx];
103 bc.tbpWords = tbpWords()[idx];
104 bc.tapWords = tapWords()[idx];
105 bc.tavWords = tavWords()[idx];
106 return bc;
107 }
const std::vector< std::vector< uint32_t > > & tbpWords() const
Get the TBP words for all bunch crossings.
const std::vector< std::vector< uint32_t > > & tapWords() const
Get the TAP words for all bunch crossings.
const std::vector< std::vector< uint32_t > > & tipWords() const
Get the TIP words for all bunch crossings.
const std::vector< std::vector< uint32_t > > & tavWords() const
Get the TAV words for all bunch crossings.
uint32_t l1AcceptBunchPosition() const
Get the L1 accept bunch position.

◆ getTAPWords()

std::vector< uint32_t > xAOD::CTPResult_v1::getTAPWords ( const int bunchPosition = -1) const

Get the TAP (Trigger After Prescale) words.

Returns
Vector of TAP words.

Definition at line 143 of file CTPResult_v1.cxx.

143 {
144 return getBC(bunch).tapWords;
145 }
const CTPResult_v1::CTPBunchCrossing getBC(const int bunch=-1) const
Get the CTPBunchCrossing object for a specific bunch in the readout window.
std::vector< uint32_t > tapWords

◆ getTAVWords()

std::vector< uint32_t > xAOD::CTPResult_v1::getTAVWords ( const int bunchPosition = -1) const

Get the TAV (Trigger After Veto) words.

Returns
Vector of TAV words.

Definition at line 148 of file CTPResult_v1.cxx.

148 {
149 return getBC(bunch).tavWords;
150 }
std::vector< uint32_t > tavWords

◆ getTBPWords()

std::vector< uint32_t > xAOD::CTPResult_v1::getTBPWords ( const int bunchPosition = -1) const

Get the TBP (Trigger Before Prescale) words.

Returns
Vector of TBP words.

Definition at line 138 of file CTPResult_v1.cxx.

138 {
139 return getBC(bunch).tbpWords;
140 }
std::vector< uint32_t > tbpWords

◆ getTIPWords()

std::vector< uint32_t > xAOD::CTPResult_v1::getTIPWords ( const int bunchPosition = -1) const

Get the TIP (Trigger Inputs to the CTP) words (in Run3 512 items).

Returns
Vector of TIP words.

Definition at line 133 of file CTPResult_v1.cxx.

133 {
134 return getBC(bunch).tipWords;
135 }
std::vector< uint32_t > tipWords

◆ header()

const std::vector< uint32_t > xAOD::CTPResult_v1::header ( ) const

Get the header words.

Returns
vector of header words.

Definition at line 153 of file CTPResult_v1.cxx.

153 {
154 return {
155 headerMarker(),
156 headerSize(),
158 sourceID(),
159 runNumber(),
160 L1ID(),
161 BCID(),
162 triggerType(),
163 eventType()
164 };
165 }
uint32_t L1ID() const
Retrieve the extended LVL1 ID.
uint32_t headerSize() const
Retrieve the number of words in the header.
uint32_t triggerType() const
Retrieve the LVL1 trigger type.
uint32_t runNumber() const
Retrieve the run number.
uint32_t BCID() const
Retrieve the bunch crossing ID.
uint32_t headerFormatVersion() const
Retrieve the format version of the header.
uint32_t eventType() const
Retrieve the LVL1 event type.
uint32_t headerMarker() const
Retrieve the header marker word.
uint32_t sourceID() const
Retrieve the sub-detector source ID.

◆ headerFormatVersion()

uint32_t xAOD::CTPResult_v1::headerFormatVersion ( ) const

Retrieve the format version of the header.

Returns
Format version word.

◆ headerMarker()

uint32_t xAOD::CTPResult_v1::headerMarker ( ) const

Retrieve the header marker word.

Returns
Header marker word.

◆ headerSize()

uint32_t xAOD::CTPResult_v1::headerSize ( ) const

Retrieve the number of words in the header.

Returns
Header size in words.

◆ infoStatus()

uint32_t xAOD::CTPResult_v1::infoStatus ( ) const

Retrieve the info status word.

Returns
Info status word.

◆ l1AcceptBunchPosition()

uint32_t xAOD::CTPResult_v1::l1AcceptBunchPosition ( ) const

Get the L1 accept bunch position.

Returns
Bunch position for the L1 accept.

◆ L1ID()

uint32_t xAOD::CTPResult_v1::L1ID ( ) const

Retrieve the extended LVL1 ID.

Returns
LVL1 ID word.

◆ numberOfAdditionalWords()

uint32_t xAOD::CTPResult_v1::numberOfAdditionalWords ( ) const

Get the number of additional data words.

Returns
Number of extra words.

◆ numberOfBunches()

uint32_t xAOD::CTPResult_v1::numberOfBunches ( ) const

Get the number of bunch crossings.

Returns
Number of BCs.

◆ numDataWords()

uint32_t xAOD::CTPResult_v1::numDataWords ( ) const

Retrieve the number of data words.

Returns
Number of data words.

◆ numStatusWords()

uint32_t xAOD::CTPResult_v1::numStatusWords ( ) const

Retrieve the number of status words in the trailer.

Returns
Number of status words.

◆ runNumber()

uint32_t xAOD::CTPResult_v1::runNumber ( ) const

Retrieve the run number.

Returns
Run number word.

◆ setAdditionalWords()

void xAOD::CTPResult_v1::setAdditionalWords ( const std::vector< uint32_t > & words)

Set the additional data words.

Parameters
wordsVector of additional data words.

◆ setBCID()

void xAOD::CTPResult_v1::setBCID ( const uint32_t word)

Set the bunch crossing ID.

Parameters
wordBCID to set.

◆ setCtpVersionNumber()

void xAOD::CTPResult_v1::setCtpVersionNumber ( const uint32_t ctpNumber)

Set the CTP version number.

Parameters
ctpNumberVersion number to set.

◆ setErrorStatus()

void xAOD::CTPResult_v1::setErrorStatus ( const uint32_t word)

Set the error status word.

Parameters
wordError status to set.

◆ setEventType()

void xAOD::CTPResult_v1::setEventType ( const uint32_t word)

Set the LVL1 event type.

Parameters
wordEvent type to set.

◆ setHeader()

void xAOD::CTPResult_v1::setHeader ( const uint32_t marker,
const uint32_t version,
const uint32_t sourceid,
const uint32_t l1id = 0,
const uint32_t runNum = 0,
const uint32_t bcid = 0,
const uint32_t trigType = 0,
const uint32_t evtType = 0 )

Set the header words.

Parameters
markerHeader maker.
versionHeader format version.
sourceidSub detector source ID.
runNumRun number.
l1idExtended LVL1 ID.
bcidBunch crossing ID.
trigTypeLVL1 trigger type.
evtTypeLVL1 event type.

Definition at line 168 of file CTPResult_v1.cxx.

168 {
169 setHeaderMarker(marker);
170 setHeaderSize(8);
171 setHeaderFormatVersion(version);
172 setSourceID(sourceid);
173 setRunNumber(runNum);
174 setL1ID(l1id);
175 setBCID(bcid);
176 setTriggerType(trigType);
177 setEventType(evtType);
178 }
void setHeaderFormatVersion(const uint32_t word)
Set the format version of the header.
void setEventType(const uint32_t word)
Set the LVL1 event type.
void setHeaderSize(const uint32_t word)
Set the number of words in the header.
void setHeaderMarker(const uint32_t word)
Set the header marker word.
void setRunNumber(const uint32_t word)
Set the run number.
void setTriggerType(const uint32_t word)
Set the LVL1 trigger type.
void setBCID(const uint32_t word)
Set the bunch crossing ID.
void setL1ID(const uint32_t word)
Set the extended LVL1 ID.
void setSourceID(const uint32_t word)
Set the sub-detector source ID.
setEventNumber setTimeStamp bcid

◆ setHeaderFormatVersion()

void xAOD::CTPResult_v1::setHeaderFormatVersion ( const uint32_t word)

Set the format version of the header.

Parameters
wordFormat version to set.

◆ setHeaderMarker()

void xAOD::CTPResult_v1::setHeaderMarker ( const uint32_t word)

Set the header marker word.

Parameters
wordHeader marker to set.

◆ setHeaderSize()

void xAOD::CTPResult_v1::setHeaderSize ( const uint32_t word)

Set the number of words in the header.

Parameters
wordHeader size in words.

◆ setInfoStatus()

void xAOD::CTPResult_v1::setInfoStatus ( const uint32_t word)

Set the info status word.

Parameters
wordInfo status to set.

◆ setL1AcceptBunchPosition()

void xAOD::CTPResult_v1::setL1AcceptBunchPosition ( uint32_t pos)

Set the L1Accept bunch position.

Parameters
posBunch position.

Definition at line 126 of file CTPResult_v1.cxx.

126 {
127 if (numberOfBunches() == 1 && pos > 0) {pos=0;}
128 static const SG::Accessor<uint32_t> acc("l1AcceptBunchPosition");
129 acc(*this) = pos;
130 }
uint32_t numberOfBunches() const
Get the number of bunch crossings.
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:573
static const SG::AuxElement::Accessor< ElementLink< IParticleContainer > > acc("originalObjectLink")
Object used for setting/getting the dynamic decoration in question.

◆ setL1ID()

void xAOD::CTPResult_v1::setL1ID ( const uint32_t word)

Set the extended LVL1 ID.

Parameters
wordLVL1 ID to set.

◆ setNumberOfAdditionalWords()

void xAOD::CTPResult_v1::setNumberOfAdditionalWords ( const uint32_t nExtraWords)

Set the number of additional data words.

Parameters
nExtraWordsNumber of extra words.

◆ setNumberOfBunches()

void xAOD::CTPResult_v1::setNumberOfBunches ( const uint32_t nBCs)

Set the number of bunch crossings.

Parameters
nBCsNumber of bunch crossings.

Definition at line 110 of file CTPResult_v1.cxx.

110 {
111 if(nBCs > tipWords().size()) {
112 static const SG::AuxElement::Accessor< uint32_t > accNumOfBunches("numberOfBunches");
113 static const SG::AuxElement::Accessor< std::vector<std::vector<uint32_t> > > accTIPWords("tipWords");
114 static const SG::AuxElement::Accessor< std::vector<std::vector<uint32_t> > > accTBPWords("tbpWords");
115 static const SG::AuxElement::Accessor< std::vector<std::vector<uint32_t> > > accTAPWords("tapWords");
116 static const SG::AuxElement::Accessor< std::vector<std::vector<uint32_t> > > accTAVWords("tavWords");
117 accNumOfBunches( *this ) = nBCs;
118 accTIPWords( *this ).resize(nBCs);
119 accTBPWords( *this ).resize(nBCs);
120 accTAPWords( *this ).resize(nBCs);
121 accTAVWords( *this ).resize(nBCs);
122 }
123 }
size_t size() const
Number of registered mappings.

◆ setNumDataWords()

void xAOD::CTPResult_v1::setNumDataWords ( const uint32_t num)

Set the number of data words.

Parameters
numNumber of data words to set.

◆ setNumStatusWords()

void xAOD::CTPResult_v1::setNumStatusWords ( const uint32_t word)

Set the number of status words in the trailer.

Parameters
wordNumber of status words to set.

◆ setRunNumber()

void xAOD::CTPResult_v1::setRunNumber ( const uint32_t word)

Set the run number.

Parameters
wordRun number to set.

◆ setSourceID()

void xAOD::CTPResult_v1::setSourceID ( const uint32_t word)

Set the sub-detector source ID.

Parameters
wordSource ID to set.

◆ setStatusPosition()

void xAOD::CTPResult_v1::setStatusPosition ( const uint32_t word)

Set the position of status information in the ROD.

LVL1 assumes this value is 1.

Parameters
wordStatus position to set.

◆ setTAPWords()

void xAOD::CTPResult_v1::setTAPWords ( const std::vector< std::vector< uint32_t > > & words)

Set the TAP words for all bunch crossings.

Parameters
wordsVector of vectors for all TAP words for all bunches.

◆ setTAVWords()

void xAOD::CTPResult_v1::setTAVWords ( const std::vector< std::vector< uint32_t > > & words)

Set the TAV words for all bunch crossings.

Parameters
wordsVector of vectors for all TAV words for all bunches.

◆ setTBPWords()

void xAOD::CTPResult_v1::setTBPWords ( const std::vector< std::vector< uint32_t > > & words)

Set the TBP words for all bunch crossings.

Parameters
wordsVector of vectors for all TBP words for all bunches.

◆ setTimeNanoSec()

void xAOD::CTPResult_v1::setTimeNanoSec ( const uint32_t nano)

Set the time in nanoseconds.

Parameters
nanoTime in nanoseconds.

◆ setTimeSec()

void xAOD::CTPResult_v1::setTimeSec ( const uint32_t sec)

Set the time in seconds.

Parameters
secTime in seconds.

◆ setTIPWords()

void xAOD::CTPResult_v1::setTIPWords ( const std::vector< std::vector< uint32_t > > & words)

Set the TIP words for all bunch crossings.

Parameters
wordsVector of vectors for all TIP words for all bunches.

◆ setTrailer()

void xAOD::CTPResult_v1::setTrailer ( const uint32_t numData,
const uint32_t errStat = 0,
const uint32_t infoStat = 0,
const uint32_t numStat = 2,
const uint32_t statPos = 1 )

Set the trailer words.

Parameters
errStatError status.
infoStatInfo status.
numStatNumber of status words.
numDataNumber of data words.
statPosPosition of status information in ROD (LVL1 assumes 1).

Definition at line 192 of file CTPResult_v1.cxx.

192 {
193 setErrorStatus(errStat);
194 setInfoStatus(infoStat);
195 setNumStatusWords(numStat);
196 setNumDataWords(numData);
197 setStatusPosition(statPos);
198 }
void setInfoStatus(const uint32_t word)
Set the info status word.
void setNumStatusWords(const uint32_t word)
Set the number of status words in the trailer.
void setStatusPosition(const uint32_t word)
Set the position of status information in the ROD.
void setNumDataWords(const uint32_t num)
Set the number of data words.
void setErrorStatus(const uint32_t word)
Set the error status word.

◆ setTriggerType()

void xAOD::CTPResult_v1::setTriggerType ( const uint32_t word)

Set the LVL1 trigger type.

Parameters
wordTrigger type to set.

◆ setTurnCounter()

void xAOD::CTPResult_v1::setTurnCounter ( const uint32_t val)

Set the turn counter.

Parameters
valTurn counter value.

◆ sourceID()

uint32_t xAOD::CTPResult_v1::sourceID ( ) const

Retrieve the sub-detector source ID.

Returns
Source ID word.

◆ statusPosition()

uint32_t xAOD::CTPResult_v1::statusPosition ( ) const

Retrieve the position of status information in the ROD.

LVL1 assumes this value is 1.

Returns
Position of status information.

◆ tapWords()

const std::vector< std::vector< uint32_t > > & xAOD::CTPResult_v1::tapWords ( ) const

Get the TAP words for all bunch crossings.

Returns
Vector of vectors for all TAP words for all bunches.

◆ tavWords()

const std::vector< std::vector< uint32_t > > & xAOD::CTPResult_v1::tavWords ( ) const

Get the TAV words for all bunch crossings.

Returns
Vector of vectors for all TAV words for all bunches.

◆ tbpWords()

const std::vector< std::vector< uint32_t > > & xAOD::CTPResult_v1::tbpWords ( ) const

Get the TBP words for all bunch crossings.

Returns
Vector of vectors for all TBP words for all bunches.

◆ timeNanoSec()

uint32_t xAOD::CTPResult_v1::timeNanoSec ( ) const

Get the time in nanoseconds.

Returns
Time in nanoseconds.

◆ timeSec()

uint32_t xAOD::CTPResult_v1::timeSec ( ) const

Get the time in seconds.

Returns
Time in seconds.

◆ tipWords()

const std::vector< std::vector< uint32_t > > & xAOD::CTPResult_v1::tipWords ( ) const

Get the TIP words for all bunch crossings.

Returns
Vector of vectors for all TIP words for all bunches.

◆ trailer()

const std::vector< uint32_t > xAOD::CTPResult_v1::trailer ( ) const

Get the trailer words.

Returns
vector of trailer words.

Definition at line 181 of file CTPResult_v1.cxx.

181 {
182 return {
183 errorStatus(),
184 infoStatus(),
186 numDataWords(),
188 };
189 }
uint32_t numDataWords() const
Retrieve the number of data words.
uint32_t numStatusWords() const
Retrieve the number of status words in the trailer.
uint32_t infoStatus() const
Retrieve the info status word.
uint32_t statusPosition() const
Retrieve the position of status information in the ROD.
uint32_t errorStatus() const
Retrieve the error status word.

◆ triggerType()

uint32_t xAOD::CTPResult_v1::triggerType ( ) const

Retrieve the LVL1 trigger type.

Returns
Trigger type word.

◆ turnCounter()

uint32_t xAOD::CTPResult_v1::turnCounter ( ) const

Get the turn counter.

Returns
Turn counter value.

The documentation for this class was generated from the following files: