Skip to content

Commit 8226edd

Browse files
authored
Merge pull request #48902 from Dr15Jones/removeDSVunusedTests
Remove unused DetSetVector test in FWCore/Integration
2 parents abf3d78 + e4b542f commit 8226edd

File tree

6 files changed

+0
-237
lines changed

6 files changed

+0
-237
lines changed

FWCore/Framework/test/stubs/ToyAnalyzers.cc

Lines changed: 0 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -318,36 +318,6 @@ namespace edmtest {
318318
edm::InputTag moduleLabel_;
319319
};
320320

321-
//--------------------------------------------------------------------
322-
//
323-
class SCSimpleAnalyzer : public edm::global::EDAnalyzer<> {
324-
public:
325-
SCSimpleAnalyzer(edm::ParameterSet const&) {}
326-
327-
void analyze(edm::StreamID, edm::Event const& e, edm::EventSetup const&) const final;
328-
};
329-
330-
void SCSimpleAnalyzer::analyze(edm::StreamID, edm::Event const& e, edm::EventSetup const&) const {
331-
// Get the product back out; it should be sorted.
332-
edm::Handle<SCSimpleProduct> h;
333-
e.getByLabel("scs", h);
334-
assert(h.isValid());
335-
336-
// Check the sorting. DO NOT DO THIS IN NORMAL CODE; we are
337-
// copying all the values out of the SortedCollection so we can
338-
// manipulate them via an interface different from
339-
// SortedCollection, just so that we can make sure the collection
340-
// is sorted.
341-
std::vector<Simple> after(h->begin(), h->end());
342-
typedef std::vector<Simple>::size_type size_type;
343-
344-
// Verify that the vector *is* sorted.
345-
346-
for (size_type i = 1, end = after.size(); i < end; ++i) {
347-
assert(after[i - 1].id() < after[i].id());
348-
}
349-
}
350-
351321
//--------------------------------------------------------------------
352322
//
353323
// Consumes View<Simple>
@@ -383,82 +353,15 @@ namespace edmtest {
383353
bool const checkSize_;
384354
};
385355

386-
//--------------------------------------------------------------------
387-
//
388-
class DSVAnalyzer : public edm::global::EDAnalyzer<> {
389-
public:
390-
DSVAnalyzer(edm::ParameterSet const&) {}
391-
392-
void analyze(edm::StreamID, edm::Event const& e, edm::EventSetup const&) const final;
393-
394-
private:
395-
void do_sorted_stuff(edm::Event const& e) const;
396-
void do_unsorted_stuff(edm::Event const& e) const;
397-
};
398-
399-
void DSVAnalyzer::analyze(edm::StreamID, edm::Event const& e, edm::EventSetup const&) const {
400-
do_sorted_stuff(e);
401-
do_unsorted_stuff(e);
402-
}
403-
404-
void DSVAnalyzer::do_sorted_stuff(edm::Event const& e) const {
405-
typedef DSVSimpleProduct product_type;
406-
typedef product_type::value_type detset;
407-
typedef detset::value_type value_type;
408-
// Get the product back out; it should be sorted.
409-
edm::Handle<product_type> h;
410-
e.getByLabel("dsv1", h);
411-
assert(h.isValid());
412-
413-
// Check the sorting. DO NOT DO THIS IN NORMAL CODE; we are
414-
// copying all the values out of the DetSetVector's first DetSet so we can
415-
// manipulate them via an interface different from
416-
// DetSet, just so that we can make sure the collection
417-
// is sorted.
418-
std::vector<value_type> const& after = (h->end() - 1)->data;
419-
typedef std::vector<value_type>::size_type size_type;
420-
421-
// Verify that the vector *is* sorted.
422-
423-
for (size_type i = 1, end = after.size(); i < end; ++i) {
424-
assert(after[i - 1].data < after[i].data);
425-
}
426-
}
427-
428-
void DSVAnalyzer::do_unsorted_stuff(edm::Event const& e) const {
429-
typedef DSVWeirdProduct product_type;
430-
typedef product_type::value_type detset;
431-
typedef detset::value_type value_type;
432-
// Get the product back out; it should be unsorted.
433-
edm::Handle<product_type> h;
434-
e.getByLabel("dsv1", h);
435-
assert(h.isValid());
436-
437-
// Check the sorting. DO NOT DO THIS IN NORMAL CODE; we are
438-
// copying all the values out of the DetSetVector's first DetSet so we can
439-
// manipulate them via an interface different from
440-
// DetSet, just so that we can make sure the collection
441-
// is not sorted.
442-
std::vector<value_type> const& after = (h->end() - 1)->data;
443-
typedef std::vector<value_type>::size_type size_type;
444-
445-
// Verify that the vector is reverse-sorted.
446-
447-
for (size_type i = 1, end = after.size(); i < end; ++i) {
448-
assert(after[i - 1].data > after[i].data);
449-
}
450-
}
451356
} // namespace edmtest
452357

453358
using edmtest::BuiltinIntTestAnalyzer;
454359
using edmtest::ConsumingOneSharedResourceAnalyzer;
455360
using edmtest::ConsumingStreamAnalyzer;
456-
using edmtest::DSVAnalyzer;
457361
using edmtest::IntConsumingAnalyzer;
458362
using edmtest::IntTestAnalyzer;
459363
using edmtest::MultipleIntsAnalyzer;
460364
using edmtest::NonAnalyzer;
461-
using edmtest::SCSimpleAnalyzer;
462365
using edmtest::SimpleViewAnalyzer;
463366
DEFINE_FWK_MODULE(NonAnalyzer);
464367
DEFINE_FWK_MODULE(IntTestAnalyzer);
@@ -468,7 +371,5 @@ DEFINE_FWK_MODULE(IntConsumingAnalyzer);
468371
DEFINE_FWK_MODULE(edmtest::IntFromRunConsumingAnalyzer);
469372
DEFINE_FWK_MODULE(ConsumingStreamAnalyzer);
470373
DEFINE_FWK_MODULE(ConsumingOneSharedResourceAnalyzer);
471-
DEFINE_FWK_MODULE(SCSimpleAnalyzer);
472374
DEFINE_FWK_MODULE(SimpleViewAnalyzer);
473-
DEFINE_FWK_MODULE(DSVAnalyzer);
474375
DEFINE_FWK_MODULE(BuiltinIntTestAnalyzer);

FWCore/Framework/test/stubs/ToyModules.cc

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -265,75 +265,6 @@ namespace edmtest {
265265
e.put(std::move(p));
266266
}
267267

268-
//--------------------------------------------------------------------
269-
//
270-
// Produces two products: (new DataSetVector)
271-
// DSTVSimpleProduct
272-
// DSTVSimpleDerivedProduct
273-
//
274-
class DSTVProducer : public edm::stream::EDProducer<> {
275-
public:
276-
explicit DSTVProducer(edm::ParameterSet const& p) : size_(p.getParameter<int>("size")) {
277-
produces<DSTVSimpleProduct>();
278-
produces<DSTVSimpleDerivedProduct>();
279-
assert(size_ > 1);
280-
}
281-
282-
explicit DSTVProducer(int i) : size_(i) {
283-
produces<DSTVSimpleProduct>();
284-
produces<DSTVSimpleDerivedProduct>();
285-
assert(size_ > 1);
286-
}
287-
288-
virtual ~DSTVProducer() {}
289-
290-
virtual void produce(edm::Event& e, edm::EventSetup const&) override;
291-
292-
private:
293-
template <typename PROD>
294-
void make_a_product(edm::Event& e);
295-
void fill_a_data(DSTVSimpleProduct::data_type& d, unsigned int i);
296-
void fill_a_data(DSTVSimpleDerivedProduct::data_type& d, unsigned int i);
297-
298-
int size_;
299-
};
300-
301-
void DSTVProducer::produce(edm::Event& e, edm::EventSetup const& /* unused */) {
302-
this->make_a_product<DSTVSimpleProduct>(e);
303-
this->make_a_product<DSTVSimpleDerivedProduct>(e);
304-
}
305-
306-
void DSTVProducer::fill_a_data(DSTVSimpleDerivedProduct::data_type& d, unsigned int i) {
307-
d.key = size_ - i;
308-
d.value = 1.5 * i;
309-
}
310-
311-
void DSTVProducer::fill_a_data(DSTVSimpleProduct::data_type& d, unsigned int i) { d.data = size_ - i; }
312-
313-
template <typename PROD>
314-
void DSTVProducer::make_a_product(edm::Event& e) {
315-
typedef PROD product_type;
316-
//FIXME
317-
typedef typename product_type::FastFiller detset;
318-
typedef typename detset::id_type id_type;
319-
320-
auto p = std::make_unique<product_type>();
321-
product_type& v = *p;
322-
323-
unsigned int n = 0;
324-
for (id_type id = 1; id < static_cast<id_type>(size_); ++id) {
325-
++n;
326-
detset item(v, id); // this will get DetID id
327-
item.resize(n);
328-
for (unsigned int i = 0; i < n; ++i)
329-
fill_a_data(item[i], i);
330-
}
331-
332-
// Put the product into the Event, thus sorting is not done by magic,
333-
// up to one user-line
334-
e.put(std::move(p));
335-
}
336-
337268
//--------------------------------------------------------------------
338269
//
339270
// Produces an Prodigal instance.
@@ -402,7 +333,6 @@ namespace edmtest {
402333
} // namespace edmtest
403334

404335
using edmtest::AVSimpleProducer;
405-
using edmtest::DSTVProducer;
406336
using edmtest::DSVProducer;
407337
using edmtest::IntProductFilter;
408338
using edmtest::OVSimpleProducer;
@@ -414,6 +344,5 @@ DEFINE_FWK_MODULE(OVSimpleProducer);
414344
DEFINE_FWK_MODULE(VSimpleProducer);
415345
DEFINE_FWK_MODULE(AVSimpleProducer);
416346
DEFINE_FWK_MODULE(DSVProducer);
417-
DEFINE_FWK_MODULE(DSTVProducer);
418347
DEFINE_FWK_MODULE(ProdigalProducer);
419348
DEFINE_FWK_MODULE(IntProductFilter);

FWCore/Integration/test/detsetvector_t.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

FWCore/Integration/test/detsetvector_t_cfg.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

FWCore/Integration/test/newdetsetvector_t.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

FWCore/Integration/test/newdetsetvector_t_cfg.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)