CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StreamedProducts.h
Go to the documentation of this file.
1 #ifndef Streamer_StreamedProducts_h
2 #define Streamer_StreamedProducts_h
3 
4 /*
5  Simple packaging of all the event data that is needed to be serialized
6  for transfer.
7 
8  The "other stuff in the SendEvent still needs to be
9  populated.
10 
11  The product is paired with its provenance, and the entire event
12  is captured in the SendEvent structure.
13  */
14 
15 #include <vector>
26 
27 namespace edm {
28 
29  // ------------------------------------------
30 
31  class WrapperBase;
33  public:
37 
39  BranchDescription const& desc,
40  bool present,
41  std::vector<BranchID> const* parents);
42 
43  BranchDescription const* desc() const {return desc_;}
44  BranchID branchID() const {return desc_->branchID();}
45  bool present() const {return present_;}
46  std::vector<BranchID> const* parents() const {return parents_;}
47  WrapperBase const* prod() {return prod_;}
48 
49  void clear() {
50  prod_= nullptr;
51  delete desc_;
52  desc_= nullptr;
53  present_ = false;
54  delete parents_;
55  parents_ = nullptr;
56  }
57 
58  private:
61  bool present_;
62  std::vector<BranchID> const* parents_;
63  };
64 
65  // ------------------------------------------
66 
67  typedef std::vector<StreamedProduct> SendProds;
68 
69  // ------------------------------------------
70 
71  class SendEvent {
72  public:
73  SendEvent() { }
78  aux_(aux),
79  processHistory_(processHistory),
80  eventSelectionIDs_(eventSelectionIDs),
81  branchListIndexes_(branchListIndexes),
82  products_() {}
83  EventAuxiliary const& aux() const {return aux_;}
84  SendProds const& products() const {return products_;}
89  private:
95 
96  // other tables necessary for provenance lookup
97  };
98 
99  typedef std::vector<BranchDescription> SendDescs;
100 
102  public:
103  typedef std::map<ParameterSetID, ParameterSetBlob> ParameterSetMap;
105  SendDescs const& descs() const {return descs_;}
107  BranchIDLists const& branchIDLists() const {return branchIDLists_;}
109  void push_back(BranchDescription const& bd) {descs_.push_back(bd);}
110  void setParameterSetMap(ParameterSetMap const& psetMap) {processParameterSet_ = psetMap;}
111  void setBranchIDLists(BranchIDLists const& bidlists) {branchIDLists_ = bidlists;}
113  void initializeTransients();
114 
115  private:
120  // trigger bit descriptions will be added here and permanent
121  // provenance values
122  };
123 
124 
125 }
126 #endif
127 
EventAuxiliary const & aux() const
void setThinnedAssociationsHelper(ThinnedAssociationsHelper const &v)
WrapperBase const * prod_
std::vector< BranchIDList > BranchIDLists
Definition: BranchIDList.h:19
SendProds & products()
ProcessHistory processHistory_
std::vector< BranchDescription > SendDescs
ThinnedAssociationsHelper thinnedAssociationsHelper_
std::map< ParameterSetID, ParameterSetBlob > ParameterSetMap
BranchListIndexes branchListIndexes_
SendProds const & products() const
EventAuxiliary aux_
#define nullptr
std::vector< EventSelectionID > EventSelectionIDVector
StreamedProduct(BranchDescription const &desc)
SendProds products_
BranchDescription const * desc_
EventSelectionIDVector eventSelectionIDs_
std::vector< BranchListIndex > BranchListIndexes
ParameterSetMap processParameterSet_
EventSelectionIDVector const & eventSelectionIDs() const
ParameterSetMap const & processParameterSet() const
std::vector< BranchID > const * parents() const
BranchID const & branchID() const
ProcessHistory const & processHistory() const
std::vector< StreamedProduct > SendProds
ThinnedAssociationsHelper const & thinnedAssociationsHelper() const
BranchDescription const * desc() const
BranchListIndexes const & branchListIndexes() const
BranchIDLists const & branchIDLists() const
BranchIDLists branchIDLists_
SendEvent(EventAuxiliary const &aux, ProcessHistory const &processHistory, EventSelectionIDVector const &eventSelectionIDs, BranchListIndexes const &branchListIndexes)
std::vector< BranchID > const * parents_
void setBranchIDLists(BranchIDLists const &bidlists)
void push_back(BranchDescription const &bd)
volatile std::atomic< bool > shutdown_flag false
SendDescs const & descs() const
BranchID branchID() const
WrapperBase const * prod()
void setParameterSetMap(ParameterSetMap const &psetMap)