#include <ThingsTSelector2.h>
Public Member Functions | |
void | postProcess (TList &) |
void | process (const edm::Event &iEvent) |
ThingsWorker (const TList *, TList &) | |
Public Attributes | |
TH1F * | h_a |
TH1F * | h_refA |
Definition at line 16 of file ThingsTSelector2.h.
ThingsWorker::ThingsWorker | ( | const TList * | , |
TList & | out | ||
) |
void ThingsWorker::postProcess | ( | TList & | ) |
Definition at line 69 of file ThingsTSelector2.cc.
{ }
void ThingsWorker::process | ( | const edm::Event & | iEvent | ) |
Definition at line 30 of file ThingsTSelector2.cc.
References gather_cfg::cout, exception, edm::Event::getByLabel(), h_a, h_refA, i, cms::Exception::what(), and x.
{ std::cout << "processing event " << std::endl; // chain->GetEntry( entry ); using namespace edmtest; edm::Handle<OtherThingCollection> hOThings; try { iEvent.getByLabel("OtherThing", "testUserTag", hOThings); std::cout << ">> other things found:" << hOThings->size() << std::endl; for ( size_t i = 0; i < hOThings->size(); ++i ) { const OtherThing & thing = (*hOThings)[ i ]; h_refA ->Fill( thing.ref->a ); std::cout << ">> ref->a: " << thing.ref->a << std::endl; } edm::Handle<ThingCollection> hThings; iEvent.getByLabel("Thing",hThings); const ThingCollection& things = *hThings; std::cout << ">> things found:" << things.size() << std::endl; for ( size_t i = 0; i < things.size(); ++i ) { const Thing & thing = things[ i ]; h_a ->Fill( thing.a ); std::cout << ">> a: " << thing.a << std::endl; } } catch (cms::Exception& x) { std::cout << std::endl << "Failed with cms::Exception: " << std::endl; std::cout << x.what() << std::endl; abort(); } catch (std::exception& x) { std::cout << std::endl << "Failed with std::exception" << std::endl; std::cout << x.what() << std::endl; abort(); } catch (...) { std::cout << std::endl << "Failed with unknown exception" << std::endl; abort(); } }
Definition at line 20 of file ThingsTSelector2.h.
Referenced by process(), and ThingsWorker().
Definition at line 21 of file ThingsTSelector2.h.
Referenced by process(), and ThingsWorker().