15 : dirIPBB_(iConfig.getParameter<
string>(
"DirIPBB")),
16 runTime_(iConfig.getParameter<double>(
"RunTime")),
17 dirIn_(dirIPBB_ +
"in.txt"),
18 dirOut_(dirIPBB_ +
"out.txt"),
19 dirPre_(dirIPBB_ +
"pre.txt"),
20 dirDiff_(dirIPBB_ +
"diff.txt"),
21 numFrames_(
setup->numFramesIO()),
22 numFramesInfra_(
setup->numFramesInfra()),
23 numRegions_(
setup->numRegions()) {}
46 const int voidChannel = numChannel % quad == 0 ? 0 : quad - numChannel % quad;
48 ss <<
header(numChannel + voidChannel);
55 ss <<
infraGap(nFrame, numChannel + voidChannel);
59 for (
int channel = 0; channel < numChannel; channel++) {
60 const vector<Frame>& bvs =
bits[
offset + channel];
63 for (
int channel = 0; channel < voidChannel; channel++)
81 <<
"us' -do 'quit' &> /dev/null";
82 system(
cmd.str().c_str());
113 ss <<
"Board CMSSW" << endl
114 <<
"Metadata: (strobe,) start of orbit, start of packet, end of packet, valid" << endl
118 for (
int link = 0; link < numLinks; link++)
119 ss <<
" " << setfill(
'0') << setw(3) << link <<
" ";
129 for (
int link = 0; link < numLinks; link++)
139 ss <<
"Frame " << setfill(
'0') << setw(4) << nFrame++ <<
" ";
146 ss << (
first ?
" 1001 " :
" 0001 ") << setfill(
'0') << setw(
TTBV::S_ / 4) << std::hex << bv.to_ullong();
std::bitset< TTBV::S_ > Frame
void convert(const std::vector< std::vector< tt::Frame >> &bits, std::stringstream &ss) const
Class to process and provide run-time constants used by Track Trigger emulators.
bool analyze(const std::vector< std::vector< tt::Frame >> &input, const std::vector< std::vector< tt::Frame >> &output) const
static std::string const input
void sim(const std::stringstream &ss) const
std::string header(int numChannel) const
std::string infraGap(int &nFrame, int numChannel) const
bool compare(std::stringstream &ss) const
std::string frame(int &nFrame) const
std::string hex(const tt::Frame &bv, bool first=false) const