TRestEventViewer.h 1.63 KB
Newer Older
1
2
3
///______________________________________________________________________________
///______________________________________________________________________________
///______________________________________________________________________________
4
///
5
6
7
8
9
///
///             RESTSoft : Software for Rare Event Searches with TPCs
///
///             TRestEventViewer.h
///
10
///             A geometry class to store detector geometry
11
12
13
///
///             jul 2015:   First concept
///                 J. Galan
14
15
16
///		nov 2015: Generic class for event visualization
///		    JuanAn Garcia
///
17
18
19
20
21
///_______________________________________________________________________________

#ifndef RestCore_TRestEventViewer
#define RestCore_TRestEventViewer

22
23
#include <TGeoManager.h>
#include <TObject.h>
24

25
26
27
28
29
#include <iostream>

#include "TGButton.h"
#include "TGLabel.h"
#include "TGTextEntry.h"
30
#include "TRestEvent.h"
31

32
class TRestBrowser;
33
class TRestEventViewer {
34
35
36
   protected:
    TGeoManager* fGeometry = 0;     //!
    TRestEvent* fEvent = 0;         //!
37

38
39
40
    TPad* fPad = 0;
    TCanvas* fCanvas = 0;

41
   public:
42
43
    virtual void Initialize();

44
45
    virtual void AddEvent(TRestEvent* ev);

46
    virtual void Plot(const char* option);
47

48
49
50
51
52
53
54
55
56
    virtual void DeleteCurrentEvent();
    // Setters
    virtual void SetGeometry(TGeoManager* geo) { fGeometry = geo; }
    void SetEvent(TRestEvent* ev) { fEvent = ev; }
    // Getters
    TGeoManager* GetGeometry() { return fGeometry; }
    TRestEvent* GetEvent() { return fEvent; }

    // Construtor
57
    TRestEventViewer();
58
59
    // Destructor
    virtual ~TRestEventViewer();
60

61
    ClassDef(TRestEventViewer, 1);  // REST event superclass
62
63
};
#endif