14 : TGMainFrame(gClient->GetRoot(), 320, 320), verbose_(verbose) {
19 SetWindowName(
"LDMX Event Display");
22 TGLViewer* viewer =
manager_->GetDefaultGLViewer();
23 viewer->UseLightColorSet();
26 std::cout <<
"[ Display ] : Drawing detector geometry... " << std::flush;
35 manager_->AddEvent(
new TEveEventManager(
"LDMX Detector",
""));
39 manager_->AddEvent(
new TEveEventManager(
"LDMX Event",
""));
42 std::cout <<
"done" << std::endl;
43 std::cout <<
"[ Display ] : Constructing and linking buttons... "
47 TGVerticalFrame* contents =
new TGVerticalFrame(
this, 1000, 1200);
48 TGHorizontalFrame* commandFrameNextEvent =
49 new TGHorizontalFrame(contents, 100, 0);
50 TGHorizontalFrame* commandFrameColorClusters =
51 new TGHorizontalFrame(contents, 100, 0);
52 TGHorizontalFrame* commandFrameEcalClusterBranch =
53 new TGHorizontalFrame(contents, 100, 0);
54 TGHorizontalFrame* commandFrameSimThresh =
55 new TGHorizontalFrame(contents, 100, 0);
56 TGHorizontalFrame* commandFrameEcalHitBranch =
57 new TGHorizontalFrame(contents, 100, 0);
58 TGHorizontalFrame* commandFrameHcalHitBranch =
59 new TGHorizontalFrame(contents, 100, 0);
60 TGHorizontalFrame* commandFrameTrackerHitsBranch =
61 new TGHorizontalFrame(contents, 100, 0);
62 TGHorizontalFrame* commandFrameEcalScorePlaneBranch =
63 new TGHorizontalFrame(contents, 100, 0);
65 TGButton* buttonColor =
66 new TGTextButton(commandFrameColorClusters,
"Color Clusters");
67 commandFrameColorClusters->AddFrame(buttonColor,
68 new TGLayoutHints(kLHintsExpandX));
69 buttonColor->Connect(
"Pressed()",
"eventdisplay::Display",
this,
72 TGButton* buttonNext =
73 new TGTextButton(commandFrameNextEvent,
"Next Event >>>");
74 commandFrameNextEvent->AddFrame(buttonNext,
75 new TGLayoutHints(kLHintsExpandX));
76 buttonNext->Connect(
"Pressed()",
"eventdisplay::Display",
this,
79 textBoxClustersCollName_ =
80 new TGTextEntry(commandFrameEcalClusterBranch,
new TGTextBuffer(100));
81 commandFrameEcalClusterBranch->AddFrame(textBoxClustersCollName_,
82 new TGLayoutHints(kLHintsExpandX));
84 TGButton* buttonClusterName =
85 new TGTextButton(commandFrameEcalClusterBranch,
"Set Clusters Branch");
86 commandFrameEcalClusterBranch->AddFrame(buttonClusterName,
87 new TGLayoutHints(kLHintsExpandX));
88 buttonClusterName->Connect(
"Pressed()",
"eventdisplay::Display",
this,
89 "GetClustersCollInput()");
92 new TGTextEntry(commandFrameSimThresh,
new TGTextBuffer(100));
93 commandFrameSimThresh->AddFrame(textBoxSimThresh_,
94 new TGLayoutHints(kLHintsExpandX));
96 TGButton* buttonDrawThresh =
97 new TGTextButton(commandFrameSimThresh,
"Sim P [MeV] Threshold");
98 commandFrameSimThresh->AddFrame(buttonDrawThresh,
99 new TGLayoutHints(kLHintsExpandX));
100 buttonDrawThresh->Connect(
"Pressed()",
"eventdisplay::Display",
this,
103 textBoxEcalRecHitsCollName_ =
104 new TGTextEntry(commandFrameEcalHitBranch,
new TGTextBuffer(100));
105 commandFrameEcalHitBranch->AddFrame(textBoxEcalRecHitsCollName_,
106 new TGLayoutHints(kLHintsExpandX));
108 TGButton* buttonSetECALBranch =
109 new TGTextButton(commandFrameEcalHitBranch,
"Set ECAL RecHits Branch");
110 commandFrameEcalHitBranch->AddFrame(buttonSetECALBranch,
111 new TGLayoutHints(kLHintsExpandX));
112 buttonSetECALBranch->Connect(
"Pressed()",
"eventdisplay::Display",
this,
113 "GetECALRecHitsCollInput()");
115 textBoxHcalRecHitsCollName_ =
116 new TGTextEntry(commandFrameHcalHitBranch,
new TGTextBuffer(100));
117 commandFrameHcalHitBranch->AddFrame(textBoxHcalRecHitsCollName_,
118 new TGLayoutHints(kLHintsExpandX));
120 TGButton* buttonSetHCALBranch =
121 new TGTextButton(commandFrameHcalHitBranch,
"Set HCAL RecHits Branch");
122 commandFrameHcalHitBranch->AddFrame(buttonSetHCALBranch,
123 new TGLayoutHints(kLHintsExpandX));
124 buttonSetHCALBranch->Connect(
"Pressed()",
"eventdisplay::Display",
this,
125 "GetHCALRecHitsCollInput()");
127 textBoxTrackerHitsCollName_ =
128 new TGTextEntry(commandFrameTrackerHitsBranch,
new TGTextBuffer(100));
129 commandFrameTrackerHitsBranch->AddFrame(textBoxTrackerHitsCollName_,
130 new TGLayoutHints(kLHintsExpandX));
132 TGButton* buttonSetRecoilBranch =
133 new TGTextButton(commandFrameTrackerHitsBranch,
"Set Recoil Sims Branch");
134 commandFrameTrackerHitsBranch->AddFrame(buttonSetRecoilBranch,
135 new TGLayoutHints(kLHintsExpandX));
136 buttonSetRecoilBranch->Connect(
"Pressed()",
"eventdisplay::Display",
this,
137 "GetTrackerHitsCollInput()");
139 textBoxEcalScorePlaneBranch_ =
140 new TGTextEntry(commandFrameEcalScorePlaneBranch,
new TGTextBuffer(100));
141 commandFrameEcalScorePlaneBranch->AddFrame(textBoxEcalScorePlaneBranch_,
142 new TGLayoutHints(kLHintsExpandX));
144 TGButton* buttonSetSimParticlesBranch =
145 new TGTextButton(commandFrameEcalScorePlaneBranch,
"Set Ecal SP Branch");
146 commandFrameEcalScorePlaneBranch->AddFrame(buttonSetSimParticlesBranch,
147 new TGLayoutHints(kLHintsExpandX));
148 buttonSetSimParticlesBranch->Connect(
"Pressed()",
"eventdisplay::Display",
149 this,
"GetEcalSimParticlesCollInput()");
152 contents->AddFrame(commandFrameEcalHitBranch,
153 new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
154 contents->AddFrame(commandFrameHcalHitBranch,
155 new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
156 contents->AddFrame(commandFrameTrackerHitsBranch,
157 new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
158 contents->AddFrame(commandFrameEcalScorePlaneBranch,
159 new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
160 contents->AddFrame(commandFrameEcalClusterBranch,
161 new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
162 contents->AddFrame(commandFrameNextEvent,
163 new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
164 contents->AddFrame(commandFrameColorClusters,
165 new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
166 contents->AddFrame(commandFrameSimThresh,
167 new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
169 AddFrame(contents,
new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
172 Resize(GetDefaultSize());
178 std::cout <<
"done" << std::endl;