Skip to content

Commit

Permalink
Have embedded root files send close reports
Browse files Browse the repository at this point in the history
When a file controlled by the RootEmbeddedFileSequence closes, it now informs the StatisticsSenderService.
  • Loading branch information
Dr15Jones committed Aug 30, 2021
1 parent 08f3fae commit 7c85189
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions IOPool/Input/src/RootEmbeddedFileSequence.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "Utilities/StorageFactory/interface/StatisticsSenderService.h"

#include "CLHEP/Random/RandFlat.h"

Expand Down Expand Up @@ -126,6 +127,10 @@ namespace edm {
void RootEmbeddedFileSequence::closeFile_() {
// delete the RootFile object.
if (rootFile()) {
edm::Service<edm::storage::StatisticsSenderService> service;
if (service.isAvailable()) {
service->filePreCloseEvent(lfn(), usedFallback());
}
rootFile().reset();
}
}
Expand Down

0 comments on commit 7c85189

Please sign in to comment.