CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
tfwliteselectortest::ThingsWorker Struct Reference

#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
 

Detailed Description

Definition at line 15 of file ThingsTSelector2.h.

Constructor & Destructor Documentation

ThingsWorker::ThingsWorker ( const TList *  ,
TList &  out 
)

Definition at line 18 of file ThingsTSelector2.cc.

References gather_cfg::cout, h_a, h_refA, kA, and kRefA.

18  {
19  std::cout << "begin" << std::endl;
20  h_a = new TH1F( kA , "a" , 100, 0, 20 );
21  out.Add(h_a);
22 
23  h_refA = new TH1F( kRefA , "refA" , 100, 0, 20 );
24  out.Add(h_refA);
25 }
tuple out
Definition: dbtoconf.py:99
static const char * kA
static const char * kRefA
tuple cout
Definition: gather_cfg.py:121

Member Function Documentation

void ThingsWorker::postProcess ( TList &  )

Definition at line 69 of file ThingsTSelector2.cc.

70 {
71 }
void ThingsWorker::process ( const edm::Event iEvent)

Definition at line 30 of file ThingsTSelector2.cc.

References gather_cfg::cout, cppFunctionSkipper::exception, edm::Event::getByLabel(), h_a, h_refA, i, cms::Exception::what(), and x().

Referenced by ConfigBuilder.ConfigBuilder::addExtraStream(), ConfigBuilder.ConfigBuilder::completeInputCommand(), ConfigBuilder.ConfigBuilder::doNotInlineEventContent(), ConfigBuilder.ConfigBuilder.PrintAllModules::leave(), ConfigBuilder.ConfigBuilder::prepare_HLT(), ConfigBuilder.ConfigBuilder::prepare_LHE(), ConfigBuilder.ConfigBuilder::prepare_PATFILTER(), ConfigBuilder.ConfigBuilder::prepare_VALIDATION(), ConfigBuilder.ConfigBuilder::renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder::renameInputTagsInSequence(), and ConfigBuilder.ConfigBuilder::scheduleSequence().

30  {
31  std::cout << "processing event " << std::endl;
32  // chain->GetEntry( entry );
33  using namespace edmtest;
35  try {
36  iEvent.getByLabel("OtherThing", "testUserTag", hOThings);
37 
38  std::cout << ">> other things found:" << hOThings->size() << std::endl;
39  for ( size_t i = 0; i < hOThings->size(); ++i ) {
40  const OtherThing & thing = (*hOThings)[ i ];
41  h_refA ->Fill( thing.ref->a );
42  std::cout << ">> ref->a: " << thing.ref->a << std::endl;
43  }
44 
46  iEvent.getByLabel("Thing",hThings);
47  const ThingCollection& things = *hThings;
48  std::cout << ">> things found:" << things.size() << std::endl;
49  for ( size_t i = 0; i < things.size(); ++i ) {
50  const Thing & thing = things[ i ];
51  h_a ->Fill( thing.a );
52  std::cout << ">> a: " << thing.a << std::endl;
53  }
54  } catch (cms::Exception& x) {
55  std::cout << std::endl << "Failed with cms::Exception: " << std::endl;
56  std::cout << x.what() << std::endl;
57  abort();
58  } catch (std::exception& x) {
59  std::cout << std::endl << "Failed with std::exception" << std::endl;
60  std::cout << x.what() << std::endl;
61  abort();
62  } catch (...) {
63  std::cout << std::endl << "Failed with unknown exception" << std::endl;
64  abort();
65  }
66 }
virtual char const * what() const
Definition: Exception.cc:141
int i
Definition: DBlmapReader.cc:9
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:420
tuple cout
Definition: gather_cfg.py:121

Member Data Documentation

TH1F* tfwliteselectortest::ThingsWorker::h_a

Definition at line 19 of file ThingsTSelector2.h.

Referenced by process(), and ThingsWorker().

TH1F* tfwliteselectortest::ThingsWorker::h_refA

Definition at line 20 of file ThingsTSelector2.h.

Referenced by process(), and ThingsWorker().