CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OutputProcessBlockHelper.h
Go to the documentation of this file.
1 #ifndef FWCore_Common_OutputProcessBlockHelper_h
2 #define FWCore_Common_OutputProcessBlockHelper_h
3 
11 
12 #include <set>
13 #include <string>
14 #include <vector>
15 
16 namespace edm {
17 
18  class ProcessBlockHelperBase;
19 
21  public:
22  std::vector<std::string> const& processesWithProcessBlockProducts() const {
24  }
25 
26  void updateAfterProductSelection(std::set<std::string> const& processesWithKeptProcessBlockProducts,
27  ProcessBlockHelperBase const&);
28 
30 
32 
34 
35  private:
36  // The next two functions are intended to be used only for testing purposes
37  friend class TestOneOutput;
38  std::vector<unsigned int> const& translateFromStoredIndex() const { return translateFromStoredIndex_; }
39  unsigned int nAddedProcesses() const { return nAddedProcesses_; }
40 
41  void setStoredProcessOffset(unsigned int nInputProcesses,
42  std::vector<std::vector<unsigned int>> const& nEntries,
43  std::vector<unsigned int>& storedProcessOffset) const;
44 
45  void setProcessOffset(unsigned int iFile,
46  unsigned int nInputProcesses,
47  std::vector<std::vector<unsigned int>> const& nEntries,
48  std::vector<unsigned int>& processOffset) const;
49 
50  void setStoredFileInProcessOffset(unsigned int iFile,
51  unsigned int nInputProcesses,
52  std::vector<std::vector<unsigned int>> const& nEntries,
53  std::vector<unsigned int>& storedFileInProcessOffset) const;
54 
55  // Includes processes with at least one ProcessBlock branch present
56  // in the output file
57  std::vector<std::string> processesWithProcessBlockProducts_;
58 
59  // This will have the value of 0 or 1, except for the SubProcess case.
60  // This is incremented to 1 if the current process produces new
61  // ProcessBlock products and they are kept by the OutputModule.
62  unsigned int nAddedProcesses_ = 0;
63 
64  // Translate from the vector of process names in this class to
65  // the one in the ProcessBlockHelper
66  std::vector<unsigned int> translateFromStoredIndex_;
67 
68  // Points to the main ProcessBlockHelper owned by the EventProcessor
69  // or SubProcess
71 
72  bool productsFromInputKept_ = false;
73  };
74 } // namespace edm
75 #endif
void setProcessOffset(unsigned int iFile, unsigned int nInputProcesses, std::vector< std::vector< unsigned int >> const &nEntries, std::vector< unsigned int > &processOffset) const
ProcessBlockHelperBase const * processBlockHelper_
std::vector< std::string > const & processesWithProcessBlockProducts() const
void updateAfterProductSelection(std::set< std::string > const &processesWithKeptProcessBlockProducts, ProcessBlockHelperBase const &)
void setStoredFileInProcessOffset(unsigned int iFile, unsigned int nInputProcesses, std::vector< std::vector< unsigned int >> const &nEntries, std::vector< unsigned int > &storedFileInProcessOffset) const
std::vector< std::string > processesWithProcessBlockProducts_
ProcessBlockHelperBase const * processBlockHelper() const
std::vector< unsigned int > translateFromStoredIndex_
void setStoredProcessOffset(unsigned int nInputProcesses, std::vector< std::vector< unsigned int >> const &nEntries, std::vector< unsigned int > &storedProcessOffset) const
void fillCacheIndices(StoredProcessBlockHelper &) const
std::vector< unsigned int > const & translateFromStoredIndex() const