added placeholder for mainSettings windows

This commit is contained in:
Ryan Tang 2022-03-15 15:55:31 -04:00
parent 11875af9f9
commit b267aa7934
6 changed files with 98 additions and 138 deletions

View File

@ -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

30
mainSettings.cpp Normal file
View File

@ -0,0 +1,30 @@
#include <TApplication.h>
#include <TGClient.h>
#include <TCanvas.h>
#include <TF1.h>
#include <TRandom.h>
#include <TGButton.h>
#include <TRootEmbeddedCanvas.h>
#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;
}

20
mainSettings.h Normal file
View File

@ -0,0 +1,20 @@
#ifndef MAIN_SETTING_H
#define MAIN_SETTING_H
#include <TQObject.h>
class TGWindow;
class TGMainFrame;
class MainSettings{
private:
TGMainFrame * fMain;
public:
MainSettings(const TGWindow *p, UInt_t w, UInt_t h);
virtual ~MainSettings();
};
#endif

View File

@ -9,9 +9,6 @@
#include <TAxis.h>
#include "pixieDAQ.h"
#include "Pixie16Class.h"
Pixie16 * pixie;
MainWindow::MainWindow(const TGWindow *p,UInt_t w,UInt_t h) {
@ -84,6 +81,8 @@ void MainWindow::getADCTrace() {
///f1->SetLineWidth(3);
///f1->Draw();
mainSettings = new MainSettings(gClient->GetRoot(), 800, 600);
printf("--------- get ADCTrace \n");
int ch = 6;

View File

@ -1,10 +1,12 @@
#include <TQObject.h>
#include <RQ_OBJECT.h>
#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();
};

View File

@ -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