10#include "GaudiKernel/Bootstrap.h"
11#include "GaudiKernel/ISvcLocator.h"
12#include "GaudiKernel/IMessageSvc.h"
13#include "GaudiKernel/MsgStream.h"
62 for (std::vector<CTPRoI>::size_type i(0); i <
roIVec().size(); ++i) {
75 s <<
"header [" << this->
header().
print(longFormat) <<
"] ";
76 if (longFormat) s << std::endl;
78 if (longFormat) s << std::endl;
79 s <<
"trailer [" << this->
trailer().
print(longFormat) <<
"] ";
90 if (longFormat) s <<
"\n";
91 if (i == 0 || longFormat) s <<
" Time";
92 if (longFormat) s << std::setw(1) << i;
93 s <<
" " << std::setw(8) <<
data[i].roIWord();
94 if (longFormat) s << std::endl;
101 if (longFormat) s <<
"\n";
102 if (i == 0 || longFormat) s <<
" TIP";
103 if (longFormat) s << std::setw(1) << i;
105 if (longFormat) s << std::endl;
123 if (longFormat) s <<
"\n";
124 if (i == 0 || longFormat) s <<
" TBP";
125 if (longFormat) s << std::setw(1) << i;
127 if (longFormat) s << std::endl;
134 if (longFormat) s <<
"\n";
135 if (i == 0 || longFormat) s <<
" TAP";
136 if (longFormat) s << std::setw(1) << i;
138 if (longFormat) s << std::endl;
145 if (longFormat) s <<
"\n";
146 if (i == 0 || longFormat) s <<
" TAV";
147 if (longFormat) s << std::setw(1) << i;
149 if (longFormat) s << std::endl;
158 SmartIF<IMessageSvc> msgSvc{Gaudi::svcLocator()->service(
"MessageSvc")};
162 MsgStream log(msgSvc,
"CTPResult");
168 log << MSG::DEBUG <<
"*BEGIN* CTPResult" <<
endmsg;
173 log << MSG::DEBUG <<
"RoI word[" << counter <<
"] : 0x"
174 << MSG::hex << it->roIWord() << MSG::dec <<
endmsg;
177 log << MSG::DEBUG <<
"*END* CTPResult" <<
endmsg;
183 std::bitset<512> bitset;
185 for (
size_t i(0); i < words.size(); ++i) {
186 std::bitset<512> bs = words[i];
197 std::bitset<512> bitset;
199 for (
size_t i(0); i < words.size(); ++i) {
200 std::bitset<512> bs = words[i].roIWord();
char data[hepevt_bytes_allocation_ATLAS]
const std::string convert(const std::vector< CTPRoI > &data, const bool longFormat=false) const
convert data content into string (used by dump and print)
CTPdataformatVersion m_ctpDataformat
const Header & header() const
return header
void dumpData() const
print object content to default message stream
Trailer m_CTPResultTrailer
trailer fragment in LVL1 eformat
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
Header m_CTPResultHeader
header fragment in LVL1 eformat
const std::vector< CTPRoI > & roIVec() const
return the RoI vector */
const std::string dump() const
dump raw object content to string
const Trailer & trailer() const
return trailer
CTPResult()
default constructor: empty object
ROIB::Trailer models the LVL1 ROD Trailer.
const std::string dump() const
dump raw object content to string
const std::string print(const bool longFormat=false) const
print object content in a human readable format to string
std::string head(std::string s, const std::string &pattern)
head of a string
const std::string convertToHex(const uint32_t word)
helper function to dump a number in hex format
Namespace of the LVL1 RoIB simulation.
std::bitset< 512 > convertToBitset(const std::vector< uint32_t > &words)
convert vector of unsigned int into bitset