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>
25 
26 #include "TClassRef.h"
27 
28 namespace edm {
29 
30  // ------------------------------------------
31 
33  public:
36  desc_(&desc), present_(false), parents_(0), prod_(0), classRef_() {}
37 
38  StreamedProduct(void const* prod,
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  void* prod() {return prod_;}
48  TClassRef const& classRef() const {return classRef_;}
49  void allocateForReading();
50  void setNewClassType();
51  void clearClassType();
52 
53  void clear() {
54  prod_= 0;
55  delete desc_;
56  desc_= 0;
57  present_ = false;
58  delete parents_;
59  parents_ = 0;
60  }
61 
62  private:
64  bool present_;
65  std::vector<BranchID> const* parents_;
66  void* prod_;
67  TClassRef classRef_;
68  };
69 
70  // ------------------------------------------
71 
72  typedef std::vector<StreamedProduct> SendProds;
73 
74  // ------------------------------------------
75 
76  class SendEvent {
77  public:
78  SendEvent() { }
83  aux_(aux),
84  processHistory_(processHistory),
85  eventSelectionIDs_(eventSelectionIDs),
86  branchListIndexes_(branchListIndexes),
87  products_() {}
88  EventAuxiliary const& aux() const {return aux_;}
89  SendProds const& products() const {return products_;}
94  private:
100 
101  // other tables necessary for provenance lookup
102  };
103 
104  typedef std::vector<BranchDescription> SendDescs;
105 
107  public:
108  typedef std::map<ParameterSetID, ParameterSetBlob> ParameterSetMap;
110  SendDescs const& descs() const {return descs_;}
112  BranchIDLists const& branchIDLists() const {return branchIDLists_;}
113  std::vector<ProcessConfiguration> const& processConfigurations() const {return processConfigurations_;}
114  void push_back(BranchDescription const& bd) {descs_.push_back(bd);}
115  void setParameterSetMap(ParameterSetMap const& psetMap) {processParameterSet_ = psetMap;}
116  void setBranchIDLists(BranchIDLists const& bidlists) {branchIDLists_ = bidlists;}
117  void setProcessConfigurations(std::vector<ProcessConfiguration> const& pcs) {processConfigurations_ = pcs;}
118 
119  private:
123  std::vector<ProcessConfiguration> processConfigurations_;
124  // trigger bit descriptions will be added here and permanent
125  // provenance values
126  };
127 
128 
129 }
130 #endif
131 
EventAuxiliary const & aux() const
void setProcessConfigurations(std::vector< ProcessConfiguration > const &pcs)
SendProds & products()
ProcessHistory processHistory_
std::vector< BranchIDList > BranchIDLists
Definition: BranchIDList.h:19
std::vector< BranchDescription > SendDescs
std::map< ParameterSetID, ParameterSetBlob > ParameterSetMap
BranchListIndexes branchListIndexes_
SendProds const & products() const
EventAuxiliary aux_
std::vector< EventSelectionID > EventSelectionIDVector
StreamedProduct(BranchDescription const &desc)
SendProds products_
BranchDescription const * desc_
EventSelectionIDVector eventSelectionIDs_
std::vector< BranchListIndex > BranchListIndexes
TClassRef const & classRef() const
std::vector< ProcessConfiguration > processConfigurations_
ParameterSetMap processParameterSet_
std::vector< ProcessConfiguration > const & processConfigurations() const
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
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)
SendDescs const & descs() const
BranchID branchID() const
void setParameterSetMap(ParameterSetMap const &psetMap)