Public Member Functions | Protected Attributes | List of all members
evd::WebEVD Class Reference
Inheritance diagram for evd::WebEVD:
art::EDAnalyzer art::detail::Analyzer art::detail::LegacyModule art::Observer art::ModuleBase

Public Member Functions

 WebEVD (const fhicl::ParameterSet &pset)
 
void analyze (const art::Event &evt) override
 
void endJob () override
 
- Public Member Functions inherited from art::EDAnalyzer
 EDAnalyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDAnalyzer (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Analyzer
virtual ~Analyzer () noexcept
 
 Analyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 Analyzer (Table< Config > const &config)
 
void doBeginJob (SharedResources const &resources)
 
void doEndJob ()
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenOutputFiles (FileBlock const &fb)
 
void doRespondToCloseOutputFiles (FileBlock const &fb)
 
bool doBeginRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doEndRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed)
 
- Public Member Functions inherited from art::Observer
 ~Observer () noexcept
 
 Observer (Observer const &)=delete
 
 Observer (Observer &&)=delete
 
Observeroperator= (Observer const &)=delete
 
Observeroperator= (Observer &&)=delete
 
void registerProducts (ProductDescriptions &, ModuleDescription const &)
 
void fillDescriptions (ModuleDescription const &)
 
fhicl::ParameterSetID selectorConfig () const
 
- Public Member Functions inherited from art::ModuleBase
virtual ~ModuleBase () noexcept
 
 ModuleBase ()
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 

Protected Attributes

evd::WebEVDServer< art::EventfServer
 
art::ServiceHandle< geo::GeometryfGeom
 

Additional Inherited Members

- Public Types inherited from art::EDAnalyzer
using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 
- Protected Member Functions inherited from art::Observer
std::string const & processName () const
 
bool wantAllEvents () const noexcept
 
bool wantEvent (ScheduleID id, Event const &e) const
 
Handle< TriggerResultsgetTriggerResults (Event const &e) const
 
 Observer (fhicl::ParameterSet const &config)
 
 Observer (std::vector< std::string > const &select_paths, std::vector< std::string > const &reject_paths, fhicl::ParameterSet const &config)
 
- Protected Member Functions inherited from art::ModuleBase
ConsumesCollectorconsumesCollector ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 

Detailed Description

Definition at line 17 of file WebEVD_module.cc.

Constructor & Destructor Documentation

evd::WebEVD::WebEVD ( const fhicl::ParameterSet pset)
explicit

Definition at line 34 of file WebEVD_module.cc.

35  : EDAnalyzer(pset)
36 {
37 }
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.h:25

Member Function Documentation

void evd::WebEVD::analyze ( const art::Event evt)
override

Definition at line 44 of file WebEVD_module.cc.

45 {
46  auto const detProp = art::ServiceHandle<detinfo::DetectorPropertiesService>()->DataFor(evt);
47  const Result res = fServer.serve(evt, fGeom.get(), detProp);
48 
49  switch(res.code){
50  case kNEXT:
51  std::cout << "Next clicked in GUI. Going to next event" << std::endl;
52  // nothing, allow art to proceed to next
53  return;
54 
55  case kPREV:
56  std::cout << "Prev clicked in GUI. Going to previous event" << std::endl;
57  // Because we will automatically increment by one
58  art::ServiceHandle<InputSeeker>()->seekToEvent(-2);
59  return;
60 
61  case kQUIT:
62  // TODO give fServer a chance to clean up
63  std::cout << "Quit clicked in GUI. Goodbye!" << std::endl;
64  exit(0);
65 
66  case kERROR:
67  std::cout << "Error. Quitting" << std::endl;
68  exit(1);
69 
70  case kSEEK:
71  std::cout << "User requested seek to " << res.run << ":"<< res.subrun << ":" << res.event << std::endl;
72  art::ServiceHandle<InputSeeker>()->seekToEvent(art::EventID(res.run,
73  res.subrun,
74  res.event));
75  return;
76 
77  default:
78  std::cout << "Unhandled result code " << res.code << "!" << std::endl;
79  abort();
80  }
81 }
T * get() const
Definition: ServiceHandle.h:63
evd::WebEVDServer< art::Event > fServer
art::ServiceHandle< geo::Geometry > fGeom
Result serve(const T &evt, const geo::GeometryCore *geom, const detinfo::DetectorPropertiesData &detprop)
QTextStream & endl(QTextStream &s)
void evd::WebEVD::endJob ( )
overridevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 39 of file WebEVD_module.cc.

40 {
41  std::cout << "Ran out of events. Goodbye!" << std::endl;
42 }
QTextStream & endl(QTextStream &s)

Member Data Documentation

art::ServiceHandle<geo::Geometry> evd::WebEVD::fGeom
protected

Definition at line 28 of file WebEVD_module.cc.

evd::WebEVDServer<art::Event> evd::WebEVD::fServer
protected

Definition at line 26 of file WebEVD_module.cc.


The documentation for this class was generated from the following file: