From b267aa793441b9684aabc97ccd25762fb3c1329a Mon Sep 17 00:00:00 2001 From: "Ryan@Debain10" Date: Tue, 15 Mar 2022 15:55:31 -0400 Subject: [PATCH] added placeholder for mainSettings windows --- Makefile | 67 +++++++++++++++++------------- mainSettings.cpp | 30 ++++++++++++++ mainSettings.h | 20 +++++++++ pixieDAQ.cpp | 5 +-- pixieDAQ.h | 9 +++- pxisys.ini | 105 ----------------------------------------------- 6 files changed, 98 insertions(+), 138 deletions(-) create mode 100644 mainSettings.cpp create mode 100644 mainSettings.h delete mode 100644 pxisys.ini diff --git a/Makefile b/Makefile index a3a6a50..7341a5b 100644 --- a/Makefile +++ b/Makefile @@ -6,8 +6,8 @@ ROOT_FLAG = `root-config --cflags --glibs` #==== old pixie library #APIBASE = /usr/opt/Pixie16/lib/ -#INCFLAGS = -I$(APIBASE)app/ -I$(APIBASE)sys/ -#INCFLAGS2 = -I$(APIBASE)inc/ +#PIXIE_LIB_PATH = -I$(APIBASE)app/ -I$(APIBASE)sys/ +#PIXIE_LIB_PATH2 = -I$(APIBASE)inc/ #LIBS = $(APIBASE)libPixie16App.a $(APIBASE)libPixie16Sys.a $(PLXBASE)PlxApi.a # #all: test @@ -16,52 +16,64 @@ ROOT_FLAG = `root-config --cflags --glibs` # $(CC) test.o Pixie16Class.o $(LIBS) -o test # #test.o : test.cpp -# $(CC) $(CFLAGS) $(INCFLAGS) $(INCFLAGS2) test.cpp $(ROOT_FLAG) +# $(CC) $(CFLAGS) $(PIXIE_LIB_PATH) $(PIXIE_LIB_PATH2) test.cpp $(ROOT_FLAG) # #Pixie16Class.o : Pixie16Class.h Pixie16Class.cpp DataBlock.h -# $(CC) $(CFLAGS) $(INCFLAGS) $(INCFLAGS2) Pixie16Class.cpp DataBlock.h $(ROOT_FLAG) +# $(CC) $(CFLAGS) $(PIXIE_LIB_PATH) $(PIXIE_LIB_PATH2) Pixie16Class.cpp DataBlock.h $(ROOT_FLAG) # #==== new pixie library -INCFLAGS = -I/usr/opt/xia/PixieSDK/ -I/usr/opt/xia/PixieSDK/include/ -I/usr/opt/xia/PixieSDK/include/pixie16/ +#the pixie.ini is not needed +PIXIE_LIB_PATH = -I/usr/opt/xia/PixieSDK/ -I/usr/opt/xia/PixieSDK/include/ -I/usr/opt/xia/PixieSDK/include/pixie16/ APIBASE = /usr/opt/xia/PixieSDK/lib/ LIBS = $(APIBASE)libPixie16Api.so $(APIBASE)libPixieSDK.a $(PLXBASE)PlxApi.a + all: test example pixieDAQ +#-------------------------- +pixieDAQ : pixieDAQ.o pixieDict.o pixieDict.cxx Pixie16Class.o mainSettings.o + @echo "-------- making pixieDAQ " + $(CC) $(PIXIE_LIB_PATH) pixieDAQ.o Pixie16Class.o mainSettings.o pixieDict.cxx $(LIBS) -o pixieDAQ $(ROOT_FLAG) + +#--------------------------#need to export LD_LIBRARY_PATH +Pixie16Class.o : Pixie16Class.h Pixie16Class.cpp DataBlock.h + @echo "-------- making Pixie16Class.o " + $(CC) $(CFLAGS) $(PIXIE_LIB_PATH) Pixie16Class.cpp DataBlock.h $(ROOT_FLAG) + +pixieDict.cxx : pixieDAQ.h pixieDAQLinkDef.h + @echo "--------- creating pcm and cxx " + @rootcling -f pixieDict.cxx -c pixieDAQ.h -p $(PIXIE_LIB_PATH) pixieDAQLinkDef.h + +pixieDAQ.o : pixieDAQ.cpp pixieDAQ.h + @echo "--------- creating pixieDAQ.o" + $(CC) $(CFLAGS) $(PIXIE_LIB_PATH) pixieDAQ.cpp Pixie16Class.cpp pixieDict.cxx $(ROOT_FLAG) + +mainSettings.o : mainSettings.cpp mainSettings.h + @echo "--------- creating mainSettings.o" + $(CC) $(CFLAGS) mainSettings.cpp $(ROOT_FLAG) + + + + +#-------------------------- example : example.o @echo "-------- making example" - $(CC) $(INCFLAGS) example.o $(LIBS) -o example + $(CC) $(PIXIE_LIB_PATH) example.o $(LIBS) -o example example.o : example.cpp @echo "-------- making example.o" - $(CC) $(CFLAGS) $(INCFLAGS) example.cpp - - + $(CC) $(CFLAGS) $(PIXIE_LIB_PATH) example.cpp +#-------------------------- test : test.o Pixie16Class.o @echo "-------- making test" - $(CC) $(INCFLAGS) test.o Pixie16Class.o $(LIBS) -o test $(ROOT_FLAG) + $(CC) $(PIXIE_LIB_PATH) test.o Pixie16Class.o $(LIBS) -o test $(ROOT_FLAG) test.o : test.cpp @echo "-------- making test.o" - $(CC) $(CFLAGS) $(INCFLAGS) test.cpp $(ROOT_FLAG) + $(CC) $(CFLAGS) $(PIXIE_LIB_PATH) test.cpp $(ROOT_FLAG) -Pixie16Class.o : Pixie16Class.h Pixie16Class.cpp DataBlock.h - @echo "-------- making Pixie16Class.o " - $(CC) $(CFLAGS) $(INCFLAGS) Pixie16Class.cpp DataBlock.h $(ROOT_FLAG) - - - -pixieDAQ : pixieDAQ.o Pixie16Class.o pixieDict.o - @echo "-------- making pixieDAQ " - $(CC) $(INCFLAGS) pixieDAQ.o Pixie16Class.o pixieDict.cxx $(LIBS) -o pixieDAQ $(ROOT_FLAG) - -pixieDAQ.o : pixieDAQ.cpp pixieDAQ.h - @echo "--------- creating pcm " - @rootcling -f pixieDict.cxx -c pixieDAQ.h -p $(INCFLAGS) pixieDAQLinkDef.h - @echo "--------- creating pixieDAQ.o" - $(CC) $(CFLAGS) $(INCFLAGS) pixieDAQ.cpp Pixie16Class.cpp pixieDict.cxx $(ROOT_FLAG) #origin root example #pixieDAQ: @@ -69,9 +81,6 @@ pixieDAQ.o : pixieDAQ.cpp pixieDAQ.h # $(CC) $(CFLAGS) pixieDAQ.cpp pixieDict.cxx $(ROOT_FLAG) -#need to export LD_LIBRARY_PATH -#the pixie.ini is not needed - clean: rm -f *.o test *.pcm example pixieDAQ *.gch *.cxx diff --git a/mainSettings.cpp b/mainSettings.cpp new file mode 100644 index 0000000..23f8d8b --- /dev/null +++ b/mainSettings.cpp @@ -0,0 +1,30 @@ +#include +#include +#include +#include +#include +#include +#include + +#include "mainSettings.h" + + +MainSettings::MainSettings(const TGWindow *p, UInt_t w, UInt_t h){ + + /// Create a main frame + fMain = new TGMainFrame(p,w,h); + + /// Set a name to the main frame + fMain->SetWindowName("Pixie16 Main Settings"); + + /// Map main frame + fMain->MapWindow(); +} + + +MainSettings::~MainSettings(){ + + fMain->Cleanup(); + delete fMain; + +} diff --git a/mainSettings.h b/mainSettings.h new file mode 100644 index 0000000..b386e98 --- /dev/null +++ b/mainSettings.h @@ -0,0 +1,20 @@ +#ifndef MAIN_SETTING_H +#define MAIN_SETTING_H + +#include + +class TGWindow; +class TGMainFrame; + +class MainSettings{ +private: + TGMainFrame * fMain; + +public: + MainSettings(const TGWindow *p, UInt_t w, UInt_t h); + virtual ~MainSettings(); + +}; + + +#endif diff --git a/pixieDAQ.cpp b/pixieDAQ.cpp index bc7dd85..5074f97 100644 --- a/pixieDAQ.cpp +++ b/pixieDAQ.cpp @@ -9,9 +9,6 @@ #include #include "pixieDAQ.h" -#include "Pixie16Class.h" - -Pixie16 * pixie; MainWindow::MainWindow(const TGWindow *p,UInt_t w,UInt_t h) { @@ -83,6 +80,8 @@ void MainWindow::getADCTrace() { ///TF1 *f1 = new TF1("f1","sin(x)/x",0,gRandom->Rndm()*10); ///f1->SetLineWidth(3); ///f1->Draw(); + + mainSettings = new MainSettings(gClient->GetRoot(), 800, 600); printf("--------- get ADCTrace \n"); diff --git a/pixieDAQ.h b/pixieDAQ.h index 69c7718..c72e5f1 100644 --- a/pixieDAQ.h +++ b/pixieDAQ.h @@ -1,10 +1,12 @@ #include #include +#include "Pixie16Class.h" +#include "mainSettings.h" + class TGWindow; class TGMainFrame; class TRootEmbeddedCanvas; -//class Pixie16; class MainWindow { RQ_OBJECT("MainWindow") @@ -12,6 +14,9 @@ private: TGMainFrame *fMain; TRootEmbeddedCanvas *fEcanvas; + Pixie16 * pixie; + + MainSettings * mainSettings; public: MainWindow(const TGWindow *p, UInt_t w, UInt_t h); @@ -21,6 +26,8 @@ public: void getADCTrace(); + void openMainSettings(); + void GoodBye(); }; diff --git a/pxisys.ini b/pxisys.ini deleted file mode 100644 index cd47502..0000000 --- a/pxisys.ini +++ /dev/null @@ -1,105 +0,0 @@ -# This is the PXISYS.INI file for a PXI system using -# a Wiener 14-slot Pixie-16 Chassis. -# - -[Slot1] -IDSEL = None -SecondaryBusNumber = 0 -ExternalBackplaneInterface = None -PCIBusNumber = None -PCIDeviceNumber = None - -[Slot2] -IDSEL = 31 -SecondaryBusNumber = 0 -ExternalBackplaneInterface = None -PCIBusNumber = 1 -PCIDeviceNumber = 15 - -[Slot3] -IDSEL = 30 -SecondaryBusNumber = 0 -ExternalBackplaneInterface = None -PCIBusNumber = 1 -PCIDeviceNumber = 14 - -[Slot4] -IDSEL = 29 -SecondaryBusNumber = 0 -ExternalBackplaneInterface = None -PCIBusNumber = 1 -PCIDeviceNumber = 13 - -[Slot5] -IDSEL = 28 -SecondaryBusNumber = 0 -ExternalBackplaneInterface = None -PCIBusNumber = 1 -PCIDeviceNumber = 12 - -[Slot6] -IDSEL = 27 -SecondaryBusNumber = 0 -ExternalBackplaneInterface = None -PCIBusNumber = 1 -PCIDeviceNumber = 11 - -[Slot7] -IDSEL = 26 -SecondaryBusNumber = 0 -ExternalBackplaneInterface = None -PCIBusNumber = 1 -PCIDeviceNumber = 10 - - - -[Slot8] -IDSEL = 31 -SecondaryBusNumber = 0 -ExternalBackplaneInterface = None -PCIBusNumber = 2 -PCIDeviceNumber = 15 - -[Slot9] -IDSEL = 30 -SecondaryBusNumber = 0 -ExternalBackplaneInterface = None -PCIBusNumber = 2 -PCIDeviceNumber = 14 - -[Slot10] -IDSEL = 29 -SecondaryBusNumber = 0 -ExternalBackplaneInterface = None -PCIBusNumber = 2 -PCIDeviceNumber = 13 - -[Slot11] -IDSEL = 28 -SecondaryBusNumber = 0 -ExternalBackplaneInterface = None -PCIBusNumber = 2 -PCIDeviceNumber = 12 - -[Slot12] -IDSEL = 27 -SecondaryBusNumber = 0 -ExternalBackplaneInterface = None -PCIBusNumber = 2 -PCIDeviceNumber = 11 - -[Slot13] -IDSEL = 26 -SecondaryBusNumber = 0 -ExternalBackplaneInterface = None -PCIBusNumber = 2 -PCIDeviceNumber = 10 - -[Slot14] -IDSEL = 25 -SecondaryBusNumber = 0 -ExternalBackplaneInterface = None -PCIBusNumber = 2 -PCIDeviceNumber = 9 - -