1 #ifndef FWCore_Framework_Event_h
2 #define FWCore_Framework_Event_h
35 #include "boost/shared_ptr.hpp"
45 class ConstBranchDescription;
69 template<
typename PROD>
74 template<
typename ELEMENT>
83 template<
typename PROD>
85 put(std::auto_ptr<PROD> product) {
return put<PROD>(product, std::string());}
88 template<
typename PROD>
90 put(std::auto_ptr<PROD> product, std::string
const& productInstanceName);
95 template<
typename PROD>
99 template<
typename PROD>
103 template<
typename PROD>
107 template<
typename PROD>
111 template<
typename PROD>
115 template<
typename PROD>
119 template<
typename PROD>
123 template<
typename PROD>
127 template<
typename PROD>
132 template<
typename ELEMENT>
137 template<
typename ELEMENT>
140 std::string
const& productInstanceName,
143 template<
typename ELEMENT>
147 template<
typename ELEMENT>
176 typedef std::vector<std::pair<WrapperOwningHolder, ConstBranchDescription const*> >
ProductPtrVec;
202 void commit_(std::vector<BranchID>* previousParentage= 0,
ParentageID* previousParentageId = 0);
235 mutable std::vector<boost::shared_ptr<ViewBase> >
gotViews_;
241 template<
typename PROD>
248 used.push_back(std::make_pair(edp, desc));
252 template<
typename PROD>
260 used.push_back(std::make_pair(edp, desc));
265 template<
typename PROD>
278 template<
typename ELEMENT>
287 <<
"get View by ID failed: no product with ID = " << oid <<
"\n";
297 template<
typename PROD>
299 Event::put(std::auto_ptr<PROD> product, std::string
const& productInstanceName) {
300 if(product.get() == 0) {
310 maybe_inserter(product.get());
333 template<
typename PROD>
344 template<
typename PROD>
354 template<
typename PROD>
364 template<
typename PROD>
374 template<
typename PROD>
377 std::string
const& productInstanceName,
386 template<
typename PROD>
396 template<
typename PROD>
406 template<
typename PROD>
416 template<
typename ELEMENT>
422 template<
typename ELEMENT>
425 std::string
const& productInstanceName,
429 TypeID typeID(
typeid(ELEMENT));
440 <<
"getByLabel: Found zero products matching all criteria\n"
441 <<
"Looking for sequence of type: " << typeID <<
"\n"
442 <<
"Looking for module label: " << moduleLabel <<
"\n"
443 <<
"Looking for productInstanceName: " << productInstanceName <<
"\n";
450 e <<
"getByLabel: Found more than one product matching all criteria\n"
451 <<
"Looking for sequence of type: " << typeID <<
"\n"
452 <<
"Looking for module label: " << moduleLabel <<
"\n"
453 <<
"Looking for productInstanceName: " << productInstanceName <<
"\n";
461 template<
typename ELEMENT>
468 TypeID typeID(
typeid(ELEMENT));
480 <<
"getByLabel: Found zero products matching all criteria\n"
481 <<
"Looking for sequence of type: " << typeID <<
"\n"
482 <<
"Looking for module label: " << tag.
label() <<
"\n"
483 <<
"Looking for productInstanceName: " << tag.
instance() <<
"\n"
484 <<
"Looking for processName: "<<tag.
process() <<
"\n";
491 e <<
"getByLabel: Found more than one product matching all criteria\n"
492 <<
"Looking for sequence of type: " << typeID <<
"\n"
493 <<
"Looking for module label: " << tag.
label() <<
"\n"
494 <<
"Looking for productInstanceName: " << tag.
instance() <<
"\n"
495 <<
"Looking for processName: "<<tag.
process() <<
"\n";
505 template<
typename ELEMENT>
508 std::vector<void const*> pointersToElements;
516 boost::shared_ptr<View<ELEMENT> >
void getManyByType(std::vector< Handle< PROD > > &results) const
bool getProcessParameterSet(std::string const &processName, ParameterSet &ps) const
void commit_aux(ProductPtrVec &products, bool record_parents, std::vector< BranchID > *previousParentage=0, ParentageID *previousParentageId=0)
virtual TriggerResultsByName triggerResultsByName(std::string const &process) const
void getAllProvenance(std::vector< Provenance const * > &provenances) const
bool getByLabel(std::string const &label, Handle< PROD > &result) const
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
boost::shared_ptr< reftobase::RefVectorHolderBase > helper_vector_ptr
boost::shared_ptr< LuminosityBlock const > const luminosityBlock_
BranchIDSet gotBranchIDs_
int getMatchingSequenceByLabel_(TypeID const &typeID, std::string const &label, std::string const &productInstanceName, BasicHandle &result) const
bool getByType(Handle< PROD > &result) const
Run const & getRun() const
void do_it(ptrvec_t &used, ptrvec_t &, WrapperOwningHolder const &edp, ConstBranchDescription const *desc) const
void getManyByType(std::vector< Handle< PROD > > &results) const
void do_it(ptrvec_t &, ptrvec_t &used, WrapperOwningHolder const &edp, ConstBranchDescription const *desc) const
WrapperInterfaceBase const * interface() const
std::vector< EventSelectionID > EventSelectionIDVector
ProductPtrVec const & putProducts() const
void const * wrapper() const
EDProductGetter const * prodGetter() const
Provenance const * provenance() const
PrincipalGetAdapter provRecorder_
ESProducts< T, S > products(const T &i1, const S &i2)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
void fillView(void const *me, ProductID const &id, std::vector< void const * > &view, helper_vector_ptr &helpers) const
void getMany(SelectorBase const &sel, std::vector< Handle< PROD > > &results) const
bool get(ProductID const &oid, Handle< PROD > &result) const
LuminosityBlock const & getLuminosityBlock() const
ProductPtrVec putProducts_
void addToGotBranchIDs(Provenance const &prov) const
void getMany(SelectorBase const &, std::vector< Handle< PROD > > &results) const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
RefProd< PROD > getRefBeforePut()
ProductPtrVec & putProductsWithoutParents()
virtual ProcessHistory const & processHistory() const
Event::ProductPtrVec ptrvec_t
virtual BasicHandle getByLabelImpl(std::type_info const &iWrapperType, std::type_info const &iProductType, InputTag const &iTag) const
EventAuxiliary const & eventAuxiliary() const
ProductID makeProductID(ConstBranchDescription const &desc) const
EventAuxiliary const & aux_
ProductPtrVec putProductsWithoutParents_
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
bool get(SelectorBase const &, Handle< PROD > &result) const
void convert_handle(BasicHandle const &bh, Handle< T > &result)
std::vector< boost::shared_ptr< ViewBase > > gotViews_
ProcessHistoryID const & processHistoryID() const
Event(EventPrincipal &ep, ModuleDescription const &md)
ProductPtrVec & putProducts()
EventSelectionIDVector const & eventSelectionIDs() const
void commit_(std::vector< BranchID > *previousParentage=0, ParentageID *previousParentageId=0)
BasicHandle getByProductID_(ProductID const &oid) const
void const * wrapper() const
void throwOnPutOfNullProduct(char const *principalType, TypeID const &productType, std::string const &productInstanceName)
ConstBranchDescription const & getBranchDescription(TypeID const &type, std::string const &productInstanceName) const
Provenance getProvenance(BranchID const &theID) const
ProductPtrVec const & putProductsWithoutParents() const
EventPrincipal const & eventPrincipal() const
Event::ProductPtrVec ptrvec_t
std::vector< std::pair< WrapperOwningHolder, ConstBranchDescription const * > > ProductPtrVec
std::set< BranchID > BranchIDSet
void fillView_(BasicHandle &bh, Handle< View< ELEMENT > > &result) const
Provenance const * provenance() const
bool getByType(Handle< PROD > &result) const