13 #ifndef MAGICDISPLAY_H 14 #define MAGICDISPLAY_H 18 #include "MagicDisplayConventions.h" 19 #include "AnitaConventions.h" 20 #include "CalibratedAnitaEvent.h" 21 #include "AnalysisReco.h" 23 #include "FilterStrategy.h" 24 #include "FourierBuffer.h" 26 #include "AnitaDataset.h" 30 #include "TRootEmbeddedCanvas.h" 154 void applyCut(
const char *cutString);
212 void dumpWaveformsForPeter();
286 std::map<TString, FilterStrategy*>& getFilterStrats(){
return filterStrats;}
288 const TPad * getMainPad()
const {
return fMagicMainPad; }
295 virtual Bool_t HandleSelection(Event_t* event);
296 virtual Bool_t HandleKey(Event_t* event);
297 int doKeyboardShortcut(Event_t* event);
298 void prepareKeyboardShortcuts();
300 void loadPlaylist(
const char* playlist);
301 std::vector<std::vector<long> > fPlaylist;
304 UInt_t getPlaylistRun() {
return fPlaylist[fPlaylistEntry][0]; }
305 Long64_t getPlaylistEvent() {
return fPlaylist[fPlaylistEntry][1]; }
314 TCanvas *fMagicCanvas;
316 TPad *fMagicEventInfoPad;
318 TCanvas *fTurfCanvas;
322 TCanvas *fSumTurfCanvas;
323 TPad *fSumTurfMainPad;
324 TPad *fSumTurfInfoPad;
326 TCanvas *fSurfCanvas;
330 TCanvas *fAvgSurfCanvas;
331 TPad *fAvgSurfMainPad;
332 TPad *fAvgSurfInfoPad;
343 UInt_t fLastFilteredEventNumber;
363 TButton *fVertButton;
364 TButton *fHorizButton;
365 TButton *fBothButton;
366 TButton *fSurfButton;
367 TButton *fPayloadButton;
368 TButton *fInterferometryButton;
369 TButton *fUCorrelatorButton;
370 TButton *butFiltering;
372 TButton *fWaveformButton;
373 TButton *fPowerButton;
374 TButton *fHilbertButton;
375 TButton *fAverageFFTButton;
376 TButton *fTimeEntryButton;
379 TButton *fTurfYScaleButton;
380 TButton *fSurfSurfViewButton;
381 TButton *fSurfPhiViewButton;
382 TButton *fSurfTimeViewButton;
383 TButton *fSurfAdcViewButton;
384 TButton *fSurfKelvinViewButton;
385 TButton *fSurfMeasuredKelvinViewButton;
386 TButton *fSurfLogButton;
388 TButton *fSumTurfYScaleButton;
389 TButton *fAvgSurfSurfViewButton;
390 TButton *fAvgSurfPhiViewButton;
391 TButton *fAvgSurfAdcViewButton;
392 TButton *fAvgSurfKelvinViewButton;
393 TButton *fAvgSurfMeasuredKelvinViewButton;
394 TButton *fAvgSurfLogButton;
397 TButton *fGpsSatViewButton;
398 TButton *fGpsMapViewButton;
400 Int_t fInEventPlayMode;
401 Int_t fEventPlaySleepMs;
402 Int_t fOrderByEventNumber;
403 Int_t fApplyEventCut;
404 TEventList *fCutEventList;
407 Int_t fInSurfPlayMode;
408 Int_t fInAvgSurfPlayMode;
409 Int_t fInGpsPlayMode;
417 void initializeFilterStrategies();
418 void clearFilterStrategies();
419 void drawUCorrelatorFilterButtons();
420 void setNextFilter();
423 std::map<TString, FilterStrategy*> filterStrats;
427 AnitaDataset::DataDirectory fDataDirectory;
429 AnitaDataset::BlindingStrategy fBlindingStrategy;
439 AnitaEmbeddedCanvas(
const char *name=0,
const TGWindow *p=0, UInt_t w=10, UInt_t h=10, UInt_t options=kSunkenFrame|kDoubleBorder, Pixel_t back=GetDefaultFrameBackground())
440 : TRootEmbeddedCanvas(name, p, w, h, options, back) {;}
442 virtual Bool_t HandleContainerKey (Event_t *ev){
444 return md->HandleKey(ev);
450 #endif //MAGICDISPLAY_H TTreeIndex * fAdu5bSatIndex
Inde for ADU5B satellite fun.
enum MagicDisplayCanvasLayoutOption::EMagicDisplayCanvasLayoutOption MagicDisplayCanvasLayoutOption_t
Enumeration for canvas layout.
void stopSurfHkPlaying()
Stops SURF Hk Play modes.
void toggleAvgSurfLogView()
Toggles between log and linear.
MagicDisplay()
Default constructor.
void refreshEventDisplay(bool forceRedo=false)
Refresh the event display and redraw the graphs, this is called everytime a new event is displayed...
void startControlPanel()
Starts the (currently highly buggy) control panel.
int displayNextAvgSurf()
Displays the next entry in the averaged SURF hk tree.
void drawGpsButtons()
Draws the buttons on the GPS rate display.
void stopAvgSurfHkPlaying()
Stops Average SURF Hk Play mode.
Long64_t fEventTreeIndexEntry
The current entry in the TTreeIndex.
void drawTurfButtons()
Draws the buttons on the TURF rate display.
void toggleSurfRfPowerView(Int_t kelvinView)
Toggles betweem adc and Kelvin views.
void startGpsDisplay()
Starts the GPS display window.
void stopGpsPlaying()
Stops GPS Play mode.
void closeCurrentRun()
Closes all currently opened run TFiles, in preparation for changing to a new run. ...
void drawSumTurfButtons()
Draws the buttons on the summed TURF rate display.
void startTurfDisplay()
Starts the TURF Rate display window.
int displayPreviousAvgSurf()
Displays the previous entry in the averaged SURF hk tree.
int displayNextSumTurf()
Displays the next summed TURF rate entry in the tree.
Adu5Pat – The ADU5 Position and Attitude Data.
Adu5Sat – The ADU5 Satellite Information.
Long64_t fG12PosEntry
The current G12 position entry;.
Adu5Vtg – The ADU5 Velocity and Course Information.
void setAvgSurfHkDisplay(MagicDisplaySurfHkDisplay::MagicDisplaySurfHkDisplay_t surfDisplay)
Toggles between surf and phi views.
Does the event reconstruction, and produces a summary of it.
Long64_t fAdu5bVtgEntry
The current ADU5 B velocity entry.
int loadGpsTrees()
Opens the GPS file for the current run.
int displayPreviousSumTurf()
Displays the previous summed TURF rate entry in the tree.
enum WaveCalType::EWaveCalType WaveCalType_t
The calibration enumeration type.
PrettyAnitaHk – The prettified ANITA Hk.
int getSumTurfEntry()
Attempts to get the entry corresponding to fSumTurfRateFile.
int displayPreviousEvent(int nskip=0)
Displays the previous event in the file, normally called by pressing the "Previous" button...
TTreeIndex * fAdu5aSatIndex
Index for ADU5 satellite fun.
G12Pos – The position data from the G12.
Char_t fCurrentBaseDir[180]
The base directory for the ROOT files.
int displayPreviousSurf()
Displays the previous SURF hk entry.
void toggleTimeEventOrdering()
Toggles between time and event ordering.
int displayNextGps()
Displays the next event in the GPS tree.
Long64_t fAdu5bSatEntry
The current ADU5 B satellite entry.
G12Sat – The satellite data from the G12.
int displayNextSurf()
Displays the next SURF hk entry.
void startSurfDisplay()
Starts the SURF Hk display window.
int displayPreviousTurf()
Displays the previous event in the TURF tree.
~MagicDisplay()
Destructor.
Long64_t fAdu5aSatEntry
The current ADU5 A satellite entry.
A filter strategy defines the sets of filters that are used and provides some introspection abilities...
void startEventPlaying()
Starts event playback mode, normally called by pressing the "Play" button the display.
void startAvgSurfDisplay()
Starts the averaged SURF hk display window.
int getAvgSurfEntry()
Attempts to load get the entry corresponding to fAvgSurfHkEntry.
Int_t fWhichEventFileKind
Flag to determine whether or not to use TTrees of lovely CalibratedAnitaEvent objects.
int loadSurfTree()
Opens the SURF hk file for the current run.
Long64_t fEventEntry
The current event+header entry.
Int_t getCurrentRun()
Returns the current run number.
SurfHk – The raw SURF scaler+threshold data.
void refreshAvgSurfDisplay()
Refreshes the averaged SURF hk display.
Long64_t fSumTurfRateEntry
The current summed TURF rate entry.
void refreshGpsDisplay()
Refreshs the GPS display.
enum MagicDisplaySurfHkDisplay::EMagicDisplaySurfHkDisplay MagicDisplaySurfHkDisplay_t
Enumeration for plot style.
int displayLastEvent()
Displays the last event in the file, normally called by pressing the "Last" button.
int loadAvgSurfTree()
Opens the averaged SURF hk file for the current rune.
What you should call for analysis work.
SummedTurfRate – The Summed Turf Rate data.
int displayPreviousGps()
Displays the previous event in the GPS tree.
UCorrelator::Analyzer * getUCorr()
< for command line interface
Long64_t fSurfHkEntry
The current SURF hk entry.
int loadDataset()
Loads the event tree corresponding to the current run number fCurrentRun
void drawEventButtons()
Worker function to draw the buttons on the main event display canvas.
UsefulAnitaEvent – The Calibrated Useful Anita Event object.
Long64_t fTurfRateEntry
The current TURF rate entry.
UInt_t getCurrentEvent()
Returns the current event number.
void toggleSumTurfYScale()
Toggles between fixed and auto-scaling y-axis on the summed TURF display.
static MagicDisplay * fgInstance
The pointer to the current MagicDisplay.
int displayNextTurf()
Displays the next event in the TURF tree.
void startEventPlayingReverse()
Starts the event playback in reverse mode, normally called by pressing the "Rev" button on the main d...
Long64_t fG12SatEntry
The current G12 satellite entry;.
UInt_t fCurrentRun
The current run number.
enum MagicDisplayGpsDisplay::EMagicDisplayGpsDisplay MagicDisplayGpsDisplay_t
Enumeration for plot style.
void toggleTurfYScale()
Toggles betweeen fixed and auto-scaling y-axis pn the TURF rate display.
void toggleSurfLogView()
Toggles between log and linear.
void startSumTurfDisplay()
Starts the summed TURF rate display program.
CalibratedAnitaEvent – The Calibrated Calibrated Anita Event object.
void setCanvasLayout(MagicDisplayCanvasLayoutOption::MagicDisplayCanvasLayoutOption_t option)
Toggles between waveform and FFT view modes.
Long64_t fEventCutListEntry
!< Replaces the need for MagicDisplay to track dataset itself
int getSurfEntry()
Attempts to load the entry corresponding to fSurfHkEntry.
TTreeIndex * fHeadIndex
Reused.
void setSurfHkDisplay(MagicDisplaySurfHkDisplay::MagicDisplaySurfHkDisplay_t surfDisplay)
Toggles between surf and phi views.
void drawAvgSurfButtons()
Draws the buttons on the averaged SURF hk display.
void refreshTurfDisplay()
Refreshs the TURF rate display.
TurfRate – The Turf Rate data.
void refreshSumTurfDisplay()
Refreshes the summed TURF rate display.
Long64_t fAdu5aPatEntry
The current ADU5 A position entry.
void toggleAvgSurfRfPowerView(Int_t kelvinView)
Toggles betweem adc and Kelvin views.
void startSurfHkPlaying()
Starts SURF Hk Play mode.
int loadTurfTree()
Opens the TURF rate file for the current run.
int displayNextEvent(int nskip=0)
!< Display a particular event, uses AnitaDataset to find run if -1 is passed (default) ...
static MagicDisplay * Instance()
Returns a pointer to the active MagicDisplay. This is very useful if you want to access the TTree's d...
void setWaveformFormat(MagicDisplayFormatOption::MagicDisplayFormatOption_t waveformView)
Toggles between waveform and FFT view modes.
The Magic Display control panel.
void refreshSurfDisplay()
Refreshes the SURF Hk display.
int displayFirstEvent()
Displays the first event in the file, normally called by pressing the "First" button.
Long64_t fAdu5aVtgEntry
The current ADU5 A velocity entry.
void startAvgSurfHkPlaying()
Starts Average SURF Hk Play mode.
void drawSurfButtons()
Draws the buttons on the SURF hk display.
int loadSumTurfTree()
Opens the summed TURF rate file for the current run.
int displayThisEvent(UInt_t eventNumber, Int_t run=-1)
Displays a specified event number (from the specified run number). This is an increddibly useful and ...
Long64_t fAdu5bPatEntry
The current ADU5 B position entry.
This class is intended to store all the necessary data about an ANITA event for filtering and analysi...
int getTurfEntry()
Attempts to load the entry corresponding to fTurfRateEntry.
int getGpsEntry()
Attempts to load the entries.
void applyCut(const char *cutString)
Applies a cut to the head tree.
Long64_t fPrettyHkEntry
The current pretty hk entry.
Long64_t fAvgSurfHkEntry
The current averaged SURF hk entry.
The Marvellous ANITA Graphical Interface and Class Display (Magic Display)
void startFilteringPanel()
Starts the filtering control panel, to set filter strategies in the gui.
int getEventEntry()
Tries to retrieve the event corresponding to entry fEventEntry from the evnt file. Returns zero on success.
void startGpsPlaying()
Starts GPS Play mode.
RawAnitaEvent – The Raw ANITA Event Data.
AveragedSurfHk – The Averaged SURF Housekeeping data.
void stopEventPlaying()
Stops the event playback, normally called by pressing the "Stop" button on the main display...