#include "EvNavHandler.h" #include "HKED_Util.h" #include using std::cout; using std::endl; ClassImp(EvNavHandler) void EvNavHandler::Fwd() { if (fHKED->event_id < fHKED->wcsimT->GetEntries()) { if(fHKED->UnrolledScene != 0){ TEveElement* CherenkovHits=fHKED->UnrolledScene->FindChild(Form("CherenkovHits (Unrolled version) %i",fHKED->event_id)); if(CherenkovHits!=NULL)fHKED->UnrolledScene->RemoveElement(CherenkovHits); } ++fHKED->event_id; fHKED->load_event(); } else { printf("Already at last event.\n"); } } void EvNavHandler::Bck() { if (fHKED->event_id > 0) { --(fHKED->event_id); fHKED->load_event(); } else { printf("Already at first event.\n"); } } void EvNavHandler::AccumulateEventsBoxChanged(Bool_t s) { cout<<" AccumulateEventsBoxChanged(B" <fAccumulateEvents=s; } void EvNavHandler::TruthTrackMinimumEnergyChanged() { fHKED->minTruthTrackEnergyToDraw = fTruthTrackMinimumEnergyWidget->GetNumber(); fHKED->reload_truth(); } void EvNavHandler::ColourIsTimeBoxChanged(Bool_t s) { fHKED->ColourIsTimeBoxChanged(s); } void EvNavHandler::DrawTruthConesChanged(Bool_t s) { fHKED->setDrawTruthCones(s); fHKED->showTruthCones(s); } void EvNavHandler::SwitchGeometry() { if(!fHKED->SwitchGeometry()) { fGeometrySwitchButton->SetText("Simple Geometry"); fGeometrySwitchButton->SetToolTipText("Switch to Simple Geometry"); } else { fGeometrySwitchButton->SetText("Full Geometry"); fGeometrySwitchButton->SetToolTipText("Switch to Full Geometry"); } } void EvNavHandler::ClearOverlays() { fHKED->fHKEVInfo->ClearTemporary(); fHKED->fHKEVInfo2D->ClearTemporary(); } void EvNavHandler::UnrolledEventAngleChanged() { HKED_Util::UnrollViewAngle=fUnrolledViewAngleWidget->GetNumber(); fHKED->load_event(); /* cycle angle so that it stays between 0 and 2 pi */ if(HKED_Util::UnrollViewAngle>6.2) fUnrolledViewAngleWidget->SetNumber(HKED_Util::UnrollViewAngle-6.2); else if(HKED_Util::UnrollViewAngle<0) { fUnrolledViewAngleWidget->SetNumber(6.2+HKED_Util::UnrollViewAngle); } }