#include <NueGui.h>
|
||||||||||||||||
|
Definition at line 7 of file NueGui.cxx. References Background::EBackground, Selection::ESelection, and Systematic::ESystematic. 00008 : TGMainFrame(p, w, h)
00009 {
00010
00011 fDoTotal = 0;
00012 fDoPrint = 0;
00013 fSplitBNue = 0;
00014 fTheta23 = 0;
00015 fCurSel = Selection::kUnknown;
00016 fCurBg = Background::kUnknown;
00017 fCurSys = Systematic::kUnknown;
00018 fComp = NULL;
00019
00020 this->SetBackgroundColor(TColor::Number2Pixel(5));
00021
00022 fLayout = new TGLayoutHints(kLHintsCenterX | kLHintsCenterY);
00023 fGroupFrameSel = new NueGroupFrame(this,"Selections ");
00024 fGroupFrameSel->SetBackgroundColor(TColor::Number2Pixel(5));
00025 fGroupFrameSys = new NueGroupFrame(this,"Systematics");
00026 fGroupFrameSys->SetBackgroundColor(TColor::Number2Pixel(5));
00027 fGroupFrameBg = new NueGroupFrame(this,"Backgrounds");
00028 fGroupFrameBg->SetBackgroundColor(TColor::Number2Pixel(5));
00029
00030 Int_t max_sel_index = 0;
00031 while(strcmp(Selection::AsString(Selection::
00032 ESelection(max_sel_index)),"Unknown")!=0){
00033 Selection::Selection_t sel = Selection::ESelection(max_sel_index);
00034 fSelRBut[sel] = new TGCheckButton(fGroupFrameSel,Selection::AsString(sel),150+max_sel_index);
00035 fSelRBut[sel]->SetBackgroundColor(TColor::Number2Pixel(5));
00036 fGroupFrameSel->AddFrame(fSelRBut[sel], new TGLayoutHints(kLHintsLeft | kLHintsTop));
00037 max_sel_index++;
00038 }
00039 this->AddFrame(fGroupFrameSel,fLayout);
00040
00041 fSplitBut = new TGCheckButton(this, "Split BNue", 6);
00042 fSplitBut->SetBackgroundColor(TColor::Number2Pixel(5));
00043 this->AddFrame(fSplitBut, fLayout);
00044
00045 fButton0 = new TGTextButton(this, "&Load", 10);
00046 fButton0->SetCommand("cout << \"Loading from \" << Selection::AsString(mainWin->GetCurSel()) << \" files\" << endl;");
00047 fButton0->SetBackgroundColor(TColor::Number2Pixel(5));
00048 this->AddFrame(fButton0, fLayout);
00049
00050 Int_t max_bg_index = 0;
00051 while(strcmp(Background::AsString(Background::
00052 EBackground(max_bg_index)),"?Unknown?")!=0){
00053 Background::Background_t bg = Background::EBackground(max_bg_index);
00054 fBgRBut[bg] = new TGCheckButton(fGroupFrameBg,Background::AsString(bg),50+max_bg_index);
00055 fBgRBut[bg]->SetBackgroundColor(TColor::Number2Pixel(5));
00056 fGroupFrameBg->AddFrame(fBgRBut[bg],new TGLayoutHints(kLHintsLeft | kLHintsTop));
00057 max_bg_index++;
00058 }
00059 this->AddFrame(fGroupFrameBg,fLayout);
00060
00061 fSumBut = new TGCheckButton(this, "All Backgrounds", 4);
00062 fSumBut->SetBackgroundColor(TColor::Number2Pixel(5));
00063 this->AddFrame(fSumBut, fLayout);
00064
00065 Int_t max_sys_index = 0;
00066 while(strcmp(Systematic::AsString(Systematic::
00067 ESystematic(max_sys_index)),"Unknown")!=0) {
00068 Systematic::Systematic_t sys = Systematic::ESystematic(max_sys_index);
00069 fSysRBut[sys] = new TGCheckButton(fGroupFrameSys,Systematic::AsString(sys),100+max_sys_index);
00070 fSysRBut[sys]->SetBackgroundColor(TColor::Number2Pixel(5));
00071 fGroupFrameSys->AddFrame(fSysRBut[sys],new TGLayoutHints(kLHintsLeft | kLHintsTop));
00072 max_sys_index++;
00073 }
00074 this->AddFrame(fGroupFrameSys,fLayout);
00075
00076 fOscBut = new TGCheckButton(this, "Theta23", 7);
00077 fOscBut->SetBackgroundColor(TColor::Number2Pixel(5));
00078 this->AddFrame(fOscBut, fLayout);
00079
00080 fButton1 = new TGTextButton(this, "&Draw Plots", 1);
00081 fButton1->SetCommand("cout << \"Drawing Plots: Systematic = \" << Systematic::AsString(mainWin->GetCurSys()) << \" Background = \"; if(mainWin->DoTotal()) cout << \"All\"; else cout << Background::AsString(mainWin->GetCurBg()); cout << endl;");
00082 fButton1->SetBackgroundColor(TColor::Number2Pixel(5));
00083 this->AddFrame(fButton1, fLayout);
00084
00085 fButton2 = new TGTextButton(this, "&Draw Summary", 2);
00086 fButton2->SetCommand("cout << \"Drawing Summary\" << endl;");
00087 fButton2->SetBackgroundColor(TColor::Number2Pixel(5));
00088 this->AddFrame(fButton2, fLayout);
00089
00090 fPrintBut = new TGCheckButton(this, "Print?", 5);
00091 fPrintBut->SetBackgroundColor(TColor::Number2Pixel(5));
00092 this->AddFrame(fPrintBut, fLayout);
00093
00094 fButton3 = new TGTextButton(this, "&Exit", 3);
00095 fButton3->SetCommand(".q" );
00096 fButton3->SetBackgroundColor(TColor::Number2Pixel(5));
00097 this->AddFrame(fButton3, fLayout);
00098
00099 MapSubwindows();
00100 Layout();
00101 SetWindowName("F/N Extrapolation Display");
00102 SetIconName("F/N Extrapolation Display");
00103 MapWindow();
00104
00105 }
|
|
|
Definition at line 154 of file NueGui.cxx. References fBgRBut, fSelRBut, and fSysRBut. 00155 {
00156 delete fComp;
00157 delete fLayout;
00158 delete fGroupFrameSel;
00159 delete fGroupFrameSys;
00160 delete fGroupFrameBg;
00161 delete fButton0;
00162 delete fButton1;
00163 delete fButton2;
00164 delete fButton3;
00165 delete fPrintBut;
00166 delete fSumBut;
00167 delete fSplitBut;
00168 delete fOscBut;
00169
00170 std::map<Selection::Selection_t,TGCheckButton*>::iterator beg_sel = fSelRBut.begin();
00171 while(beg_sel!=fSelRBut.end()){
00172 delete beg_sel->second;
00173 beg_sel++;
00174 }
00175 std::map<Background::Background_t,TGCheckButton*>::iterator beg_bg = fBgRBut.begin();
00176 while(beg_bg!=fBgRBut.end()){
00177 delete beg_bg->second;
00178 beg_bg++;
00179 }
00180 std::map<Systematic::Systematic_t,TGCheckButton*>::iterator beg_sys = fSysRBut.begin();
00181 while(beg_sys!=fSysRBut.end()){
00182 delete beg_sys->second;
00183 beg_sys++;
00184 }
00185 }
|
|
|
Definition at line 48 of file NueGui.h. 00048 { return fDoTotal;}
|
|
|
Definition at line 51 of file NueGui.h. 00051 {return fCurBg;}
|
|
|
Definition at line 49 of file NueGui.h. 00049 {return fCurSel;}
|
|
|
Definition at line 50 of file NueGui.h. 00050 {return fCurSys;}
|
|
||||||||||||||||
|
Definition at line 187 of file NueGui.cxx. References Comparator::DoPrint(), Comparator::DrawAll(), Comparator::DrawSummary(), fComp, fCurBg, fCurSys, fDoPrint, fDoTotal, fSplitBNue, fTheta23, Comparator::SetOscSysString(), and StartComparator(). 00188 {
00189 // Process events generated by the buttons in the frame.
00190 switch (GET_MSG(msg)) {
00191 case kC_COMMAND:
00192 switch (GET_SUBMSG(msg)) {
00193 case kCM_BUTTON:
00194 if(parm1==1) {
00195 if(fDoTotal) fComp->DrawAll(int(fCurSys));
00196 else fComp->DrawAll(int(fCurSys),int(fCurBg));
00197 }
00198 else if(parm1==2) fComp->DrawSummary();
00199 else if(parm1==10) this->StartComparator();
00200 break;
00201 case kCM_CHECKBUTTON:
00202 if(parm1==4) {
00203 if(fDoTotal==false) fDoTotal = true;
00204 else fDoTotal = false;
00205 }
00206 else if(parm1==5) {
00207 if(fDoPrint==false) fDoPrint = true;
00208 else fDoPrint = false;
00209 if(fComp) fComp->DoPrint(fDoPrint);
00210 }
00211 else if(parm1==6) {
00212 if(fSplitBNue==false) fSplitBNue = true;
00213 else fSplitBNue = false;
00214 }
00215 else if(parm1==7) {
00216 if(fTheta23==false) fTheta23 = true;
00217 else fTheta23 = false;
00218 if(fTheta23) fComp->SetOscSysString("Theta23");
00219 else fComp->SetOscSysString("Delta23");
00220 }
00221 break;
00222 default:
00223 break;
00224 }
00225 default:
00226 break;
00227 }
00228 return kTRUE;
00229 }
|
|
|
Definition at line 107 of file NueGui.cxx. References Comparator::AddBackground(), Comparator::AddSysFile(), Selection::AsString(), Comparator::ComputeAll(), Comparator::DoPrint(), Systematic::ESystematic, fComp, fCurSel, fDoPrint, and Comparator::SetOscSysString(). Referenced by ProcessMessage(). 00107 {
00108
00109 if(fCurSel!=Selection::kANN30 && fCurSel!=Selection::kSSPID) {
00110 std::cout << "Selection method: " << Selection::AsString(fCurSel)
00111 << " not currently available" << std::endl;
00112 return;
00113 }
00114
00115 if(fComp) delete fComp;
00116
00117 std::cout << "Processing... " << std::endl;
00118
00119 fComp = new Comparator("RecoEnergy");
00120 fComp->AddBackground(Background::kNC);
00121 fComp->AddBackground(Background::kNuMuCC);
00122 if(fSplitBNue) {
00123 fComp->AddBackground(Background::kPiBNueCC);
00124 fComp->AddBackground(Background::kKaBNueCC);
00125 }
00126 else fComp->AddBackground(Background::kBNueCC);
00127 fComp->AddBackground(Background::kNuTauCC);
00128
00129 Int_t max_sys_index = 0;
00130 while(strcmp(Systematic::AsString(Systematic::
00131 ESystematic(max_sys_index)),"Unknown")!=0) {
00132 Systematic::Systematic_t sys = Systematic::ESystematic(max_sys_index);
00133 //if(sys==Systematic::kShwDev) {max_sys_index++; continue;}
00134 string file = string(string("EnergySpectraHelperFiles/EnergySpectraHelper_") +
00135 string(Selection::AsString(fCurSel)) +
00136 string("_Alter") + string(Systematic::AsString(sys)) +
00137 string(".root")).c_str();
00138
00139 ifstream Test(file.c_str());
00140 if(!Test) std::cout<<"Unable to Find File: "<<file<<std::endl;
00141 else{
00142 Test.close();
00143 fComp->AddSysFile(sys,file);
00144 }
00145 max_sys_index++;
00146 }
00147 fComp->ComputeAll();
00148 fComp->DoPrint(fDoPrint);
00149 if(fTheta23) fComp->SetOscSysString("Theta23");
00150 else fComp->SetOscSysString("Delta23");
00151 std::cout << "Done!" << std::endl;
00152 }
|
|
|
Definition at line 241 of file NueGui.cxx. References fCurSel, and fSelRBut. 00242 {
00243 fCurSel = sel;
00244 std::map<Selection::Selection_t,TGCheckButton*>::iterator beg = fSelRBut.begin();
00245 while(beg!=fSelRBut.end()){
00246 if(beg->first!=sel) beg->second->SetState(kButtonUp);
00247 beg++;
00248 }
00249 }
|
|
|
Definition at line 251 of file NueGui.cxx. References fCurSys, and fSysRBut. 00252 {
00253 fCurSys = sys;
00254 std::map<Systematic::Systematic_t,TGCheckButton*>::iterator beg = fSysRBut.begin();
00255 while(beg!=fSysRBut.end()){
00256 if(beg->first!=sys) beg->second->SetState(kButtonUp);
00257 beg++;
00258 }
00259 }
|
|
|
Definition at line 231 of file NueGui.cxx. References fBgRBut, and fCurBg. Referenced by NueGroupFrame::ProcessMessage(). 00232 {
00233 fCurBg = bg;
00234 std::map<Background::Background_t,TGCheckButton*>::iterator beg = fBgRBut.begin();
00235 while(beg!=fBgRBut.end()){
00236 if(beg->first!=bg) beg->second->SetState(kButtonUp);
00237 beg++;
00238 }
00239 }
|
|
|
Definition at line 23 of file NueGui.h. Referenced by UnCheckAllBut(), and ~NueGui(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 30 of file NueGui.h. Referenced by ProcessMessage(), and StartComparator(). |
|
|
Definition at line 37 of file NueGui.h. Referenced by ProcessMessage(), and UnCheckAllBut(). |
|
|
Definition at line 36 of file NueGui.h. Referenced by StartComparator(), and UnCheckAllBut(). |
|
|
Definition at line 38 of file NueGui.h. Referenced by ProcessMessage(), and UnCheckAllBut(). |
|
|
Definition at line 33 of file NueGui.h. Referenced by ProcessMessage(), and StartComparator(). |
|
|
Definition at line 32 of file NueGui.h. Referenced by ProcessMessage(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 21 of file NueGui.h. Referenced by UnCheckAllBut(), and ~NueGui(). |
|
|
Definition at line 34 of file NueGui.h. Referenced by ProcessMessage(). |
|
|
|
|
|
|
|
|
Definition at line 22 of file NueGui.h. Referenced by UnCheckAllBut(), and ~NueGui(). |
|
|
Definition at line 35 of file NueGui.h. Referenced by ProcessMessage(). |
1.3.9.1