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";
80 int nStreams =
fInputData.fvStreamStartIndices.size();
86 if (nStreams > 3000) {
87 LOG(warning) <<
"ca::DataManager: unexpected order of input data: too many data streams!!! ";
90 fInputData.fvStreamStopIndices.reset(nStreams);
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.
InputData && TakeInputData()
Takes (moves) the instance of the input data object.
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 fInputData
Object of input data.
int64_t fLastStreamId
data stream Id of the last hit added
void InitData()
Initializes data object.
void ResetInputData(HitIndex_t nHits=0) noexcept
Resets the input data block.
bool CheckInputData() const
constexpr int InputDataQaLevel
Flag: input data QA level.
unsigned int HitIndex_t
Index of ca::Hit.