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
ProvenanceFwd.h
edm::ProcessBlockHelperBase::invalidCacheIndex
static constexpr unsigned int invalidCacheIndex()
Definition: ProcessBlockHelperBase.h:53
edm::ProcessBlockHelperBase::topProcessBlockHelper
virtual ProcessBlockHelperBase const * topProcessBlockHelper() const =0
edm::EventToProcessBlockIndexes
Definition: EventToProcessBlockIndexes.h:12
edm::ProcessBlockHelperBase::setProcessesWithProcessBlockProducts
void setProcessesWithProcessBlockProducts(std::vector< std::string > const &val)
Definition: ProcessBlockHelperBase.h:25
edm::ProcessBlockHelperBase::setAddedProcesses
void setAddedProcesses(std::vector< std::string > const &val)
Definition: ProcessBlockHelperBase.h:33
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ProcessBlockHelperBase::outerOffset
virtual unsigned int outerOffset() const =0
edm::ProcessBlockHelperBase::addedProcesses_
std::vector< std::string > addedProcesses_
Definition: ProcessBlockHelperBase.h:70
edm::ProcessBlockHelperBase::nProcessesInFirstFile
virtual unsigned int nProcessesInFirstFile() const =0
edm::ProcessBlockHelperBase::emplaceBackAddedProcessName
void emplaceBackAddedProcessName(std::string const &processName)
Definition: ProcessBlockHelperBase.h:34
edm::ProcessBlockHelperBase::cacheIndexVectorsPerFile
virtual std::vector< unsigned int > const & cacheIndexVectorsPerFile() const =0
edm::ProcessBlockHelperBase::addedProcesses
std::vector< std::string > const & addedProcesses() const
Definition: ProcessBlockHelperBase.h:32
edm::ProductRegistry
Definition: ProductRegistry.h:37
edm::ProcessBlockHelperBase::invalidProcessIndex
static constexpr unsigned int invalidProcessIndex()
Definition: ProcessBlockHelperBase.h:54
edm::ProcessBlockHelperBase::~ProcessBlockHelperBase
virtual ~ProcessBlockHelperBase()
edm::ProcessBlockHelperBase::topProcessesWithProcessBlockProducts
virtual std::vector< std::string > const & topProcessesWithProcessBlockProducts() const =0
edm::ProcessBlockHelperBase::updateForNewProcess
void updateForNewProcess(ProductRegistry const &, std::string const &processName)
Definition: ProcessBlockHelperBase.cc:16
edm::ProcessBlockHelperBase
Definition: ProcessBlockHelperBase.h:18
edm::ProcessBlockHelperBase::processBlockIndex
virtual unsigned int processBlockIndex(std::string const &processName, EventToProcessBlockIndexes const &) const =0
edm::ProcessBlockHelperBase::processesWithProcessBlockProducts
std::vector< std::string > const & processesWithProcessBlockProducts() const
Definition: ProcessBlockHelperBase.h:22
edm::ProcessBlockHelperBase::cacheEntriesPerFile
virtual std::vector< unsigned int > const & cacheEntriesPerFile() const =0
edm::ProcessBlockHelperBase::selectProcess
std::string selectProcess(ProductRegistry const &, ProductLabels const &, TypeID const &) const
Definition: ProcessBlockHelperBase.cc:30
edm::ProcessBlockHelperBase::processesWithProcessBlockProducts_
std::vector< std::string > processesWithProcessBlockProducts_
Definition: ProcessBlockHelperBase.h:64
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SimL1EmulatorRepack_CalouGT_cff.processName
processName
Definition: SimL1EmulatorRepack_CalouGT_cff.py:17
edm::ProcessBlockHelperBase::processBlockCacheIndices
virtual std::vector< std::vector< unsigned int > > const & processBlockCacheIndices() const =0
edm::TypeID
Definition: TypeID.h:22
heppy_batch.val
val
Definition: heppy_batch.py:351
FWCoreUtiliesFwd.h
edm::ProcessBlockHelperBase::emplaceBackProcessName
void emplaceBackProcessName(std::string const &processName)
Definition: ProcessBlockHelperBase.h:28
edm::ProcessBlockHelperBase::nEntries
virtual std::vector< std::vector< unsigned int > > const & nEntries() const =0
edm::ProductLabels
Definition: ProductLabels.h:4