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_();
70 rootFile()->readLuminosityBlock_(lumiPrincipal);
88 rootFile()->readEvent(eventPrincipal);
96 return rootFile()->containsItem(run, lumi, event);
102 size_t fileNameHash) {
104 assert(fileNameHash != 0
U);
110 std::make_unique<std::unordered_multimap<size_t, size_t>>();
111 auto hasher = std::hash<std::string>();
118 for (
auto iter = range.first; iter != range.second; ++iter) {
163 if (*it && (*it)->containsItem(run, lumi, event)) {
165 std::vector<FileCatalogItem>::const_iterator currentIter =
fileIter_;
172 found =
rootFile()->setEntryAtItem(run, lumi, event);
189 if (deleteIndexIntoFile) {
209 throw cms::Exception(
"LogicalFileNameNotFound",
"RootFileSequenceBase::initTheFile()\n")
210 <<
"Logical file name '" <<
logicalFileName() <<
"' was not found in the file catalog.\n" 211 <<
"If you wanted a local file, you forgot the 'file:' prefix\n" 212 <<
"before the file name in your configuration file.\n";
215 <<
" was not found in the catalog, and will be skipped.\n";
227 std::shared_ptr<InputFile> filePtr;
228 std::list<std::string> originalInfo;
230 std::unique_ptr<InputSource::FileOpenSentry> sentry(
231 input ? std::make_unique<InputSource::FileOpenSentry>(*input,
lfn_,
false) :
nullptr);
237 std::unique_ptr<char[]>
name(gSystem->ExpandPathName(
fileName().c_str()));
238 filePtr = std::make_shared<InputFile>(
name.get(),
" Initiating request to open file ", inputType);
241 if (hasFallbackUrl) {
242 std::ostringstream
out;
252 ex.
addContext(
"Calling RootFileSequenceBase::initTheFile()");
253 std::ostringstream
out;
254 out <<
"Input file " <<
fileName() <<
" could not be opened.";
260 if (!filePtr && (hasFallbackUrl)) {
263 std::unique_ptr<char[]> fallbackFullName(gSystem->ExpandPathName(
fallbackFileName().c_str()));
264 filePtr.reset(
new InputFile(fallbackFullName.get(),
" Fallback request to file ", inputType));
269 ex.
addContext(
"Calling RootFileSequenceBase::initTheFile()");
270 std::ostringstream
out;
271 out <<
"Input file " <<
fileName() <<
" could not be opened.\n";
272 out <<
"Fallback Input file " <<
fallbackFileName() <<
" also could not be opened.";
273 if (!originalInfo.empty()) {
274 out << std::endl <<
"Original exception info is above; fallback exception info is below.";
276 for (
auto const&
s : originalInfo) {
301 <<
" was not found or could not be opened.\n";
303 LogWarning(
"") <<
"Input file: " <<
fileName() <<
" was not found or could not be opened, and will be skipped.\n";
virtual std::string explainSelf() const
unsigned long long EventNumber_t
unsigned int LuminosityBlockNumber_t
std::list< std::string > const & additionalInfo() const
static std::string const input
void addAdditionalInfo(std::string const &info)
void openingFile(std::string const &lfn, edm::InputType type, size_t size=-1)
void closedFile(std::string const &lfn, bool usedFallback)
void addContext(std::string const &context)