 |
ATLAS Offline Software
|
Go to the documentation of this file.
12 #include "CTPfragment/CTPdataformatVersion.h"
15 #include "GaudiKernel/Bootstrap.h"
16 #include "GaudiKernel/ISvcLocator.h"
17 #include "GaudiKernel/IMessageSvc.h"
18 #include "GaudiKernel/MsgStream.h"
26 CTPdataformatVersion ctpDataFormat(ctpVersionNumber);
44 uint32_t numberOfWords =
static_cast<uint32_t>(
data.size()) - ctpDataFormat.getNumberTimeWords() - nExtraWords;
58 for(
unsigned int tipIdx = 0; tipIdx < ctpDataFormat.getTIPwords(); ++tipIdx) {
59 unsigned int index = ctpDataFormat.getTIPpos() + tipIdx + (bunch * ctpDataFormat.getDAQwordsPerBunch());
66 for(
unsigned int tbpIdx = 0; tbpIdx < ctpDataFormat.getTBPwords(); ++tbpIdx) {
67 unsigned int index = ctpDataFormat.getTBPpos() + tbpIdx + (bunch * ctpDataFormat.getDAQwordsPerBunch());
74 for(
unsigned int tapIdx = 0; tapIdx < ctpDataFormat.getTAPwords(); ++tapIdx) {
75 unsigned int index = ctpDataFormat.getTAPpos() + tapIdx + (bunch * ctpDataFormat.getDAQwordsPerBunch());
82 for(
unsigned int tavIdx = 0; tavIdx < ctpDataFormat.getTAVwords(); ++tavIdx) {
83 unsigned int index = ctpDataFormat.getTAVpos() + tavIdx + (bunch * ctpDataFormat.getDAQwordsPerBunch());
95 std::vector<uint32_t>
vec;
102 SmartIF<IMessageSvc>
msgSvc{Gaudi::svcLocator()->service(
"MessageSvc")};
106 MsgStream
log(
msgSvc,
"xAOD::CTPResult");
144 << std::setw(10) << std::setiosflags(std::ios_base::right) << std::setfill(
' ')
145 << ctpRes.
timeNanoSec() << std::resetiosflags(std::ios_base::right)
151 auto bunch = ctpRes.
getBC(
i);
155 for(
unsigned int j = 0; j<ctpRes.
tipWords()[
i].
size(); ++j) {
163 for(
unsigned int j = 0; j<ctpRes.
tbpWords()[
i].
size(); ++j) {
171 for(
unsigned int j = 0; j<ctpRes.
tapWords()[
i].
size(); ++j) {
179 for(
unsigned int j = 0; j<ctpRes.
tavWords()[
i].
size(); ++j) {
void setHeaderSize(const uint32_t word)
Set the number of words in the header.
void setInfoStatus(const uint32_t word)
Set the info status word.
char data[hepevt_bytes_allocation_ATLAS]
void setL1ID(const uint32_t word)
Set the extended LVL1 ID.
uint32_t errorStatus() const
Retrieve the error status word.
uint32_t sourceID() const
Retrieve the sub-detector source ID.
uint32_t L1ID() const
Retrieve the extended LVL1 ID.
uint32_t statusPosition() const
Retrieve the position of status information in the ROD.
void setAdditionalWords(const std::vector< uint32_t > &words)
Set the additional data words.
uint32_t ctpVersionNumber() const
Get the CTP version number.
uint32_t eventType() const
Retrieve the LVL1 event type.
std::vector< size_t > vec
void setNumStatusWords(const uint32_t word)
Set the number of status words in the trailer.
This is the trigger result for each item before prescale, after prescale and after veto....
@ u
Enums for curvilinear frames.
uint32_t headerFormatVersion() const
Retrieve the format version of the header.
void setTIPWords(const std::vector< std::vector< uint32_t > > &words)
Set the TIP words for all bunch crossings.
void dumpData(xAOD::CTPResult &ctpRes)
Print object content to default message stream.
void setTAPWords(const std::vector< std::vector< uint32_t > > &words)
Set the TAP words for all bunch crossings.
void setTBPWords(const std::vector< std::vector< uint32_t > > &words)
Set the TBP words for all bunch crossings.
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
void setEventType(const uint32_t word)
Set the LVL1 event type.
msgSvc
Provide convenience handles for various services.
uint32_t BCID() const
Retrieve the bunch crossing ID.
uint32_t l1AcceptBunchPosition() const
Get the L1 accept bunch position.
const std::vector< std::vector< uint32_t > > & tapWords() const
Get the TAP words for all bunch crossings.
uint32_t numStatusWords() const
Retrieve the number of status words in the trailer.
uint32_t numDataWords() const
Retrieve the number of data words.
void setStatusPosition(const uint32_t word)
Set the position of status information in the ROD.
uint32_t runNumber() const
Retrieve the run number.
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.
void initialize(xAOD::CTPResult &ctpRes, const uint32_t ctpVersionNumber, std::vector< uint32_t > &data, const uint32_t nExtraWords)
Initialize the object using xAOD::Header, xAOD::Trailer, and the payload data.
const std::vector< std::vector< uint32_t > > & tbpWords() const
Get the TBP words for all bunch crossings.
uint32_t headerSize() const
Retrieve the number of words in the header.
void setErrorStatus(const uint32_t word)
Set the error status word.
uint32_t numberOfBunches() const
Get the number of bunch crossings.
void setTAVWords(const std::vector< std::vector< uint32_t > > &words)
Set the TAV words for all bunch crossings.
uint32_t triggerType() const
Retrieve the LVL1 trigger type.
uint32_t headerMarker() const
Retrieve the header marker word.
uint32_t infoStatus() const
Retrieve the info status word.
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_t > & additionalWords() const
Get the additional data words.
Utility functions for xAOD::CTPResult objects that rely on tdaq-common.
uint32_t timeNanoSec() const
Get the time in nanoseconds.
void setCtpVersionNumber(const uint32_t ctpNumber)
Set the CTP version number.
uint32_t timeSec() const
Get the time in seconds.
Base class for elements of a container that can have aux data.
void setNumberOfBunches(const uint32_t nBCs)
Set the number of bunch crossings.