12#include <boost/archive/binary_iarchive.hpp>
13#include <boost/archive/binary_oarchive.hpp>
43 LOG(info) <<
"L1: Input data will be read from file \"" << fileName <<
"\"";
46 std::ifstream ifs(fileName, std::ios::binary);
48 LOG(fatal) <<
"L1: input data reader: data file \"" << fileName <<
"\" was not found";
53 boost::archive::binary_iarchive ia(ifs);
56 catch (
const std::exception&) {
57 LOG(fatal) <<
"L1: input data reader: data file \"" << fileName <<
"\" has incorrect data format or was corrupted";
68 fInputData.fvStreamStartIndices.reserve(2000);
69 fInputData.fvStreamStopIndices.reserve(2000);
70 fInputData.fvHits.reserve(nHits);
86 if (nStreams > 3000) {
87 LOG(warning) <<
"ca::DataManager: unexpected order of input data: too many data streams!!! ";
91 for (
int i = 0; i < nStreams - 1; i++) {
105 LOG(error) <<
"ca::DataManager: input data writer: attempt to write invalid input data object to file \""
112 std::ofstream ofs(fileName, std::ios::binary);
114 LOG(error) <<
"ca::DataManager: input data writer: failed opening file \"" << fileName
115 <<
" for writing input data\"";
120 boost::archive::binary_oarchive oa(ofs);
Input-output data manager for L1 tracking algorithm.
A manager for the input-output data of the CA tracking algorithm.
void ReadInputData(const std::string &fileName)
Reads input data object from boost-serialized binary file.
void WriteInputData(const std::string &fileName) const
Writes input data object to boost-serialized binary file.
InputData && TakeInputData()
Takes (moves) the instance of the input data object.
InputData fInputData
Object of input data.
void InitData()
Initializes data object.
void ResetInputData(HitIndex_t nHits=0) noexcept
Resets the input data block.
bool CheckInputData() const
void shrink(std::size_t count)
Reduces the vector to a given size.
void push_back(Tinput value)
Pushes back a value to the vector.
void reset(std::size_t count, Tinput... value)
Clears vector and resizes it to the selected size with selected values.
constexpr int InputDataQaLevel
Flag: input data QA level.
unsigned int HitIndex_t
Index of ca::Hit.