File indexing completed on 2025-01-31 02:19:23
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #include <cassert>
0015
0016
0017 #include "FWCore/Framework/interface/one/OutputModuleBase.h"
0018
0019 #include "DataFormats/Common/interface/Handle.h"
0020 #include "DataFormats/Common/interface/ThinnedAssociation.h"
0021 #include "DataFormats/Common/interface/EndPathStatus.h"
0022 #include "DataFormats/Provenance/interface/ProductDescription.h"
0023 #include "DataFormats/Provenance/interface/BranchKey.h"
0024 #include "DataFormats/Provenance/interface/ProductRegistry.h"
0025 #include "DataFormats/Provenance/interface/ThinnedAssociationsHelper.h"
0026 #include "FWCore/Framework/interface/EventForOutput.h"
0027 #include "FWCore/Framework/interface/EventPrincipal.h"
0028 #include "FWCore/Framework/src/insertSelectedProcesses.h"
0029 #include "FWCore/Framework/interface/LuminosityBlockForOutput.h"
0030 #include "FWCore/Framework/interface/ProcessBlockForOutput.h"
0031 #include "FWCore/Framework/interface/RunForOutput.h"
0032 #include "FWCore/Framework/src/OutputModuleDescription.h"
0033 #include "FWCore/Framework/interface/TriggerNamesService.h"
0034 #include "FWCore/Framework/src/EventSignalsSentry.h"
0035 #include "FWCore/Framework/interface/PreallocationConfiguration.h"
0036 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0037 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0038 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0039 #include "FWCore/ServiceRegistry/interface/Service.h"
0040 #include "FWCore/Utilities/interface/DebugMacros.h"
0041 #include "FWCore/Reflection/interface/DictionaryTools.h"
0042
0043 namespace edm {
0044 namespace one {
0045
0046
0047 OutputModuleBase::OutputModuleBase(ParameterSet const& pset) : core::OutputModuleCore(pset) {}
0048
0049 void OutputModuleBase::configure(OutputModuleDescription const& desc) {
0050 core::OutputModuleCore::configure(desc);
0051 subProcessParentageHelper_ = desc.subProcessParentageHelper_;
0052 }
0053
0054 SharedResourcesAcquirer OutputModuleBase::createAcquirer() {
0055 return SharedResourcesAcquirer{
0056 std::vector<std::shared_ptr<SerialTaskQueue>>(1, std::make_shared<SerialTaskQueue>())};
0057 }
0058
0059 void OutputModuleBase::doPreallocate(PreallocationConfiguration const& iPC) {
0060 core::OutputModuleCore::doPreallocate_(iPC);
0061 }
0062
0063 void OutputModuleBase::doBeginJob() {
0064 resourcesAcquirer_ = createAcquirer();
0065 core::OutputModuleCore::doBeginJob_();
0066 }
0067
0068 bool OutputModuleBase::doEvent(EventTransitionInfo const& info,
0069 ActivityRegistry* act,
0070 ModuleCallingContext const* mcc) {
0071 { core::OutputModuleCore::doEvent_(info, act, mcc); }
0072 if (remainingEvents_ > 0) {
0073 --remainingEvents_;
0074 }
0075 return true;
0076 }
0077 }
0078 }