13 std::set<std::string>
const& processesWithKeptProcessBlockProducts,
22 unsigned int iProcess = 0;
24 if (processesWithKeptProcessBlockProducts.find(
process) != processesWithKeptProcessBlockProducts.end()) {
58 std::vector<unsigned int> storedCacheIndices;
68 storedCacheIndices.reserve(nStoredProcesses);
69 for (
unsigned int i = 0;
i < nStoredProcesses; ++
i) {
70 storedCacheIndices.push_back(
i);
96 assert(!cacheIndices.empty());
98 unsigned int nInputProcesses = 0;
99 for (
unsigned int iStoredProcess = 0; iStoredProcess < nStoredProcesses; ++iStoredProcess) {
115 unsigned int fileOffset = 0;
119 std::vector<unsigned int> processOffset(nInputProcesses, 0);
126 assert(!nEntries.empty());
127 std::vector<unsigned int> storedProcessOffset(nInputProcesses + 1, 0);
132 std::vector<unsigned int> storedFileInProcessOffset(nInputProcesses, 0);
136 storedCacheIndices.reserve(cacheIndices.size() * nStoredProcesses);
138 unsigned int iFile = 0;
139 unsigned int innerVectorsCurrentFile = 0;
143 for (
auto const& innerVectorOfCacheIndices : cacheIndices) {
149 while (innerVectorsCurrentFile == cacheIndexVectorsPerFile[iFile]) {
152 fileOffset += cacheEntriesPerFile[iFile];
154 innerVectorsCurrentFile = 0;
156 if (innerVectorsCurrentFile == 0) {
161 ++innerVectorsCurrentFile;
166 for (
unsigned int iStoredProcess = 0; iStoredProcess < nStoredProcesses; ++iStoredProcess) {
168 if (iStoredProcess < nInputProcesses) {
173 unsigned int inputOffset = fileOffset + processOffset[iStoredProcess];
174 unsigned int storedOffset = storedProcessOffset[iStoredProcess] + storedFileInProcessOffset[iStoredProcess];
175 storedCacheIndex = cacheIndex - inputOffset + storedOffset;
180 storedCacheIndex = storedProcessOffset[nInputProcesses] + iStoredProcess - nInputProcesses;
182 storedCacheIndices.push_back(storedCacheIndex);
189 std::vector<std::vector<unsigned int>>
const& nEntries,
190 std::vector<unsigned int>& storedProcessOffset)
const {
191 unsigned int iStored = 0;
192 for (
auto&
offset : storedProcessOffset) {
195 for (
unsigned int jStored = 0; jStored < iStored; ++jStored) {
198 for (
auto const& entries : nEntries) {
199 assert(indexInEventProcessor < entries.size());
200 offset += entries[indexInEventProcessor];
208 unsigned int nInputProcesses,
209 std::vector<std::vector<unsigned int>>
const& nEntries,
210 std::vector<unsigned int>& processOffset)
const {
211 unsigned int iStored = 0;
212 for (
auto&
offset : processOffset) {
215 for (
unsigned int jProcess = 0; jProcess < iProcess; ++jProcess) {
216 offset += nEntries[iFile][jProcess];
224 unsigned int nInputProcesses,
225 std::vector<std::vector<unsigned int>>
const& nEntries,
226 std::vector<unsigned int>& storedFileInProcessOffset)
const {
227 unsigned int iStored = 0;
228 for (
auto&
offset : storedFileInProcessOffset) {
232 for (
unsigned int jFile = 0; jFile < iFile; ++jFile) {
233 assert(indexInEventProcessor < nEntries[jFile].
size());
234 offset += nEntries[jFile][indexInEventProcessor];