 |
ATLAS Offline Software
|
Go to the documentation of this file.
12 #include "CTPfragment/CTPdataformatVersion.h"
18 CTPdataformatVersion ctpDataFormat(ctpVersionNumber);
24 std::vector<uint32_t>
words;
25 words.resize(ctpDataFormat.getNumberTimeWords()+(nBCs*ctpDataFormat.getDAQwordsPerBunch() )+nExtraWords);
31 CTPdataformatVersion ctpDataFormat(ctpVersionNumber);
48 if(ctpRes.
dataWords().size() <= ctpDataFormat.getTimeSecondsPos()){
51 return ctpRes.
dataWords().at(ctpDataFormat.getTimeSecondsPos());
58 if (ctpDataFormat.getTimeSecondsPos() <
words.size()) {
59 words[ctpDataFormat.getTimeSecondsPos()] = sec;
67 if(ctpRes.
dataWords().size() <= ctpDataFormat.getTimeNanosecondsPos()) {
70 return (ctpRes.
dataWords().at(ctpDataFormat.getTimeNanosecondsPos() ) >> ctpDataFormat.getTimeNanosecondsOffset() ) * ctpDataFormat.getTimeNanosecondsTicks();
77 if(ctpDataFormat.getTimeNanosecondsPos() <
words.size()) {
78 words[ctpDataFormat.getTimeNanosecondsPos()] = ((nano/ctpDataFormat.getTimeNanosecondsTicks()) << ctpDataFormat.getTimeNanosecondsOffset());
104 acc(ctpRes) = nExtraWords;
124 unsigned int nWords = 0;
126 std::vector<uint32_t>
vec;
131 nWords = ctpDataFormat.getTIPwords();
132 offset = ctpDataFormat.getTIPpos();
135 nWords = ctpDataFormat.getTBPwords();
136 offset = ctpDataFormat.getTBPpos();
139 nWords = ctpDataFormat.getTAPwords();
140 offset = ctpDataFormat.getTAPpos();
143 nWords = ctpDataFormat.getTAVwords();
144 offset = ctpDataFormat.getTAVpos();
153 for(
unsigned int bunch = 0 ; bunch < ctpRes.
numberOfBunches() ; ++bunch) {
154 for(
unsigned int tbp = 0; tbp < nWords; ++tbp) {
158 index += (bunch * ctpDataFormat.getDAQwordsPerBunch());
char data[hepevt_bytes_allocation_ATLAS]
void setTimeSec(xAOD::CTPResult &ctpRes, const uint32_t sec)
Set the time in seconds.
Helper class to provide type-safe access to aux data.
std::vector< uint32_t > getExtraWords(const xAOD::CTPResult &ctpRes)
Get additional words.
std::vector< uint32_t > getTIPWords(const xAOD::CTPResult &ctpRes)
Get the TIP (Trigger Inputs to the CTP) words (in Run3 512 items)
uint32_t getTimeSec(const xAOD::CTPResult &ctpRes)
Get the time in seconds.
uint32_t ctpVersionNumber() const
Get the CTP version number.
std::vector< size_t > vec
void setTimeNanoSec(xAOD::CTPResult &ctpRes, const uint32_t nano)
Set the time in nanoseconds.
This is the trigger result for each item before prescale, after prescale and after veto....
@ u
Enums for curvilinear frames.
void setNumberOfAdditionalWords(xAOD::CTPResult &ctpRes, const uint32_t nExtraWords)
Set the number of additional data words.
void initialize(xAOD::CTPResult &ctpRes, uint32_t ctpVersionNumber, const uint32_t nBCs, uint32_t nExtraWords)
Initialize with a number of bunch crossings of the readout window.
std::vector< uint32_t > getTAPWords(const xAOD::CTPResult &ctpRes)
Get the TAP (Trigger After Prescale) words.
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
WordType
Enum describing the different word types in the CTP result.
uint32_t numberOfAdditionalWords() const
Get the number of additional data words.
void setNumberOfBunches(xAOD::CTPResult &ctpRes, const uint32_t nBCs)
Set the number of bunch crossings.
uint32_t getTimeNanoSec(const xAOD::CTPResult &ctpRes)
Get the time in nanoseconds.
void setDataWords(const std::vector< uint32_t > &words)
Set the raw data words.
uint32_t numberOfBunches() const
Get the number of bunch crossings.
std::vector< uint32_t > getTAVWords(const xAOD::CTPResult &ctpRes)
Get the TAV (Trigger After Veto) words.
const std::vector< uint32_t > & dataWords() const
Get the raw data words.
Utility functions for xAOD::CTPResult objects that rely on tdaq-common.
std::vector< uint32_t > getWords(const xAOD::CTPResult &ctpRes, CTPResultUtils::WordType type)
Helper to retrieve specific words.
void setCtpVersionNumber(const uint32_t ctpNumber)
Set the CTP version number.
Base class for elements of a container that can have aux data.
std::vector< uint32_t > getTBPWords(const xAOD::CTPResult &ctpRes)
Get the TBP (Trigger Before Prescale) words.