CMS 3D CMS Logo

ProcessBlockHelperBase.h
Go to the documentation of this file.
1 #ifndef FWCore_Common_ProcessBlockHelperBase_h
2 #define FWCore_Common_ProcessBlockHelperBase_h
3 
12 
13 #include <string>
14 #include <vector>
15 
16 namespace edm {
17 
19  public:
20  virtual ~ProcessBlockHelperBase();
21 
22  std::vector<std::string> const& processesWithProcessBlockProducts() const {
24  }
25  void setProcessesWithProcessBlockProducts(std::vector<std::string> const& val) {
27  }
30  }
31 
32  std::vector<std::string> const& addedProcesses() const { return addedProcesses_; }
33  void setAddedProcesses(std::vector<std::string> const& val) { addedProcesses_ = val; }
35 
37 
38  // In the function names below, top implies associated the helper associated
39  // with the EventProcessor, not a helper associated with a SubProcess.
40 
41  virtual ProcessBlockHelperBase const* topProcessBlockHelper() const = 0;
42  virtual std::vector<std::string> const& topProcessesWithProcessBlockProducts() const = 0;
43  virtual unsigned int nProcessesInFirstFile() const = 0;
44  virtual std::vector<std::vector<unsigned int>> const& processBlockCacheIndices() const = 0;
45  virtual std::vector<std::vector<unsigned int>> const& nEntries() const = 0;
46  virtual std::vector<unsigned int> const& cacheIndexVectorsPerFile() const = 0;
47  virtual std::vector<unsigned int> const& cacheEntriesPerFile() const = 0;
48  virtual unsigned int processBlockIndex(std::string const& processName, EventToProcessBlockIndexes const&) const = 0;
49  virtual unsigned int outerOffset() const = 0;
50 
51  std::string selectProcess(ProductRegistry const&, ProductLabels const&, TypeID const&) const;
52 
53  static constexpr unsigned int invalidCacheIndex() { return 0xffffffff; }
54  static constexpr unsigned int invalidProcessIndex() { return 0xffffffff; }
55 
56  private:
57  // Includes processes with ProcessBlock branches present
58  // in the first input file and not dropped on input. At
59  // each processing step the new process will be added at
60  // the end if there are non-transient ProcessBlock products
61  // being produced. Output modules will write a copy of this
62  // to persistent storage after removing any process without
63  // at least one kept ProcessBlock branch.
64  std::vector<std::string> processesWithProcessBlockProducts_;
65 
66  // This will have 0 or 1 element depending whether there are any
67  // non-transient ProcessBlock products produced in the current
68  // process (except for SubProcesses where this might have more
69  // than 1 element)
70  std::vector<std::string> addedProcesses_;
71  };
72 } // namespace edm
73 #endif
virtual ProcessBlockHelperBase const * topProcessBlockHelper() const =0
std::vector< std::string > addedProcesses_
virtual unsigned int nProcessesInFirstFile() const =0
void setAddedProcesses(std::vector< std::string > const &val)
static constexpr unsigned int invalidProcessIndex()
static constexpr unsigned int invalidCacheIndex()
virtual std::vector< std::string > const & topProcessesWithProcessBlockProducts() const =0
virtual unsigned int outerOffset() const =0
std::vector< std::string > const & addedProcesses() const
void emplaceBackAddedProcessName(std::string const &processName)
virtual std::vector< unsigned int > const & cacheIndexVectorsPerFile() const =0
void updateForNewProcess(ProductRegistry const &, std::string const &processName)
std::vector< std::string > const & processesWithProcessBlockProducts() const
virtual unsigned int processBlockIndex(std::string const &processName, EventToProcessBlockIndexes const &) const =0
std::vector< std::string > processesWithProcessBlockProducts_
void emplaceBackProcessName(std::string const &processName)
virtual std::vector< unsigned int > const & cacheEntriesPerFile() const =0
virtual std::vector< std::vector< unsigned int > > const & nEntries() const =0
HLT enums.
std::string selectProcess(ProductRegistry const &, ProductLabels const &, TypeID const &) const
virtual std::vector< std::vector< unsigned int > > const & processBlockCacheIndices() const =0
void setProcessesWithProcessBlockProducts(std::vector< std::string > const &val)