Look up products dependent on the current slice. More...
Public Member Functions | |
SliceNavigator (const fhicl::ParameterSet &pset, art::ActivityRegistry ®) | |
~SliceNavigator () | |
void | reconfigure (const fhicl::ParameterSet &pset) override |
void | preBeginRun (art::Run const &r) |
void | postProcessEvent (const art::Event &evt) |
template<class T > | |
size_t | GetProducts (const art::Event &evt, const std::string &which, const std::string &instance, std::vector< const T * > &prods) |
template<class T > | |
size_t | GetProducts (const art::Event &evt, const std::string &whichTrack, const std::string &whichMichel, const std::string &instance, std::vector< const T * > &prods) |
bool | FullEventMode () const |
void | SetFullEventMode (bool mode) |
void | Previous () |
void | Next () |
int | CurrentSlice () const |
int | CurrentSliceIndex () const |
void | AutoAdvance () |
void | StopAutoAdvance () |
bool | AutoAdvancing () |
void | SetCurrentSlice (int slice) |
int | MaxSlice () const |
std::vector< const rb::Cluster * > | SlicesToNavigate (const art::Event &evt) |
void | GetBounds (const art::Event &evt, double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax, double trimfrac=0) |
void | GetBox (const art::Event &evt, double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax, double trimfrac=0) |
bool | DimHits () const |
bool | DimOthers () const |
template<> | |
size_t | GetProductsImplFull (const art::Event &evt, const std::string &which, const std::string &instance, std::vector< const rb::Cluster * > &clusts) |
template<> | |
size_t | GetProducts (const art::Event &evt, const std::string &whichTrack, const std::string &whichMichel, const std::string &instance, std::vector< const rb::Track * > &tracks) |
template<> | |
size_t | GetProducts (const art::Event &evt, const std::string &which, const std::string &instance, std::vector< const rb::Cluster * > &clusts) |
template<> | |
size_t | GetProducts (const art::Event &evt, const std::string &which, const std::string &instance, std::vector< const simb::MCTruth * > &truths) |
Protected Member Functions | |
Bool_t | HandleTimer (TTimer *t) |
template<class T > | |
size_t | GetProductsImpl (const art::Event &evt, const std::string &which, const std::string &instance, std::vector< const T * > &prods) |
template<class T > | |
size_t | GetProductsImplFull (const art::Event &evt, const std::string &which, const std::string &instance, std::vector< const T * > &prods) |
template<class T > | |
size_t | GetProductsImplPart (const art::Event &evt, const std::string &which, const std::string &instance, std::vector< const T * > &prods) |
void | ParseModuleInstanceString (std::string &mod, std::string &inst) |
std::string | stringReplace (std::string &s, const std::string &toReplace, const std::string &replaceWith) |
Protected Attributes | |
int | fAutoAdvanceInterval |
Wait time in milliseconds. More... | |
std::string | fAutoPrintPattern |
Pattern for constructing filename. More... | |
int | fAutoPrintMax |
How many events to print (zero = disable printing) More... | |
int | fAutoPrintCount |
int | fRun |
bool | fFilterResults |
Only navigate slices that aren't filtered out. More... | |
bool | fDimHits |
bool | fDimOthers |
std::string | fSliceLabel |
std::string | fCellHitLabel |
std::string | fSliceInstance |
std::string | fCellHitInstance |
bool | fFullEvent |
int | fCurrentSlice |
Index into fSlicesToNavigate. More... | |
int | fMaxSliceId |
std::vector< int > | fSlicesToNavigate |
std::vector< art::Ptr< rb::Cluster > > | fSlices |
art::PtrVector< rb::CellHit > | fAllHits |
int | fInitialSlice |
-1 afterwards More... | |
TTimer * | fTimer |
Private Member Functions | |
void | do_reconfigure (fhicl::ParameterSet const &pset) |
Look up products dependent on the current slice.
Definition at line 23 of file SliceNavigator.h.
|
explicit |
Definition at line 40 of file SliceNavigator_service.cc.
References fAutoPrintCount, fCurrentSlice, fFullEvent, fInitialSlice, fMaxSliceId, fRun, fTimer, evdb::kDRAWING_SERVICE, evdb::ServiceTable::OverrideCategory(), postProcessEvent(), preBeginRun(), and reconfigure().
evd::SliceNavigator::~SliceNavigator | ( | ) |
Definition at line 61 of file SliceNavigator_service.cc.
References fSlicesToNavigate, and fTimer.
void evd::SliceNavigator::AutoAdvance | ( | ) |
Definition at line 494 of file SliceNavigator_service.cc.
References fAutoAdvanceInterval, and fTimer.
Referenced by evd::SliceButtonBar::AutoAdvance().
bool evd::SliceNavigator::AutoAdvancing | ( | ) |
Definition at line 513 of file SliceNavigator_service.cc.
References fTimer.
Referenced by evd::SliceButtonBar::AutoAdvance().
int evd::SliceNavigator::CurrentSlice | ( | ) | const |
Definition at line 519 of file SliceNavigator_service.cc.
References fCurrentSlice, and fSlicesToNavigate.
Referenced by postProcessEvent(), evd::SliceButtonBar::SliceButtonBar(), and evd::SliceButtonBar::Update().
int evd::SliceNavigator::CurrentSliceIndex | ( | ) | const |
Definition at line 527 of file SliceNavigator_service.cc.
References fCurrentSlice.
Referenced by evd::RawDataDrawer::RawDigit2D(), evd::RawDataDrawer::RawDigit3D(), and evd::RawDataDrawer::RawDigitHardware().
|
inline |
Definition at line 75 of file SliceNavigator.h.
References fDimHits.
Referenced by evd::RecoBaseDrawer::CellHit2D().
|
inline |
Definition at line 76 of file SliceNavigator.h.
References fDimOthers, GetProductsImpl(), GetProductsImplFull(), GetProductsImplPart(), HandleTimer(), APDHVSetting::mod, ParseModuleInstanceString(), string, stringReplace(), and confusionMatrixTree::t.
Referenced by evd::RawDataDrawer::RawDigit2D(), evd::RawDataDrawer::RawDigit3D(), and evd::RawDataDrawer::RawDigitHardware().
|
inlineinherited |
Definition at line 17 of file Reconfigurable.h.
bool evd::SliceNavigator::FullEventMode | ( | ) | const |
Definition at line 447 of file SliceNavigator_service.cc.
References fFullEvent.
Referenced by evd::RawDataDrawer::RawDigit2D(), evd::RawDataDrawer::RawDigit3D(), evd::RawDataDrawer::RawDigitHardware(), and evd::SliceButtonBar::SliceButtonBar().
void evd::SliceNavigator::GetBounds | ( | const art::Event & | evt, |
double & | xmin, | ||
double & | xmax, | ||
double & | ymin, | ||
double & | ymax, | ||
double & | zmin, | ||
double & | zmax, | ||
double | trimfrac = 0 |
||
) |
Definition at line 556 of file SliceNavigator_service.cc.
References rb::CellHit::Cell(), rb::Cluster::Cell(), om::cerr, geo::GeometryBase::DetHalfHeight(), geo::GeometryBase::DetHalfWidth(), geo::GeometryBase::DetLength(), allTimeWatchdog::endl, art::Handle< T >::failedToGet(), fCurrentSlice, fSliceInstance, fSliceLabel, fSlicesToNavigate, geom(), art::DataViewImpl::getByLabel(), MECModelEnuComparisons::i, geo::kX, rb::Cluster::MaxXYZ(), rb::Cluster::MinXYZ(), rb::Cluster::NCell(), rb::CellHit::Plane(), geo::GeometryBase::Plane(), and rb::CellHit::View().
Referenced by evd::TZProjPad::AutoZoomSlice().
void evd::SliceNavigator::GetBox | ( | const art::Event & | evt, |
double & | xmin, | ||
double & | xmax, | ||
double & | ymin, | ||
double & | ymax, | ||
double & | zmin, | ||
double & | zmax, | ||
double | trimfrac = 0 |
||
) |
Definition at line 621 of file SliceNavigator_service.cc.
References rb::CellHit::Cell(), rb::Cluster::Cell(), om::cerr, geo::GeometryBase::DetHalfHeight(), geo::GeometryBase::DetHalfWidth(), geo::GeometryBase::DetLength(), allTimeWatchdog::endl, art::Handle< T >::failedToGet(), fCurrentSlice, evd::GeometryDrawingOptions::fSliceBoxSize, fSliceInstance, fSliceLabel, fSlicesToNavigate, geom(), art::DataViewImpl::getByLabel(), MECModelEnuComparisons::i, geo::kX, rb::Cluster::MaxXYZ(), rb::Cluster::MinXYZ(), rb::Cluster::NCell(), rb::CellHit::Plane(), geo::GeometryBase::Plane(), nd_projection_maker::sizes, rb::CellHit::View(), make_mec_shifts_plots::xmin, and ymin.
Referenced by evd::TZProjPad::AutoZoomBox().
size_t evd::SliceNavigator::GetProducts | ( | const art::Event & | evt, |
const std::string & | which, | ||
const std::string & | instance, | ||
std::vector< const T * > & | prods | ||
) |
Definition at line 219 of file SliceNavigator_service.cc.
References GetProductsImpl().
Referenced by evd::RecoBaseDrawer::CellHit2D(), evd::RecoBaseDrawer::CellHit3D(), evd::RecoBaseDrawer::Cluster2D(), evd::RecoBaseDrawer::FillTQHisto(), evd::SimulationDrawer::GetMCTruth(), GetProducts(), GetProductsImplPart(), evd::RecoBaseDrawer::HoughResult2D(), evd::RecoBaseDrawer::OfflineChans2D(), postProcessEvent(), evd::RecoBaseDrawer::Prong2D(), evd::RecoBaseDrawer::Prong3D(), evd::RecoBaseDrawer::Track2D(), and evd::RecoBaseDrawer::Vertex2D().
size_t evd::SliceNavigator::GetProducts | ( | const art::Event & | evt, |
const std::string & | whichTrack, | ||
const std::string & | whichMichel, | ||
const std::string & | instance, | ||
std::vector< const T * > & | prods | ||
) |
size_t evd::SliceNavigator::GetProducts | ( | const art::Event & | evt, |
const std::string & | whichTrack, | ||
const std::string & | whichMichel, | ||
const std::string & | instance, | ||
std::vector< const rb::Track * > & | tracks | ||
) |
Definition at line 365 of file SliceNavigator_service.cc.
References plot_validation_datamc::c, GetProducts(), and GetProductsImpl().
size_t evd::SliceNavigator::GetProducts | ( | const art::Event & | evt, |
const std::string & | which, | ||
const std::string & | instance, | ||
std::vector< const rb::Cluster * > & | clusts | ||
) |
Definition at line 384 of file SliceNavigator_service.cc.
References om::cerr, allTimeWatchdog::endl, art::Handle< T >::failedToGet(), fCurrentSlice, fFilterResults, fFullEvent, fSliceLabel, fSlicesToNavigate, art::DataViewImpl::getByLabel(), GetProducts(), GetProductsImplFull(), compare_h5_caf::idx, and rb::IsFiltered().
size_t evd::SliceNavigator::GetProducts | ( | const art::Event & | evt, |
const std::string & | which, | ||
const std::string & | instance, | ||
std::vector< const simb::MCTruth * > & | truths | ||
) |
Definition at line 423 of file SliceNavigator_service.cc.
References fAllHits, fCurrentSlice, fFullEvent, fSlices, fSlicesToNavigate, GetProductsImpl(), and cheat::BackTracker::SliceToMCTruth().
|
protected |
Definition at line 229 of file SliceNavigator_service.cc.
References fFullEvent, GetProductsImplFull(), and GetProductsImplPart().
Referenced by DimOthers(), and GetProducts().
|
protected |
Definition at line 266 of file SliceNavigator_service.cc.
References om::cerr, distance(), e, allTimeWatchdog::endl, fFilterResults, art::fill_ptr_vector(), fSliceInstance, fSliceLabel, art::DataViewImpl::getByLabel(), GetProductsImplPart(), MECModelEnuComparisons::i, rb::IsFiltered(), T, and APDHVSetting::temp.
Referenced by DimOthers(), GetProducts(), GetProductsImpl(), and GetProductsImplFull().
size_t evd::SliceNavigator::GetProductsImplFull | ( | const art::Event & | evt, |
const std::string & | which, | ||
const std::string & | instance, | ||
std::vector< const rb::Cluster * > & | clusts | ||
) |
Definition at line 246 of file SliceNavigator_service.cc.
References om::cerr, e, allTimeWatchdog::endl, GetProductsImplFull(), art::DataViewImpl::getView(), and APDHVSetting::temp.
|
protected |
Definition at line 334 of file SliceNavigator_service.cc.
References om::cerr, allTimeWatchdog::endl, art::Handle< T >::failedToGet(), fCurrentSlice, PandAna.Demos.pi0_spectra::fmt, fSliceInstance, fSliceLabel, fSlicesToNavigate, art::DataViewImpl::getByLabel(), GetProducts(), and T.
Referenced by DimOthers(), GetProductsImpl(), and GetProductsImplFull().
|
protected |
Definition at line 729 of file SliceNavigator_service.cc.
References Next().
Referenced by DimOthers().
int evd::SliceNavigator::MaxSlice | ( | ) | const |
Definition at line 550 of file SliceNavigator_service.cc.
References fMaxSliceId.
Referenced by evd::SliceButtonBar::Update().
void evd::SliceNavigator::Next | ( | ) |
Definition at line 478 of file SliceNavigator_service.cc.
References fCurrentSlice, fSlicesToNavigate, evdb::kNEXT_EVENT, evdb::kRELOAD_EVENT, and evdb::NavState::Set().
Referenced by HandleTimer(), and evd::SliceButtonBar::Next().
|
protected |
Definition at line 88 of file SliceNavigator_service.cc.
Referenced by DimOthers(), and reconfigure().
void evd::SliceNavigator::postProcessEvent | ( | const art::Event & | evt | ) |
Definition at line 107 of file SliceNavigator_service.cc.
References om::cerr, art::PtrVector< T >::clear(), om::cout, CurrentSlice(), allTimeWatchdog::endl, art::Event::event(), exit(), art::Handle< T >::failedToGet(), fAllHits, fAutoAdvanceInterval, fAutoPrintCount, fAutoPrintMax, fAutoPrintPattern, fCellHitInstance, fCellHitLabel, fCurrentSlice, fFilterResults, fFullEvent, shutoffs::filename, fInitialSlice, fMaxSliceId, fRun, fSliceInstance, fSliceLabel, fSlices, fSlicesToNavigate, fTimer, art::DataViewImpl::getByLabel(), evdb::Printable::GetPrintables(), GetProducts(), MECModelEnuComparisons::i, rb::IsFiltered(), it, evdb::kNEXT_EVENT, evdb::kPREV_EVENT, evdb::Printable::Print(), nd_projection_maker::ps, art::PtrVector< T >::push_back(), evdb::NavState::Set(), string, stringReplace(), and art::to_string().
Referenced by SliceNavigator().
Definition at line 101 of file SliceNavigator_service.cc.
References fRun, and art::Run::run().
Referenced by SliceNavigator().
void evd::SliceNavigator::Previous | ( | ) |
Definition at line 462 of file SliceNavigator_service.cc.
References fCurrentSlice, fSlicesToNavigate, evdb::kPREV_EVENT, evdb::kRELOAD_EVENT, and evdb::NavState::Set().
Referenced by evd::SliceButtonBar::Previous().
|
override |
Definition at line 68 of file SliceNavigator_service.cc.
References fAutoAdvanceInterval, fAutoPrintMax, fAutoPrintPattern, fCellHitInstance, fCellHitLabel, fDimHits, fDimOthers, fFilterResults, fFullEvent, fInitialSlice, fSliceInstance, fSliceLabel, fhicl::ParameterSet::get(), ParseModuleInstanceString(), and string.
Referenced by SliceNavigator().
Definition at line 533 of file SliceNavigator_service.cc.
References fCurrentSlice, fSlicesToNavigate, it, evdb::kRELOAD_EVENT, and evdb::NavState::Set().
Referenced by evd::SliceButtonBar::GoTo().
void evd::SliceNavigator::SetFullEventMode | ( | bool | mode | ) |
Definition at line 453 of file SliceNavigator_service.cc.
References fFullEvent, evdb::kRELOAD_EVENT, submit_nova_art::mode, and evdb::NavState::Set().
Referenced by evd::SliceButtonBar::Enable().
std::vector< const rb::Cluster * > evd::SliceNavigator::SlicesToNavigate | ( | const art::Event & | evt | ) |
Definition at line 707 of file SliceNavigator_service.cc.
References art::Handle< T >::failedToGet(), fSliceInstance, fSliceLabel, fSlicesToNavigate, art::DataViewImpl::getByLabel(), and MECModelEnuComparisons::i.
Referenced by evd::RecoBaseDrawer::CellHit2D(), evd::RawDataDrawer::RawDigit2D(), evd::RawDataDrawer::RawDigit3D(), and evd::RawDataDrawer::RawDigitHardware().
void evd::SliceNavigator::StopAutoAdvance | ( | ) |
Definition at line 504 of file SliceNavigator_service.cc.
References fTimer.
Referenced by evd::SliceButtonBar::AutoAdvance().
|
protected |
Definition at line 721 of file SliceNavigator_service.cc.
Referenced by DimOthers(), and postProcessEvent().
|
protected |
Definition at line 127 of file SliceNavigator.h.
Referenced by GetProducts(), and postProcessEvent().
|
protected |
Wait time in milliseconds.
Definition at line 106 of file SliceNavigator.h.
Referenced by AutoAdvance(), postProcessEvent(), and reconfigure().
|
protected |
Definition at line 110 of file SliceNavigator.h.
Referenced by postProcessEvent(), and SliceNavigator().
|
protected |
How many events to print (zero = disable printing)
Definition at line 108 of file SliceNavigator.h.
Referenced by postProcessEvent(), and reconfigure().
|
protected |
Pattern for constructing filename.
Definition at line 107 of file SliceNavigator.h.
Referenced by postProcessEvent(), and reconfigure().
|
protected |
Definition at line 120 of file SliceNavigator.h.
Referenced by postProcessEvent(), and reconfigure().
|
protected |
Definition at line 118 of file SliceNavigator.h.
Referenced by postProcessEvent(), and reconfigure().
|
protected |
Index into fSlicesToNavigate.
Definition at line 122 of file SliceNavigator.h.
Referenced by CurrentSlice(), CurrentSliceIndex(), GetBounds(), GetBox(), GetProducts(), GetProductsImplPart(), Next(), postProcessEvent(), Previous(), SetCurrentSlice(), and SliceNavigator().
|
protected |
Definition at line 115 of file SliceNavigator.h.
Referenced by DimHits(), and reconfigure().
|
protected |
Definition at line 116 of file SliceNavigator.h.
Referenced by DimOthers(), and reconfigure().
|
protected |
Only navigate slices that aren't filtered out.
Definition at line 114 of file SliceNavigator.h.
Referenced by GetProducts(), GetProductsImplFull(), postProcessEvent(), and reconfigure().
|
protected |
Definition at line 121 of file SliceNavigator.h.
Referenced by FullEventMode(), GetProducts(), GetProductsImpl(), postProcessEvent(), reconfigure(), SetFullEventMode(), and SliceNavigator().
|
protected |
-1 afterwards
Definition at line 129 of file SliceNavigator.h.
Referenced by postProcessEvent(), reconfigure(), and SliceNavigator().
|
protected |
Definition at line 123 of file SliceNavigator.h.
Referenced by MaxSlice(), postProcessEvent(), and SliceNavigator().
|
protected |
Definition at line 112 of file SliceNavigator.h.
Referenced by postProcessEvent(), preBeginRun(), and SliceNavigator().
|
protected |
Definition at line 119 of file SliceNavigator.h.
Referenced by GetBounds(), GetBox(), GetProductsImplFull(), GetProductsImplPart(), postProcessEvent(), reconfigure(), and SlicesToNavigate().
|
protected |
Definition at line 117 of file SliceNavigator.h.
Referenced by GetBounds(), GetBox(), GetProducts(), GetProductsImplFull(), GetProductsImplPart(), postProcessEvent(), reconfigure(), and SlicesToNavigate().
|
protected |
Definition at line 126 of file SliceNavigator.h.
Referenced by GetProducts(), and postProcessEvent().
|
protected |
Definition at line 124 of file SliceNavigator.h.
Referenced by CurrentSlice(), GetBounds(), GetBox(), GetProducts(), GetProductsImplPart(), Next(), postProcessEvent(), Previous(), SetCurrentSlice(), SlicesToNavigate(), and ~SliceNavigator().
|
protected |
Definition at line 131 of file SliceNavigator.h.
Referenced by AutoAdvance(), AutoAdvancing(), postProcessEvent(), SliceNavigator(), StopAutoAdvance(), and ~SliceNavigator().