@@ -27,15 +27,23 @@ namespace edmtest {
2727
2828 private:
2929 edm::EDGetTokenT<HitsOnHost> getToken_;
30+ const unsigned int hitSize_;
31+ const unsigned int offsetBPIX2_;
3032 };
3133
3234 TestReadHostHitSoA::TestReadHostHitSoA (edm::ParameterSet const & iPSet)
33- : getToken_(consumes(iPSet.getParameter<edm::InputTag>(" input" ))) {}
35+ : getToken_(consumes(iPSet.getParameter<edm::InputTag>(" input" ))),
36+ hitSize_ (iPSet.getParameter<unsigned int >(" hitSize" )),
37+ offsetBPIX2_(iPSet.getParameter<unsigned int >(" offsetBPIX2" )) {}
3438
3539 void TestReadHostHitSoA::analyze (edm::StreamID, edm::Event const & iEvent, edm::EventSetup const &) const {
3640 auto const & hits = iEvent.get (getToken_);
3741 auto hitsView = hits.view ();
3842
43+ std::cout << " hitsView.metadata().size() = " << hitsView.metadata ().size () << std::endl;
44+ assert (hitsView.metadata ().size () == int (hitSize_));
45+ assert (hitsView.offsetBPIX2 () == int (offsetBPIX2_));
46+
3947 for (int i = 0 ; i < hitsView.metadata ().size (); ++i) {
4048 if (hitsView[i].xGlobal () != float (i)) {
4149 throw cms::Exception (" TestWriteHostHitSoA Failure" ) << " TestReadHostHitSoA::analyze, entry. i = " << i;
@@ -46,6 +54,8 @@ namespace edmtest {
4654 void TestReadHostHitSoA::fillDescriptions (edm::ConfigurationDescriptions& descriptions) {
4755 edm::ParameterSetDescription desc;
4856 desc.add <edm::InputTag>(" input" );
57+ desc.add <unsigned int >(" hitSize" , 1000 );
58+ desc.add <unsigned int >(" offsetBPIX2" , 50 );
4959 descriptions.addDefault (desc);
5060 }
5161} // namespace edmtest
0 commit comments