Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12_2_X] Set usedFallback properly, silence file closing printouts in StatisticsSenderService #36425

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions IOPool/Input/src/RootInputFileSequence.cc
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ namespace edm {

lfn_ = logicalFileName().empty() ? fileNames()[0] : logicalFileName();
lfnHash_ = std::hash<std::string>()(lfn_);
usedFallback_ = false;

std::shared_ptr<InputFile> filePtr;
std::list<std::string> originalInfo;
Expand All @@ -253,6 +254,7 @@ namespace edm {
try {
std::unique_ptr<char[]> name(gSystem->ExpandPathName(it->c_str()));
filePtr = std::make_shared<InputFile>(name.get(), " Initiating request to open file ", inputType);
usedFallback_ = (it != fNames.begin());
break;
} catch (cms::Exception const& e) {
if (!skipBadFiles && std::next(it) == fNames.end()) {
Expand Down
10 changes: 6 additions & 4 deletions Utilities/StorageFactory/src/StatisticsSenderService.cc
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,12 @@ void StatisticsSenderService::closedFile(std::string const &url, bool usedFallba
}

auto c = --found->second.m_openCount;
if (c == 0) {
edm::LogWarning("StatisticsSenderService") << "fully closed: " << *lfn << "\n";
} else {
edm::LogWarning("StatisticsSenderService") << "partially closed: " << *lfn << "\n";
if (m_debug) {
if (c == 0) {
edm::LogWarning("StatisticsSenderService") << "fully closed: " << *lfn << "\n";
} else {
edm::LogWarning("StatisticsSenderService") << "partially closed: " << *lfn << "\n";
}
}
} else if (m_debug) {
edm::LogWarning("StatisticsSenderService") << "closed: unknown url name " << url << "\n";
Expand Down