21 #include "DataFormats/TestObjects/interface/ToyProducts.h" 34 template <
typename P,
typename V>
55 consumes<edm::View<int>>(
edm::InputTag{
"intvec",
"",
"TEST"});
66 consumes<edm::View<SCSimpleProduct::value_type>>(
edm::InputTag{
"simple"});
68 consumes<edm::View<OVSimpleProduct::value_type>>(
edm::InputTag{
"ovsimple"});
70 consumes<edm::View<AVSimpleProduct::value_type>>(
edm::InputTag{
"avsimple"});
71 consumes<edmtest::DSVSimpleProduct>(
edm::InputTag{
"dsvsimple"});
72 consumes<edm::View<edmtest::DSVSimpleProduct::value_type>>(
edm::InputTag{
"dsvsimple"});
74 consumes<OVSimpleDerivedProduct>(
edm::InputTag{
"ovsimple",
"derived"});
75 consumes<edm::View<Simple>>(
edm::InputTag{
"ovsimple",
"derived"});
77 consumes<RefVector<std::vector<int>>>(
edm::InputTag{
"intvecrefvec"});
80 consumes<RefToBaseVector<int>>(
edm::InputTag{
"intvecreftbvec"});
86 consumes<std::vector<edm::Ptr<int>>>(
edm::InputTag{
"intvecstdvecptr"});
89 consumes<std::vector<std::unique_ptr<int>>>(
edm::InputTag{
"intvecstdvecuniqptr"});
90 consumes<edm::View<int>>(
edm::InputTag{
"intvecstdvecuniqptr"});
91 consumes<std::vector<std::unique_ptr<IntProduct>>>(
edm::InputTag{
"intvecstdvecuniqptr"});
92 consumes<edm::View<IntProduct>>(
edm::InputTag{
"intvecstdvecuniqptr"});
94 mayConsume<edm::View<int>>(
edm::InputTag{
"intvecptrvecdoesNotExist"});
97 template <
typename P,
typename V =
typename P::value_type>
114 testDSVProduct(
e,
"dsvsimple");
115 testAVProduct(
e,
"avsimple");
116 testProductWithBaseClass(
e,
"ovsimple");
117 testRefVector(
e,
"intvecrefvec");
118 testRefToBaseVector(
e,
"intvecreftbvec");
119 testPtrVector(
e,
"intvecptrvec");
120 testStdVectorPtr(
e,
"intvecstdvecptr");
121 testStdVectorUniquePtr(
e,
"intvecstdvecuniqptr");
127 e.getByLabel(
tag, hInt);
133 e.getByLabel(
tag, hInt);
138 template <
typename P,
typename V>
140 typedef P sequence_t;
155 assert(hproduct->size() == hview->size());
157 typename sequence_t::const_iterator i_product = hproduct->begin();
158 typename sequence_t::const_iterator e_product = hproduct->end();
159 typename view_t::const_iterator i_view = hview->begin();
160 typename view_t::const_iterator e_view = hview->end();
162 while (i_product != e_product && i_view != e_view) {
163 value_t
const& product_item = *i_product;
164 value_t
const& view_item = *i_view;
165 assert(product_item == view_item);
168 assert(*ref3 == product_item);
172 assert(*ref4 == product_item);
188 typedef edmtest::DSVSimpleProduct sequence_t;
203 assert(hprod->size() == hview->size());
205 sequence_t::const_iterator i_prod = hprod->begin();
206 sequence_t::const_iterator e_prod = hprod->end();
207 view_t::const_iterator i_view = hview->begin();
208 view_t::const_iterator e_view = hview->end();
210 while (i_prod != e_prod && i_view != e_view) {
211 value_t
const&
prod = *i_prod;
212 value_t
const&
view = *i_view;
222 typedef edmtest::AVSimpleProduct sequence_t;
237 assert(hprod->size() == hview->size());
239 sequence_t::const_iterator i_prod = hprod->begin();
240 sequence_t::const_iterator e_prod = hprod->end();
241 view_t::const_iterator i_view = hview->begin();
242 view_t::const_iterator e_view = hview->end();
244 while (i_prod != e_prod && i_view != e_view) {
245 value_t
const&
prod = *i_prod;
246 value_t
const&
view = *i_view;
263 typedef OVSimpleDerivedProduct sequence_t;
264 typedef Simple value_t;
278 assert(hprod->size() == hview->size());
282 sequence_t::const_iterator i_prod = hprod->begin();
283 sequence_t::const_iterator e_prod = hprod->end();
284 view_t::const_iterator i_view = hview->begin();
285 view_t::const_iterator e_view = hview->end();
287 while (i_prod != e_prod && i_view != e_view) {
288 SimpleDerived
const&
prod = *i_prod;
289 Simple
const&
view = *i_view;
298 SimpleDerived
const& valueFromPtr = *ptr;
302 SimpleDerived
const& valueFromRef = *ref;
327 assert(hproduct->size() == hview->size());
329 sequence_t::const_iterator i_product = hproduct->begin();
330 sequence_t::const_iterator e_product = hproduct->end();
331 view_t::const_iterator i_view = hview->begin();
332 view_t::const_iterator e_view = hview->end();
334 while (i_product != e_product && i_view != e_view) {
335 value_t
const& product_item = **i_product;
336 value_t
const& view_item = *i_view;
337 assert(product_item == view_item);
344 int item_other = *ref;
345 assert(item_other == product_item);
348 int item_other2 = *ref2;
349 assert(item_other2 == product_item);
352 assert(*ref3 == product_item);
376 assert(hproduct->size() == hview->size());
378 sequence_t::const_iterator i_product = hproduct->begin();
379 sequence_t::const_iterator e_product = hproduct->end();
380 view_t::const_iterator i_view = hview->begin();
381 view_t::const_iterator e_view = hview->end();
383 while (i_product != e_product && i_view != e_view) {
384 value_t
const& product_item = **i_product;
385 value_t
const& view_item = *i_view;
386 assert(product_item == view_item);
405 e.getByLabel(
tag, hview);
412 e.getByLabel(tag2, hview);
418 assert(hproduct->size() == hview->size());
420 sequence_t::const_iterator i_product = hproduct->begin();
421 sequence_t::const_iterator e_product = hproduct->end();
422 view_t::const_iterator i_view = hview->begin();
423 view_t::const_iterator e_view = hview->end();
425 while (i_product != e_product && i_view != e_view) {
426 value_t
const& product_item = **i_product;
427 value_t
const& view_item = *i_view;
428 assert(product_item == view_item);
437 template <
typename PtrT>
439 using type =
typename PtrT::element_type;
442 template <
typename T>
447 template <
typename Ptr>
449 using sequence_t = std::vector<Ptr>;
450 using value_t =
typename ValueType<Ptr>::type;
460 e.getByLabel(
tag, hview);
466 assert(hproduct->size() == hview->size());
468 typename sequence_t::const_iterator i_product = hproduct->begin();
469 typename sequence_t::const_iterator e_product = hproduct->end();
470 typename view_t::const_iterator i_view = hview->begin();
471 typename view_t::const_iterator e_view = hview->end();
472 unsigned int slot = 0;
473 while (i_product != e_product && i_view != e_view) {
474 value_t
const& product_item = **i_product;
475 value_t
const& view_item = *i_view;
476 assert(product_item == view_item);
479 assert(**ref3 == product_item);
494 testStdVectorPtrT<std::unique_ptr<int>>(
e,
moduleLabel);
495 testStdVectorPtrT<std::unique_ptr<IntProduct>>(
e,
moduleLabel);
bool isNonnull() const
Checks for non-null.
Provenance const * provenance() const
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
Container::value_type value_type
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t V
#define DEFINE_FWK_MODULE(type)
ValueType
Type of the value held by a Value object.
static void call(ViewAnalyzer const *va, Event const &e, char const *moduleLabel)
uint16_t *__restrict__ uint16_t const *__restrict__ uint32_t const *__restrict__ uint32_t *__restrict__ uint32_t const *__restrict__ int32_t *__restrict__ uint32_t numElements
std::pair< OmniClusterRef, TrackingParticleRef > P