2 #ifndef _HDV_MAINFRAME_H_
3 #define _HDV_MAINFRAME_H_
20 #include <TRootEmbeddedCanvas.h>
23 #include <TGComboBox.h>
24 #include <TPolyLine.h>
39 #if !(defined(__CINT__) || defined(__CLING__))
107 void DrawAxes(TCanvas *
c, vector<TObject*> &graphics,
const char *xlab,
const char *
ylab);
108 void DrawScale(TCanvas *
c, vector<TObject*> &graphics);
109 void DrawLabel(TCanvas *
c, vector<TObject*> &graphics,
const char *txt);
115 void SetTrig(
char *trigstring);
211 template<
typename T>
void FillPoly(T *sA, T *sB, T *eA, vector<TVector3> &v);
218 #if (defined(__CINT__) || defined(__CLING__))
220 #pragma link C++ class hdv_mainframe+;
237 for(
unsigned int i=0; i<v.size(); i++){
240 sA->SetNextPoint(pt.Z(), pt.X());
241 sB->SetNextPoint(pt.Z(), pt.Y());
242 eA->SetNextPoint(pt.X(), pt.Y());
244 double phi = pt.Phi();
245 if(phi==0 && i==0 && v.size()>1){
251 if(phi<0.0)phi+=2.0*3.14159265;
252 sA->SetNextPoint(pt.Z(), pt.Perp());
253 sB->SetNextPoint(pt.Z(), phi);
254 eA->SetNextPoint(phi, pt.Perp());
270 unsigned int Npoints = 30;
271 TVector3 s = (v[1] - v[0]);
272 s *= 1.0/(double)(Npoints-1);
274 for(
unsigned int i=1; i<Npoints; i++){
275 TVector3 pt = v[0] + ((double)i)*s;
276 double phi = pt.Phi();
277 if(phi<0.0)phi+=2.0*M_PI;
290 if(fabs(phi-last_phi)>M_PI){
293 reinterpret_cast<TPolyLine*
>(sB)->SetPolyLine(0);
294 reinterpret_cast<TPolyLine*
>(eA)->SetPolyLine(0);
300 sA->SetPoint(i, pt.Z(), pt.Perp());
301 sB->SetNextPoint(pt.Z(), phi);
302 eA->SetNextPoint(phi, pt.Perp());
308 #endif //_HDV_MAINFRAME_H_
TRootEmbeddedCanvas * sideviewA
hdv_fulllistframe * GetFullListFrame(void)
void SetReconstructedFactories(vector< string > &facnames)
void DoEndViewBEvent(TVirtualPad *pad, TObject *obj, Int_t event)
void DrawLabel(TCanvas *c, vector< TObject * > &graphics, const char *txt)
void DrawAxes(TCanvas *c, vector< TObject * > &graphics, const char *xlab, const char *ylab)
void DoOpenOptionsWindow(void)
hdv_fulllistframe * fulllistmf
TCanvas * GetBcalDispFrame(void)
void DoUpdateTrackLabels(void)
TGComboBox * chargedtracksfactory
void SetTrig(char *trigstring)
void DoOpenFCALInspector(void)
bool GetCheckButton(string who)
map< string, TGCheckButton * > checkbuttons
void DoClearBCALInspectorPointer(void)
void DrawDetectorsXY(void)
void SetBcalDispFrame(TCanvas *d)
void DoOpenFullListWindow(void)
void AddGraphicsSideA(vector< TObject * > &v)
TPolyLine * GetCCALPolyLine(int row, int col)
void DoSetCoordinates(Int_t)
void SetEvent(ULong64_t id)
void FillPoly(T *sA, T *sB, T *eA, vector< TVector3 > &v)
map< int, TPolyLine * > bcalblocks
map< int, TPolyLine * > fcalblocks
vector< TObject * > graphics_endA
void DoOpenBCALInspector(void)
void SetTimeBasedTrackFactories(vector< string > &facnames)
void DoClearTOFInspectorPointer(void)
void DoClearFCALInspectorPointer(void)
double default_canvas_width
hdv_debugerframe * debugermf
map< string, vector< TGLabel * > > reconlabs
void AddGraphicsEndA(vector< TObject * > &v)
void AddGraphicsEndB(vector< TObject * > &v)
map< int, map< int, TPolyLine * > > tofblocks
TRootEmbeddedCanvas * endviewB
map< string, vector< TGLabel * > > & GetThrownLabels(void)
map< int, TPolyLine * > ccalblocks
hdv_endviewBframe * endviewBmf
void DoOpenDebugerWindow(void)
TPolyLine * GetBCALPolyLine(int mod, int layer, int sector)
string default_reconstructed
void DoOpenTrackInspector(void)
TPolyLine * GetFCALPolyLine(int channel)
TGComboBox * reconfactory
void DoOpenTOFInspector(void)
void DoClearOptionsWindowPointer(void)
vector< TObject * > graphics_sideA
void SetChargedTrackFactories(vector< string > &facnames)
bool GetDrawTrajectories(void)
vector< TObject * > graphics_endB
void GetReconFactory(string &name, string &tag)
bool GetDrawCandidates(void)
void DoClearTrackInspectorPointer(void)
map< string, vector< TGLabel * > > thrownlabs
void ReadPreferences(void)
void SetDebugerFrame(hdv_debugerframe *d)
map< string, vector< TGLabel * > > & GetReconstructedLabels(void)
void SetFullListFrame(hdv_fulllistframe *d)
hdv_debugerframe * GetDebugerFrame(void)
TGComboBox * candidatesfactory
hdv_optionsframe * optionsmf
void DrawDetectorsRPhi(void)
void DrawScale(TCanvas *c, vector< TObject * > &graphics)
void SavePreferences(void)
vector< TObject * > graphics_sideB
hdv_mainframe(const TGWindow *p, UInt_t w, UInt_t h)
void DoUpdateBcalDisp(void)
bool GetDrawThrowns(void)
void AddGraphicsSideB(vector< TObject * > &v)
coordsys_t coordinatetype
void DoEndViewAEvent(TVirtualPad *pad, TObject *obj, Int_t event)
hdv_endviewAframe * endviewAmf
void AddCheckButtons(map< string, TGCheckButton * > &checkbuttons)
void SetSource(string source)
void SetWireBasedTrackFactories(vector< string > &facnames)
TPolyLine * GetTOFPolyLine(int translate_side, int tof_ch)
TGComboBox * timetracksfactory
TGGroupFrame * throwninfo
void SetCandidateFactories(vector< string > &facnames)
const char * GetFactoryTag(string who)
TGComboBox * wiretracksfactory
TRootEmbeddedCanvas * endviewA
TRootEmbeddedCanvas * sideviewB
void DoBcalDispFrame(void)