15 #include "TRootEmbeddedCanvas.h" 19 #include "nutools/EventDisplayBase/DisplayWindow.h" 20 #include "nutools/EventDisplayBase/FileMenu.h" 21 #include "nutools/EventDisplayBase/EditMenu.h" 22 #include "nutools/EventDisplayBase/MenuBar.h" 23 #include "nutools/EventDisplayBase/ButtonBar.h" 24 #include "nutools/EventDisplayBase/Canvas.h" 25 #include "nutools/EventDisplayBase/StatusBar.h" 26 #include "nutools/EventDisplayBase/EventHolder.h" 28 #include "cetlib_except/exception.h" 35 static std::vector<DisplayWindow*>
gsWindows(64);
42 static std::vector<std::string>
gsName;
50 for (
size_t i=0; i<
gsWindows.size(); ++i) {
59 for (
size_t i=0; i<
gsWindows.size(); ++i) {
75 for (
size_t i=0; i<
gsWindows.size(); ++i) {
97 const char* description,
104 gsHeight.push_back(h);
105 gsWidth.push_back(w);
106 gsCanvasCreator.push_back(creator);
119 if (type>0)
id =
type;
120 if (
id>=gsName.size())
return 0;
146 <<
" cannot open DisplayWindow";
148 throw cet::exception(
"DisplayWindow") <<
"No ROOT global TClient";
150 const TGWindow* tgw = gClient->GetRoot();
157 unsigned int w = gsWidth[id];
158 unsigned int h = gsHeight[id];
159 fMain =
new TGMainFrame(tgw, w-1, h-1);
167 fMain->SetWindowName(gsName[
id].c_str());
170 fMain->MapSubwindows();
180 fMain->Connect(
"CloseWindow()",
"evdb::DisplayWindow",
this,
"CloseWindow()");
203 for (
unsigned int i=0; i<
gsWindows.size(); ++i) {
MenuBar * fMenuBar
Top menu bar.
void Connect()
Make signal/slot connections.
const art::Event * GetEvent() const
virtual void CloseWindow()
static std::vector< DisplayWindow * > gsWindows(64)
virtual void Draw(const char *opt="")
A status bar on the bottom of the display.
ButtonBar * fButtonBar
Top button bar.
static std::vector< unsigned int > gsWidth
static void SetServicesAll()
Canvas *(* CanvasCreator_t)(TGMainFrame *mf)
Manage all things related to colors for the event display.
static std::vector< CanvasCreator_t > gsCanvasCreator
static int OpenWindow(int type=0)
StatusBar * fStatusBar
Status bar running along the bottom.
static void SetRunEventAll(int run, int event)
static EventHolder * Instance()
static void Register(const char *name, const char *description, unsigned int h, unsigned int w, CanvasCreator_t creator)
Canvas * fDisplay
Display of detector event information.
static std::vector< std::string > gsName
void SetRunEvent(int run, int event)
static void DrawAll(const char *opt=0)
static const std::vector< std::string > & Names()
static std::vector< std::string > gsDescription
EventNumber_t event() const
DisplayWindow(int window=0)
TGMainFrame * fMain
Main window.
virtual void Draw(const char *opt=0)=0
cet::coded_exception< error, detail::translate > exception
Event finding and building.
static std::vector< unsigned int > gsHeight
h
training ###############################