19 class BranchIDListHelper;
21 class LuminosityBlockPrincipal;
29 findFileForSpecifiedID_(nullptr),
30 fileIterBegin_(fileCatalogItems().begin()),
31 fileIterEnd_(fileCatalogItems().
end()),
32 fileIter_(fileIterEnd_),
33 fileIterLastOpened_(fileIterEnd_),
35 indexesIntoFiles_(fileCatalogItems().
size()) {}
43 return rootFile()->productRegistry();
48 return rootFile()->branchIDListHelper();
55 return rootFile()->readRunAuxiliary_();
60 return rootFile()->readLuminosityBlockAuxiliary_();
65 return rootFile()->readRun_(runPrincipal);
70 return rootFile()->fillProcessBlockHelper_();
75 return rootFile()->nextProcessBlock_(processBlockPrincipal);
80 rootFile()->readProcessBlock_(processBlockPrincipal);
85 return rootFile()->readLuminosityBlock_(lumiPrincipal);
103 return rootFile()->readEvent(eventPrincipal);
117 size_t fileNameHash) {
125 std::make_unique<std::unordered_multimap<size_t, size_t>>();
126 auto hasher = std::hash<std::string>();
133 for (
auto iter =
range.first; iter !=
range.second; ++iter) {
180 std::vector<FileCatalogItem>::const_iterator currentIter =
fileIter_;
205 if (deleteIndexIntoFile) {
225 throw cms::Exception(
"LogicalFileNameNotFound",
"RootFileSequenceBase::initTheFile()\n")
226 <<
"Logical file name '" <<
logicalFileName() <<
"' was not found in the file catalog.\n" 227 <<
"If you wanted a local file, you forgot the 'file:' prefix\n" 228 <<
"before the file name in your configuration file.\n";
231 <<
" was not found in the catalog, and will be skipped.\n";
239 std::shared_ptr<InputFile> filePtr;
240 std::list<std::string> originalInfo;
242 std::vector<std::string>
const& fNames =
fileNames();
245 std::list<std::string> exInfo;
247 std::unique_ptr<InputSource::FileOpenSentry> sentry(
248 input ? std::make_unique<InputSource::FileOpenSentry>(*
input,
lfn_) :
nullptr);
253 for (std::vector<std::string>::const_iterator it = fNames.begin(); it != fNames.end(); ++it) {
255 std::unique_ptr<char[]>
name(gSystem->ExpandPathName(it->c_str()));
256 filePtr = std::make_shared<InputFile>(
name.get(),
" Initiating request to open file ", inputType);
263 ex.
addContext(
"Calling RootInputFileSequence::initTheFile()");
264 std::ostringstream
out;
265 out <<
"Input file " << (*it) <<
" could not be opened.";
268 for (
auto const&
s : exInfo)
272 exInfo.push_back(
"Calling RootInputFileSequence::initTheFile(): fail to open the file with name " + (*it));
282 rootFile_->setSignals(&(
input->preEventReadFromSourceSignal_), &(
input->postEventReadFromSourceSignal_));
292 <<
" was not found or could not be opened.\n";
295 <<
"Input file: " <<
fName <<
" was not found or could not be opened, and will be skipped.\n";
unsigned long long EventNumber_t
unsigned int LuminosityBlockNumber_t
static std::string const input
void addAdditionalInfo(std::string const &info)
void addContext(std::string const &context)
Log< level::Warning, false > LogWarning