Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:03

0001 #ifndef FWCore_Framework_InputSourceDescription_h
0002 #define FWCore_Framework_InputSourceDescription_h
0003 
0004 /*----------------------------------------------------------------------
0005 
0006 InputSourceDescription : the stuff that is needed to configure an
0007 input source that does not come in through the ParameterSet  
0008 ----------------------------------------------------------------------*/
0009 #include <memory>
0010 #include "DataFormats/Provenance/interface/ModuleDescription.h"
0011 #include "FWCore/Common/interface/FWCoreCommonFwd.h"
0012 #include "FWCore/Framework/interface/PreallocationConfiguration.h"
0013 
0014 namespace edm {
0015   class ProductRegistry;
0016   class ActivityRegistry;
0017   class BranchIDListHelper;
0018   class PreallocationConfiguration;
0019   class ThinnedAssociationsHelper;
0020 
0021   struct InputSourceDescription {
0022     InputSourceDescription()
0023         : moduleDescription_(),
0024           productRegistry_(nullptr),
0025           actReg_(),
0026           maxEvents_(-1),
0027           maxLumis_(-1),
0028           allocations_(nullptr) {}
0029 
0030     InputSourceDescription(ModuleDescription const& md,
0031                            std::shared_ptr<ProductRegistry> preg,
0032                            std::shared_ptr<BranchIDListHelper> branchIDListHelper,
0033                            std::shared_ptr<ProcessBlockHelper> const& processBlockHelper,
0034                            std::shared_ptr<ThinnedAssociationsHelper> thinnedAssociationsHelper,
0035                            std::shared_ptr<ActivityRegistry> areg,
0036                            int maxEvents,
0037                            int maxLumis,
0038                            int maxSecondsUntilRampdown,
0039                            PreallocationConfiguration const& allocations)
0040         : moduleDescription_(md),
0041           productRegistry_(preg),
0042           branchIDListHelper_(branchIDListHelper),
0043           processBlockHelper_(processBlockHelper),
0044           thinnedAssociationsHelper_(thinnedAssociationsHelper),
0045           actReg_(areg),
0046           maxEvents_(maxEvents),
0047           maxLumis_(maxLumis),
0048           maxSecondsUntilRampdown_(maxSecondsUntilRampdown),
0049           allocations_(&allocations) {}
0050 
0051     ModuleDescription moduleDescription_;
0052     std::shared_ptr<ProductRegistry> productRegistry_;
0053     std::shared_ptr<BranchIDListHelper> branchIDListHelper_;
0054     std::shared_ptr<ProcessBlockHelper> processBlockHelper_;
0055     std::shared_ptr<ThinnedAssociationsHelper> thinnedAssociationsHelper_;
0056     std::shared_ptr<ActivityRegistry> actReg_;  // We do not use propagate_const because the registry itself is mutable.
0057     int maxEvents_;
0058     int maxLumis_;
0059     int maxSecondsUntilRampdown_;
0060     PreallocationConfiguration const* allocations_;
0061   };
0062 }  // namespace edm
0063 
0064 #endif