17 class BranchIDListHelper;
19 class LuminosityBlockPrincipal;
27 findFileForSpecifiedID_(nullptr),
28 fileIterBegin_(fileCatalogItems().
begin()),
29 fileIterEnd_(fileCatalogItems().
end()),
30 fileIter_(fileIterEnd_),
31 fileIterLastOpened_(fileIterEnd_),
33 indexesIntoFiles_(fileCatalogItems().
size()) {}
41 return rootFile()->productRegistry();
46 return rootFile()->branchIDListHelper();
53 return rootFile()->readRunAuxiliary_();
58 return rootFile()->readLuminosityBlockAuxiliary_();
68 rootFile()->readLuminosityBlock_(lumiPrincipal);
86 rootFile()->readEvent(eventPrincipal);
100 size_t fileNameHash) {
108 std::make_unique<std::unordered_multimap<size_t, size_t>>();
109 auto hasher = std::hash<std::string>();
116 for (
auto iter =
range.first; iter !=
range.second; ++iter) {
163 std::vector<FileCatalogItem>::const_iterator currentIter =
fileIter_;
188 if (deleteIndexIntoFile) {
208 throw cms::Exception(
"LogicalFileNameNotFound",
"RootFileSequenceBase::initTheFile()\n")
209 <<
"Logical file name '" <<
logicalFileName() <<
"' was not found in the file catalog.\n"
210 <<
"If you wanted a local file, you forgot the 'file:' prefix\n"
211 <<
"before the file name in your configuration file.\n";
214 <<
" was not found in the catalog, and will be skipped.\n";
221 std::shared_ptr<InputFile> filePtr;
222 std::list<std::string> originalInfo;
224 std::vector<std::string>
const& fNames =
fileNames();
227 std::list<std::string> exInfo;
228 for (std::vector<std::string>::const_iterator it = fNames.begin(); it != fNames.end(); ++it) {
230 std::unique_ptr<InputSource::FileOpenSentry> sentry(
231 input ? std::make_unique<InputSource::FileOpenSentry>(*
input,
lfn_,
false) :
nullptr);
232 std::unique_ptr<char[]>
name(gSystem->ExpandPathName(it->c_str()));
233 filePtr = std::make_shared<InputFile>(
name.get(),
" Initiating request to open file ", inputType);
239 ex.
addContext(
"Calling RootInputFileSequence::initTheFile()");
240 std::ostringstream
out;
241 out <<
"Input file " << (*it) <<
" could not be opened.";
244 for (
auto const&
s : exInfo)
248 exInfo.push_back(
"Calling RootInputFileSequence::initTheFile(): fail to open the file with name " + (*it));
257 rootFile_->setSignals(&(
input->preEventReadFromSourceSignal_), &(
input->postEventReadFromSourceSignal_));
268 <<
" was not found or could not be opened.\n";
271 <<
"Input file: " <<
fName <<
" was not found or could not be opened, and will be skipped.\n";