30 std::pair<int, int> pairs;
31 std::pair<int, int> invalid{-1, -1};
34 ndigits += pairs.second;
42 std::vector<Digit>&
digits,
43 std::vector<ROFRecord>& rofs)
45 if (in.peek() == EOF) {
56 for (
auto i = 0;
i < nrofs;
i++) {
62 in.read(
reinterpret_cast<char*
>(&
bc),
sizeof(
uint16_t));
64 in.read(
reinterpret_cast<char*
>(&firstIdx),
sizeof(
uint32_t));
65 in.read(
reinterpret_cast<char*
>(&nentries),
sizeof(
uint32_t));
66 in.read(
reinterpret_cast<char*
>(&bcWidth),
sizeof(
uint32_t));
78 for (
int i = 0;
i < ndigits;
i++) {
85 in.read(
reinterpret_cast<char*
>(&tfTime),
sizeof(
uint32_t));
86 in.read(
reinterpret_cast<char*
>(&nofSamples),
sizeof(
uint16_t));
87 in.read(
reinterpret_cast<char*
>(&sat),
sizeof(
uint8_t));
88 in.read(
reinterpret_cast<char*
>(&deID),
sizeof(
uint32_t));
89 in.read(
reinterpret_cast<char*
>(&padID),
sizeof(
uint32_t));
90 in.read(
reinterpret_cast<char*
>(&
adc),
sizeof(
uint32_t));
91 digits.emplace_back(deID, padID,
adc, tfTime, nofSamples, sat > 0);
105 gsl::span<const Digit>
digits,
106 gsl::span<const ROFRecord> rofs)
115 for (
auto r : rofs) {
121 out.write(
reinterpret_cast<const char*
>(&
bc),
sizeof(
uint16_t));
122 out.write(
reinterpret_cast<const char*
>(&
orbit),
sizeof(
uint32_t));
123 out.write(
reinterpret_cast<const char*
>(&firstIdx),
sizeof(
uint32_t));
124 out.write(
reinterpret_cast<const char*
>(&nentries),
sizeof(
uint32_t));
125 out.write(
reinterpret_cast<const char*
>(&bcWidth),
sizeof(
uint32_t));
142 out.write(
reinterpret_cast<const char*
>(&tfTime),
sizeof(
uint32_t));
143 out.write(
reinterpret_cast<const char*
>(&nofSamples),
sizeof(
uint16_t));
144 out.write(
reinterpret_cast<const char*
>(&sat),
sizeof(
uint8_t));
145 out.write(
reinterpret_cast<const char*
>(&deID),
sizeof(
uint32_t));
146 out.write(
reinterpret_cast<const char*
>(&padID),
sizeof(
uint32_t));
147 out.write(
reinterpret_cast<const char*
>(&
adc),
sizeof(
uint32_t));
unsigned short int uint16_t
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events d
void count(std::istream &in, size_t &ntfs, size_t &nrofs, size_t &ndigits) override
bool read(std::istream &in, std::vector< Digit > &digits, std::vector< ROFRecord > &rofs) override
void rewind(std::istream &in)
std::pair< int, int > advanceOneEvent(std::istream &in, int fileFormatVersion)
void writeNofItems(std::ostream &out, uint32_t nofItems)
int readNofItems(std::istream &in, const char *itemName)
void rewind(std::istream &in)
bool write(std::ostream &out, gsl::span< const Digit > digits, gsl::span< const ROFRecord > rofs) override
std::vector< Digit > digits