Classes | Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
art::RootOutput Class Referencefinal
Inheritance diagram for art::RootOutput:
art::OutputModule art::Observer art::detail::SharedModule art::ModuleBase

Classes

struct  Config
 

Public Types

using Parameters = fhicl::WrappedTable< Config, Config::KeysToIgnore >
 
- Public Types inherited from art::OutputModule
using ModuleType = OutputModule
 
using WorkerType = OutputWorker
 
using PluginCollection_t = std::vector< std::unique_ptr< FileCatalogMetadataPlugin >>
 

Public Member Functions

 ~RootOutput ()
 
 RootOutput (Parameters const &)
 
 RootOutput (RootOutput const &)=delete
 
 RootOutput (RootOutput &&)=delete
 
RootOutputoperator= (RootOutput const &)=delete
 
RootOutputoperator= (RootOutput &&)=delete
 
void postSelectProducts () override
 
void beginJob () override
 
void endJob () override
 
void beginRun (RunPrincipal const &) override
 
void endRun (RunPrincipal const &) override
 
void beginSubRun (SubRunPrincipal const &) override
 
void endSubRun (SubRunPrincipal const &) override
 
void event (EventPrincipal const &) override
 
- Public Member Functions inherited from art::OutputModule
virtual ~OutputModule () noexcept
 
 OutputModule (fhicl::ParameterSet const &pset)
 
 OutputModule (fhicl::TableFragment< Config > const &pset, fhicl::ParameterSet const &containing_pset)
 
 OutputModule (OutputModule const &)=delete
 
 OutputModule (OutputModule &&)=delete
 
OutputModuleoperator= (OutputModule const &)=delete
 
OutputModuleoperator= (OutputModule &&)=delete
 
int maxEvents () const
 
int remainingEvents () const
 
bool fileIsOpen () const
 
OutputFileStatus fileStatus () const
 
SelectionsArray const & keptProducts () const
 
bool selected (BranchDescription const &) const
 
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch () const
 
void selectProducts (ProductTables const &)
 
void doSelectProducts (ProductTables const &)
 
void registerProducts (ProductDescriptions &, ModuleDescription const &)
 
BranchChildren const & branchChildren () const
 
- Public Member Functions inherited from art::Observer
 ~Observer () noexcept
 
 Observer (Observer const &)=delete
 
 Observer (Observer &&)=delete
 
Observeroperator= (Observer const &)=delete
 
Observeroperator= (Observer &&)=delete
 
void registerProducts (ProductDescriptions &, ModuleDescription const &)
 
void fillDescriptions (ModuleDescription const &)
 
std::string const & processName () const
 
bool wantAllEvents () const
 
bool wantEvent (Event const &e)
 
fhicl::ParameterSetID selectorConfig () const
 
Handle< TriggerResultsgetTriggerResults (Event const &e) const
 
- Public Member Functions inherited from art::ModuleBase
virtual ~ModuleBase () noexcept
 
 ModuleBase ()
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 
- Public Member Functions inherited from art::detail::SharedModule
 SharedModule ()
 
 SharedModule (std::string const &moduleLabel)
 
 ~SharedModule () noexcept
 
hep::concurrency::SerialTaskQueueChain * serialTaskQueueChain () const
 
void createQueues ()
 
template<BranchType BT = InEvent, typename... T>
void serialize (T const &...)
 
template<BranchType BT = InEvent>
void async ()
 
template<BranchType , typename... T>
void serialize (T const &...resources)
 

Static Public Attributes

static constexpr char const * default_tmpDir {"<parent-path-of-filename>"}
 

Private Member Functions

string fileNameAtOpen () const
 
string fileNameAtClose (string const &currentFileName)
 
string const & lastClosedFileName () const override
 
Granularity fileGranularity () const override
 
void openFile (FileBlock const &) override
 
void respondToOpenInputFile (FileBlock const &) override
 
void readResults (ResultsPrincipal const &resp) override
 
void respondToCloseInputFile (FileBlock const &) override
 
void incrementInputFileNumber () override
 
void write (EventPrincipal &) override
 
void writeSubRun (SubRunPrincipal &) override
 
void writeRun (RunPrincipal &) override
 
void setSubRunAuxiliaryRangeSetID (RangeSet const &) override
 
void setRunAuxiliaryRangeSetID (RangeSet const &) override
 
bool isFileOpen () const override
 
void setFileStatus (OutputFileStatus) override
 
bool requestsToCloseFile () const override
 
void startEndFile () override
 
void writeFileFormatVersion () override
 
void writeFileIndex () override
 
void writeEventHistory () override
 
void writeProcessConfigurationRegistry () override
 
void writeProcessHistoryRegistry () override
 
void writeParameterSetRegistry () override
 
void writeProductDescriptionRegistry () override
 
void writeParentageRegistry () override
 
void doWriteFileCatalogMetadata (FileCatalogMetadata::collection_type const &md, FileCatalogMetadata::collection_type const &ssmd) override
 
void writeProductDependencies () override
 
void finishEndFile () override
 
void doRegisterProducts (ProductDescriptions &productsToProduce, ModuleDescription const &md) override
 
void doOpenFile ()
 

Private Attributes

RecursiveMutex mutex_
 
string const catalog_
 
bool dropAllEvents_
 
bool dropAllSubRuns_
 
string const moduleLabel_
 
int inputFileCount_
 
unique_ptr< RootOutputFilerootOutputFile_
 
FileStatsCollector fstats_
 
PostCloseFileRenamer fRenamer_
 
string const filePattern_
 
string tmpDir_
 
string lastClosedFileName_ {}
 
int const compressionLevel_
 
int64_t const saveMemoryObjectThreshold_
 
int64_t const treeMaxVirtualSize_
 
int const splitLevel_
 
int const basketSize_
 
DropMetaData dropMetaData_
 
bool dropMetaDataForDroppedData_
 
bool fastCloningEnabled_
 
bool writeParameterSets_
 
ClosingCriteria fileProperties_
 
ProductDescriptions productsToProduce_
 
ProductTables producedResultsProducts_
 
RPManager rpm_
 

Additional Inherited Members

- Protected Member Functions inherited from art::Observer
 Observer (fhicl::ParameterSet const &config)
 
 Observer (std::vector< std::string > const &paths, fhicl::ParameterSet const &config)
 
detail::ProcessAndEventSelectorsprocessAndEventSelectors ()
 

Detailed Description

Definition at line 56 of file RootOutput_module.cc.

Member Typedef Documentation

Definition at line 114 of file RootOutput_module.cc.

Constructor & Destructor Documentation

art::RootOutput::~RootOutput ( )
default
art::RootOutput::RootOutput ( Parameters const &  config)
explicit

Definition at line 209 of file RootOutput_module.cc.

210  : OutputModule{config().omConfig, config.get_PSet()}
211  , mutex_{"RootOutput::mutex_"}
212  , catalog_{config().catalog()}
213  , dropAllEvents_{false}
214  , dropAllSubRuns_{config().dropAllSubRuns()}
215  , moduleLabel_{config.get_PSet().get<string>("module_label")}
216  , inputFileCount_{0}
217  , rootOutputFile_{}
219  , fRenamer_{fstats_}
220  , filePattern_{config().omConfig().fileName()}
222  config().tmpDir()}
224  , compressionLevel_{config().compressionLevel()}
225  , saveMemoryObjectThreshold_{config().saveMemoryObjectThreshold()}
226  , treeMaxVirtualSize_{config().treeMaxVirtualSize()}
227  , splitLevel_{config().splitLevel()}
228  , basketSize_{config().basketSize()}
229  , dropMetaData_{config().dropMetaData()}
230  , dropMetaDataForDroppedData_{config().dropMetaDataForDroppedData()}
231  , fastCloningEnabled_{true}
232  , writeParameterSets_{config().writeParameterSets()}
233  , fileProperties_{(
235  config.get_PSet().has_key(config().fileProperties.name()),
236  filePattern_),
237  config().fileProperties())}
240  , rpm_{config.get_PSet()}
241  {
242  bool const dropAllEventsSet{config().dropAllEvents(dropAllEvents_)};
244  dropAllEventsSet, dropAllEvents_, dropAllSubRuns_);
245  // N.B. Any time file switching is enabled at a boundary other than
246  // InputFile, fastCloningEnabled_ ***MUST*** be deactivated. This is
247  // to ensure that the Event tree from the InputFile is not
248  // accidentally cloned to the output file before the output
249  // module has seen the events that are going to be processed.
250  bool const fastCloningSet{config().fastCloning(fastCloningEnabled_)};
253  if (!writeParameterSets_) {
254  mf::LogWarning("PROVENANCE")
255  << "Output module " << moduleLabel_
256  << " has parameter writeParameterSets set to false.\n"
257  << "Parameter set provenance will not be available in subsequent "
258  "jobs.\n"
259  << "Check your experiment's policy on this issue to avoid future "
260  "problems\n"
261  << "with analysis reproducibility.\n";
262  }
263  }
std::string const & processName() const
Definition: Observer.cc:66
string const catalog_
ClosingCriteria fileProperties_
FileStatsCollector fstats_
PostCloseFileRenamer fRenamer_
void validateFileNamePattern(bool do_check, std::string const &pattern)
static constexpr char const * default_tmpDir
int64_t const treeMaxVirtualSize_
ProductDescriptions productsToProduce_
DropMetaData dropMetaData_
static bool shouldFastClone(bool const fastCloningSet, bool const fastCloning, bool const wantAllEvents, ClosingCriteria const &cc)
int const compressionLevel_
RecursiveMutex mutex_
string const filePattern_
OutputModule(fhicl::ParameterSet const &pset)
Definition: OutputModule.cc:81
int64_t const saveMemoryObjectThreshold_
static ProductTables invalid()
std::string parent_path(std::string const &path)
Definition: parent_path.cc:15
bool wantAllEvents() const
Definition: Observer.cc:72
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
ProductTables producedResultsProducts_
bool shouldDropEvents(bool const dropAllEventsSet, bool const dropAllEvents, bool const dropAllSubRuns)
string const moduleLabel_
unique_ptr< RootOutputFile > rootOutputFile_
art::RootOutput::RootOutput ( RootOutput const &  )
delete
art::RootOutput::RootOutput ( RootOutput &&  )
delete

Member Function Documentation

void art::RootOutput::beginJob ( )
overridevirtual

Reimplemented from art::OutputModule.

Definition at line 604 of file RootOutput_module.cc.

605  {
606  RecursiveMutexSentry sentry{mutex_, __func__};
608  }
RecursiveMutex mutex_
void invoke(invoke_function_t< void, ARGS... > mfunc, ARGS &&...args)
Definition: RPManager.h:41
void art::RootOutput::beginRun ( RunPrincipal const &  rp)
overridevirtual

Reimplemented from art::OutputModule.

Definition at line 639 of file RootOutput_module.cc.

640  {
641  RecursiveMutexSentry sentry{mutex_, __func__};
642  rpm_.for_each_RPWorker([&rp](RPWorker& w) { w.rp().doBeginRun(rp); });
643  }
void for_each_RPWorker(on_rpworker_t wfunc)
Definition: RPManager.cc:116
RecursiveMutex mutex_
void art::RootOutput::beginSubRun ( SubRunPrincipal const &  srp)
overridevirtual

Reimplemented from art::OutputModule.

Definition at line 625 of file RootOutput_module.cc.

626  {
627  RecursiveMutexSentry sentry{mutex_, __func__};
628  rpm_.for_each_RPWorker([&srp](RPWorker& w) { w.rp().doBeginSubRun(srp); });
629  }
void for_each_RPWorker(on_rpworker_t wfunc)
Definition: RPManager.cc:116
RecursiveMutex mutex_
void art::RootOutput::doOpenFile ( )
private

Definition at line 553 of file RootOutput_module.cc.

554  {
555  RecursiveMutexSentry sentry{mutex_, __func__};
556  if (inputFileCount_ == 0) {
558  << "Attempt to open output file before input file. "
559  << "Please report this to the core framework developers.\n";
560  }
561  rootOutputFile_ = make_unique<RootOutputFile>(this,
562  fileNameAtOpen(),
567  splitLevel_,
568  basketSize_,
573  detail::logFileAction("Opened output file with pattern ", filePattern_);
574  }
ClosingCriteria fileProperties_
string fileNameAtOpen() const
FileStatsCollector fstats_
void logFileAction(const char *msg, std::string const &file)
Definition: logFileAction.cc:9
int64_t const treeMaxVirtualSize_
DropMetaData dropMetaData_
int const compressionLevel_
RecursiveMutex mutex_
string const filePattern_
int64_t const saveMemoryObjectThreshold_
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
unique_ptr< RootOutputFile > rootOutputFile_
void art::RootOutput::doRegisterProducts ( ProductDescriptions productsToProduce,
ModuleDescription const &  md 
)
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 491 of file RootOutput_module.cc.

493  {
494  RecursiveMutexSentry sentry{mutex_, __func__};
495  // Register Results products from ResultsProducers.
496  rpm_.for_each_RPWorker([&producedProducts, &md](RPWorker& w) {
497  auto const& params = w.params();
498  w.setModuleDescription(
499  ModuleDescription{params.rpPSetID,
500  params.rpPluginType,
501  md.moduleLabel() + '#' + params.rpLabel,
503  md.processConfiguration()});
504  w.rp().registerProducts(producedProducts, w.moduleDescription());
505  });
506  // Form product table for Results products. We do this here so we
507  // can appropriately set the product tables for the
508  // ResultsPrincipal.
509  productsToProduce_ = producedProducts;
511  }
void for_each_RPWorker(on_rpworker_t wfunc)
Definition: RPManager.cc:116
ProductDescriptions productsToProduce_
RecursiveMutex mutex_
ProductTables producedResultsProducts_
void art::RootOutput::doWriteFileCatalogMetadata ( FileCatalogMetadata::collection_type const &  md,
FileCatalogMetadata::collection_type const &  ssmd 
)
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 462 of file RootOutput_module.cc.

465  {
466  RecursiveMutexSentry sentry{mutex_, __func__};
467  rootOutputFile_->writeFileCatalogMetadata(fstats_, md, ssmd);
468  }
FileStatsCollector fstats_
RecursiveMutex mutex_
unique_ptr< RootOutputFile > rootOutputFile_
void art::RootOutput::endJob ( )
overridevirtual

Reimplemented from art::OutputModule.

Definition at line 611 of file RootOutput_module.cc.

612  {
613  RecursiveMutexSentry sentry{mutex_, __func__};
615  }
RecursiveMutex mutex_
void invoke(invoke_function_t< void, ARGS... > mfunc, ARGS &&...args)
Definition: RPManager.h:41
void art::RootOutput::endRun ( RunPrincipal const &  rp)
overridevirtual

Reimplemented from art::OutputModule.

Definition at line 646 of file RootOutput_module.cc.

647  {
648  RecursiveMutexSentry sentry{mutex_, __func__};
649  rpm_.for_each_RPWorker([&rp](RPWorker& w) { w.rp().doEndRun(rp); });
650  }
void for_each_RPWorker(on_rpworker_t wfunc)
Definition: RPManager.cc:116
RecursiveMutex mutex_
void art::RootOutput::endSubRun ( SubRunPrincipal const &  srp)
overridevirtual

Reimplemented from art::OutputModule.

Definition at line 632 of file RootOutput_module.cc.

633  {
634  RecursiveMutexSentry sentry{mutex_, __func__};
635  rpm_.for_each_RPWorker([&srp](RPWorker& w) { w.rp().doEndSubRun(srp); });
636  }
void for_each_RPWorker(on_rpworker_t wfunc)
Definition: RPManager.cc:116
RecursiveMutex mutex_
void art::RootOutput::event ( EventPrincipal const &  ep)
overridevirtual

Reimplemented from art::OutputModule.

Definition at line 618 of file RootOutput_module.cc.

619  {
620  RecursiveMutexSentry sentry{mutex_, __func__};
621  rpm_.for_each_RPWorker([&ep](RPWorker& w) { w.rp().doEvent(ep); });
622  }
void for_each_RPWorker(on_rpworker_t wfunc)
Definition: RPManager.cc:116
RecursiveMutex mutex_
Granularity art::RootOutput::fileGranularity ( ) const
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 546 of file RootOutput_module.cc.

547  {
548  RecursiveMutexSentry sentry{mutex_, __func__};
549  return fileProperties_.granularity();
550  }
Granularity granularity() const
ClosingCriteria fileProperties_
RecursiveMutex mutex_
string art::RootOutput::fileNameAtClose ( std::string const &  currentFileName)
private

Definition at line 585 of file RootOutput_module.cc.

586  {
587  return (filePattern_ == dev_null) ?
588  dev_null :
589  fRenamer_.maybeRenameFile(currentFileName, filePattern_);
590  }
PostCloseFileRenamer fRenamer_
string const filePattern_
std::string maybeRenameFile(std::string const &inPath, std::string const &toPattern)
string art::RootOutput::fileNameAtOpen ( ) const
private

Definition at line 577 of file RootOutput_module.cc.

578  {
579  return (filePattern_ == dev_null) ?
580  dev_null :
581  unique_filename(tmpDir_ + "/RootOutput");
582  }
std::string unique_filename(std::string stem, std::string extension=".root")
string const filePattern_
void art::RootOutput::finishEndFile ( )
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 478 of file RootOutput_module.cc.

479  {
480  RecursiveMutexSentry sentry{mutex_, __func__};
481  string const currentFileName{rootOutputFile_->currentFileName()};
482  rootOutputFile_->writeTTrees();
483  rootOutputFile_.reset();
485  lastClosedFileName_ = fileNameAtClose(currentFileName);
486  detail::logFileAction("Closed output file ", lastClosedFileName_);
488  }
FileStatsCollector fstats_
void logFileAction(const char *msg, std::string const &file)
Definition: logFileAction.cc:9
string fileNameAtClose(string const &currentFileName)
RecursiveMutex mutex_
void invoke(invoke_function_t< void, ARGS... > mfunc, ARGS &&...args)
Definition: RPManager.h:41
unique_ptr< RootOutputFile > rootOutputFile_
void art::RootOutput::incrementInputFileNumber ( )
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 530 of file RootOutput_module.cc.

531  {
532  RecursiveMutexSentry sentry{mutex_, __func__};
533  if (isFileOpen()) {
534  rootOutputFile_->incrementInputFileNumber();
535  }
536  }
bool isFileOpen() const override
RecursiveMutex mutex_
unique_ptr< RootOutputFile > rootOutputFile_
bool art::RootOutput::isFileOpen ( ) const
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 523 of file RootOutput_module.cc.

524  {
525  RecursiveMutexSentry sentry{mutex_, __func__};
526  return rootOutputFile_.get() != nullptr;
527  }
RecursiveMutex mutex_
unique_ptr< RootOutputFile > rootOutputFile_
string const & art::RootOutput::lastClosedFileName ( ) const
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 593 of file RootOutput_module.cc.

594  {
595  RecursiveMutexSentry sentry{mutex_, __func__};
596  if (lastClosedFileName_.empty()) {
597  throw Exception(errors::LogicError, "RootOutput::currentFileName(): ")
598  << "called before meaningful.\n";
599  }
600  return lastClosedFileName_;
601  }
RecursiveMutex mutex_
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
void art::RootOutput::openFile ( FileBlock const &  fb)
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 266 of file RootOutput_module.cc.

267  {
268  RecursiveMutexSentry sentry{mutex_, __func__};
269  // Note: The file block here refers to the currently open
270  // input file, so we can find out about the available
271  // products by looping over the branches of the input
272  // file data trees.
273  if (!isFileOpen()) {
274  doOpenFile();
276  }
277  }
bool isFileOpen() const override
RecursiveMutex mutex_
void respondToOpenInputFile(FileBlock const &) override
RootOutput& art::RootOutput::operator= ( RootOutput const &  )
delete
RootOutput& art::RootOutput::operator= ( RootOutput &&  )
delete
void art::RootOutput::postSelectProducts ( )
overridevirtual

Reimplemented from art::OutputModule.

Definition at line 280 of file RootOutput_module.cc.

281  {
282  RecursiveMutexSentry sentry{mutex_, __func__};
283  if (isFileOpen()) {
284  rootOutputFile_->selectProducts();
285  }
286  }
bool isFileOpen() const override
RecursiveMutex mutex_
unique_ptr< RootOutputFile > rootOutputFile_
void art::RootOutput::readResults ( ResultsPrincipal const &  resp)
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 317 of file RootOutput_module.cc.

318  {
319  RecursiveMutexSentry sentry{mutex_, __func__};
321  [&resp](RPWorker& w) { w.rp().doReadResults(resp); });
322  }
void for_each_RPWorker(on_rpworker_t wfunc)
Definition: RPManager.cc:116
RecursiveMutex mutex_
bool art::RootOutput::requestsToCloseFile ( ) const
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 539 of file RootOutput_module.cc.

540  {
541  RecursiveMutexSentry sentry{mutex_, __func__};
542  return isFileOpen() ? rootOutputFile_->requestsToCloseFile() : false;
543  }
bool isFileOpen() const override
RecursiveMutex mutex_
unique_ptr< RootOutputFile > rootOutputFile_
void art::RootOutput::respondToCloseInputFile ( FileBlock const &  fb)
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 325 of file RootOutput_module.cc.

326  {
327  RecursiveMutexSentry sentry{mutex_, __func__};
328  if (isFileOpen()) {
329  rootOutputFile_->respondToCloseInputFile(fb);
330  }
331  }
bool isFileOpen() const override
RecursiveMutex mutex_
unique_ptr< RootOutputFile > rootOutputFile_
void art::RootOutput::respondToOpenInputFile ( FileBlock const &  fb)
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 289 of file RootOutput_module.cc.

290  {
291  RecursiveMutexSentry sentry{mutex_, __func__};
292  ++inputFileCount_;
293  if (!isFileOpen()) {
294  return;
295  }
296  auto const* rfb = dynamic_cast<RootFileBlock const*>(&fb);
297  bool fastCloneThisOne = fastCloningEnabled_ && rfb &&
298  (rfb->tree() != nullptr) &&
299  ((remainingEvents() < 0) ||
300  (remainingEvents() >= rfb->tree()->GetEntries()));
301  if (fastCloningEnabled_ && !fastCloneThisOne) {
302  mf::LogWarning("FastCloning")
303  << "Fast cloning deactivated for this input file due to "
304  << "empty event tree and/or event limits.";
305  }
306  if (fastCloneThisOne && !rfb->fastClonable()) {
307  mf::LogWarning("FastCloning")
308  << "Fast cloning deactivated for this input file due to "
309  << "information in FileBlock.";
310  fastCloneThisOne = false;
311  }
312  rootOutputFile_->beginInputFile(rfb, fastCloneThisOne);
313  fstats_.recordInputFile(fb.fileName());
314  }
FileStatsCollector fstats_
bool isFileOpen() const override
RecursiveMutex mutex_
void recordInputFile(std::string const &inputFileName)
int remainingEvents() const
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
unique_ptr< RootOutputFile > rootOutputFile_
void art::RootOutput::setFileStatus ( OutputFileStatus  ofs)
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 514 of file RootOutput_module.cc.

515  {
516  RecursiveMutexSentry sentry{mutex_, __func__};
517  if (isFileOpen()) {
518  rootOutputFile_->setFileStatus(ofs);
519  }
520  }
bool isFileOpen() const override
RecursiveMutex mutex_
unique_ptr< RootOutputFile > rootOutputFile_
void art::RootOutput::setRunAuxiliaryRangeSetID ( RangeSet const &  rs)
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 369 of file RootOutput_module.cc.

370  {
371  RecursiveMutexSentry sentry{mutex_, __func__};
372  rootOutputFile_->setRunAuxiliaryRangeSetID(rs);
373  }
RecursiveMutex mutex_
unique_ptr< RootOutputFile > rootOutputFile_
void art::RootOutput::setSubRunAuxiliaryRangeSetID ( RangeSet const &  rs)
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 348 of file RootOutput_module.cc.

349  {
350  RecursiveMutexSentry sentry{mutex_, __func__};
351  rootOutputFile_->setSubRunAuxiliaryRangeSetID(rs);
352  }
RecursiveMutex mutex_
unique_ptr< RootOutputFile > rootOutputFile_
void art::RootOutput::startEndFile ( )
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 387 of file RootOutput_module.cc.

388  {
389  RecursiveMutexSentry sentry{mutex_, __func__};
390  auto resp = make_unique<ResultsPrincipal>(
391  ResultsAuxiliary{}, moduleDescription().processConfiguration(), nullptr);
392  resp->createGroupsForProducedProducts(producedResultsProducts_);
393  resp->enableLookupOfProducedProducts(producedResultsProducts_);
396  resp->addToProcessHistory();
397  }
399  [&resp](RPWorker& w) { w.rp().doWriteResults(*resp); });
400  rootOutputFile_->writeResults(*resp);
401  }
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch() const
auto const & descriptions(BranchType const bt) const
Definition: ProductTables.h:41
void for_each_RPWorker(on_rpworker_t wfunc)
Definition: RPManager.cc:116
RecursiveMutex mutex_
ProcessConfiguration const & processConfiguration() const
ProductTables producedResultsProducts_
unique_ptr< RootOutputFile > rootOutputFile_
ModuleDescription const & moduleDescription() const
Definition: ModuleBase.cc:30
void art::RootOutput::write ( EventPrincipal ep)
overrideprivatevirtual

Implements art::OutputModule.

Definition at line 334 of file RootOutput_module.cc.

335  {
336  RecursiveMutexSentry sentry{mutex_, __func__};
337  if (dropAllEvents_) {
338  return;
339  }
341  ep.addToProcessHistory();
342  }
343  rootOutputFile_->writeOne(ep);
344  fstats_.recordEvent(ep.eventID());
345  }
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch() const
FileStatsCollector fstats_
void recordEvent(EventID const &id)
RecursiveMutex mutex_
unique_ptr< RootOutputFile > rootOutputFile_
void art::RootOutput::writeEventHistory ( )
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 418 of file RootOutput_module.cc.

419  {
420  RecursiveMutexSentry sentry{mutex_, __func__};
421  rootOutputFile_->writeEventHistory();
422  }
RecursiveMutex mutex_
unique_ptr< RootOutputFile > rootOutputFile_
void art::RootOutput::writeFileFormatVersion ( )
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 404 of file RootOutput_module.cc.

405  {
406  RecursiveMutexSentry sentry{mutex_, __func__};
407  rootOutputFile_->writeFileFormatVersion();
408  }
RecursiveMutex mutex_
unique_ptr< RootOutputFile > rootOutputFile_
void art::RootOutput::writeFileIndex ( )
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 411 of file RootOutput_module.cc.

412  {
413  RecursiveMutexSentry sentry{mutex_, __func__};
414  rootOutputFile_->writeFileIndex();
415  }
RecursiveMutex mutex_
unique_ptr< RootOutputFile > rootOutputFile_
void art::RootOutput::writeParameterSetRegistry ( )
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 439 of file RootOutput_module.cc.

440  {
441  RecursiveMutexSentry sentry{mutex_, __func__};
442  if (writeParameterSets_) {
443  rootOutputFile_->writeParameterSetRegistry();
444  }
445  }
RecursiveMutex mutex_
unique_ptr< RootOutputFile > rootOutputFile_
void art::RootOutput::writeParentageRegistry ( )
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 455 of file RootOutput_module.cc.

456  {
457  RecursiveMutexSentry sentry{mutex_, __func__};
458  rootOutputFile_->writeParentageRegistry();
459  }
RecursiveMutex mutex_
unique_ptr< RootOutputFile > rootOutputFile_
void art::RootOutput::writeProcessConfigurationRegistry ( )
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 425 of file RootOutput_module.cc.

426  {
427  RecursiveMutexSentry sentry{mutex_, __func__};
428  rootOutputFile_->writeProcessConfigurationRegistry();
429  }
RecursiveMutex mutex_
unique_ptr< RootOutputFile > rootOutputFile_
void art::RootOutput::writeProcessHistoryRegistry ( )
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 432 of file RootOutput_module.cc.

433  {
434  RecursiveMutexSentry sentry{mutex_, __func__};
435  rootOutputFile_->writeProcessHistoryRegistry();
436  }
RecursiveMutex mutex_
unique_ptr< RootOutputFile > rootOutputFile_
void art::RootOutput::writeProductDependencies ( )
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 471 of file RootOutput_module.cc.

472  {
473  RecursiveMutexSentry sentry{mutex_, __func__};
474  rootOutputFile_->writeProductDependencies();
475  }
RecursiveMutex mutex_
unique_ptr< RootOutputFile > rootOutputFile_
void art::RootOutput::writeProductDescriptionRegistry ( )
overrideprivatevirtual

Reimplemented from art::OutputModule.

Definition at line 448 of file RootOutput_module.cc.

449  {
450  RecursiveMutexSentry sentry{mutex_, __func__};
451  rootOutputFile_->writeProductDescriptionRegistry();
452  }
RecursiveMutex mutex_
unique_ptr< RootOutputFile > rootOutputFile_
void art::RootOutput::writeRun ( RunPrincipal rp)
overrideprivatevirtual

Implements art::OutputModule.

Definition at line 376 of file RootOutput_module.cc.

377  {
378  RecursiveMutexSentry sentry{mutex_, __func__};
379  if (hasNewlyDroppedBranch()[InRun]) {
380  rp.addToProcessHistory();
381  }
382  rootOutputFile_->writeRun(rp);
383  fstats_.recordRun(rp.runID());
384  }
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch() const
void recordRun(RunID const &id)
FileStatsCollector fstats_
RecursiveMutex mutex_
unique_ptr< RootOutputFile > rootOutputFile_
void art::RootOutput::writeSubRun ( SubRunPrincipal sr)
overrideprivatevirtual

Implements art::OutputModule.

Definition at line 355 of file RootOutput_module.cc.

356  {
357  RecursiveMutexSentry sentry{mutex_, __func__};
358  if (dropAllSubRuns_) {
359  return;
360  }
362  sr.addToProcessHistory();
363  }
364  rootOutputFile_->writeSubRun(sr);
365  fstats_.recordSubRun(sr.subRunID());
366  }
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch() const
FileStatsCollector fstats_
void recordSubRun(SubRunID const &id)
RecursiveMutex mutex_
static const double sr
Definition: Units.h:167
unique_ptr< RootOutputFile > rootOutputFile_

Member Data Documentation

int const art::RootOutput::basketSize_
private

Definition at line 194 of file RootOutput_module.cc.

string const art::RootOutput::catalog_
private

Definition at line 179 of file RootOutput_module.cc.

int const art::RootOutput::compressionLevel_
private

Definition at line 190 of file RootOutput_module.cc.

constexpr char const* art::RootOutput::default_tmpDir {"<parent-path-of-filename>"}
static

Definition at line 60 of file RootOutput_module.cc.

bool art::RootOutput::dropAllEvents_
private

Definition at line 180 of file RootOutput_module.cc.

bool art::RootOutput::dropAllSubRuns_
private

Definition at line 181 of file RootOutput_module.cc.

DropMetaData art::RootOutput::dropMetaData_
private

Definition at line 195 of file RootOutput_module.cc.

bool art::RootOutput::dropMetaDataForDroppedData_
private

Definition at line 196 of file RootOutput_module.cc.

bool art::RootOutput::fastCloningEnabled_
private

Definition at line 197 of file RootOutput_module.cc.

string const art::RootOutput::filePattern_
private

Definition at line 187 of file RootOutput_module.cc.

ClosingCriteria art::RootOutput::fileProperties_
private

Definition at line 201 of file RootOutput_module.cc.

PostCloseFileRenamer art::RootOutput::fRenamer_
private

Definition at line 186 of file RootOutput_module.cc.

FileStatsCollector art::RootOutput::fstats_
private

Definition at line 185 of file RootOutput_module.cc.

int art::RootOutput::inputFileCount_
private

Definition at line 183 of file RootOutput_module.cc.

string art::RootOutput::lastClosedFileName_ {}
private

Definition at line 189 of file RootOutput_module.cc.

string const art::RootOutput::moduleLabel_
private

Definition at line 182 of file RootOutput_module.cc.

RecursiveMutex art::RootOutput::mutex_
mutableprivate

Definition at line 178 of file RootOutput_module.cc.

ProductTables art::RootOutput::producedResultsProducts_
private

Definition at line 203 of file RootOutput_module.cc.

ProductDescriptions art::RootOutput::productsToProduce_
private

Definition at line 202 of file RootOutput_module.cc.

unique_ptr<RootOutputFile> art::RootOutput::rootOutputFile_
private

Definition at line 184 of file RootOutput_module.cc.

RPManager art::RootOutput::rpm_
private

Definition at line 204 of file RootOutput_module.cc.

int64_t const art::RootOutput::saveMemoryObjectThreshold_
private

Definition at line 191 of file RootOutput_module.cc.

int const art::RootOutput::splitLevel_
private

Definition at line 193 of file RootOutput_module.cc.

string art::RootOutput::tmpDir_
private

Definition at line 188 of file RootOutput_module.cc.

int64_t const art::RootOutput::treeMaxVirtualSize_
private

Definition at line 192 of file RootOutput_module.cc.

bool art::RootOutput::writeParameterSets_
private

Definition at line 200 of file RootOutput_module.cc.


The documentation for this class was generated from the following file: