fixed LogMsg bug
This commit is contained in:
parent
ece4b26d97
commit
eb83854f69
12
FSUDAQ.cpp
12
FSUDAQ.cpp
|
@ -228,7 +228,7 @@ void MainWindow::HandleMenu(Int_t id){
|
||||||
///========================= Channel setting
|
///========================= Channel setting
|
||||||
case M_CH_SETTING:
|
case M_CH_SETTING:
|
||||||
channelSetting = new ChannelSetting(gClient->GetRoot(), 600, 600, digi, nDigi);
|
channelSetting = new ChannelSetting(gClient->GetRoot(), 600, 600, digi, nDigi);
|
||||||
channelSetting->Connect("ChLogMsg(TString)", "MainWindow", this, "LogMsg(TString)");
|
channelSetting->Connect("LogMsg(char*)", "MainWindow", this, "LogMsg(char*)");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -236,11 +236,11 @@ void MainWindow::HandleMenu(Int_t id){
|
||||||
case M_BOARD_SETTINGS:{
|
case M_BOARD_SETTINGS:{
|
||||||
if( boardSetting == NULL ) {
|
if( boardSetting == NULL ) {
|
||||||
boardSetting = new BoardSetting(gClient->GetRoot(), 600, 600, digi, nDigi);
|
boardSetting = new BoardSetting(gClient->GetRoot(), 600, 600, digi, nDigi);
|
||||||
boardSetting->Connect("BdLogMsg(TString)", "MainWindow", this, "LogMsg(TString)");
|
boardSetting->Connect("LogMsg(char*)", "MainWindow", this, "LogMsg(char*)");
|
||||||
}else{
|
}else{
|
||||||
if ( boardSetting->IsOpen() == false ){
|
if ( boardSetting->IsOpen() == false ){
|
||||||
boardSetting = new BoardSetting(gClient->GetRoot(), 600, 600, digi, nDigi);
|
boardSetting = new BoardSetting(gClient->GetRoot(), 600, 600, digi, nDigi);
|
||||||
boardSetting->Connect("BdLogMsg(TString)", "MainWindow", this, "LogMsg(TString)");
|
//boardSetting->Connect("BdLogMsg(TString)", "MainWindow", this, "LogMsg(TString)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
|
@ -326,7 +326,7 @@ void MainWindow::GoodBye(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::LogMsg(TString msg){
|
void MainWindow::LogMsg(char * msg){
|
||||||
|
|
||||||
time_t now = time(0);
|
time_t now = time(0);
|
||||||
tm * ltm = localtime(&now);
|
tm * ltm = localtime(&now);
|
||||||
|
@ -337,10 +337,10 @@ void MainWindow::LogMsg(TString msg){
|
||||||
int minute = ltm->tm_min;
|
int minute = ltm->tm_min;
|
||||||
int secound = ltm->tm_sec;
|
int secound = ltm->tm_sec;
|
||||||
|
|
||||||
TString outMsg = Form("[%4d-%02d-%02d %02d:%02d:%02d] ", year, month, day, hour, minute, secound) + msg;
|
TString outMsg = Form("[%4d-%02d-%02d %02d:%02d:%02d] %s", year, month, day, hour, minute, secound, msg);
|
||||||
|
|
||||||
teLog->AddLine(outMsg);
|
teLog->AddLine(outMsg);
|
||||||
printf("%s", outMsg.Data());
|
printf("%s\n", outMsg.Data());
|
||||||
teLog->LineDown();
|
teLog->LineDown();
|
||||||
teLog->ShowBottom();
|
teLog->ShowBottom();
|
||||||
|
|
||||||
|
|
2
FSUDAQ.h
2
FSUDAQ.h
|
@ -89,6 +89,6 @@ public:
|
||||||
//void ChangeMod();
|
//void ChangeMod();
|
||||||
//void ChangeChannel();
|
//void ChangeChannel();
|
||||||
|
|
||||||
void LogMsg(TString);
|
void LogMsg(char * );
|
||||||
void GoodBye();
|
void GoodBye();
|
||||||
};
|
};
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -25,10 +25,10 @@ ClassDigitizer.o : ClassDigitizer.cpp ClassDigitizer.h RegisterAddress.h macro.h
|
||||||
$(CC) $(COPTS) -c ClassDigitizer.cpp
|
$(CC) $(COPTS) -c ClassDigitizer.cpp
|
||||||
|
|
||||||
DigitizerPHA.o : DigitizerPHA.cpp DigitizerPHA.h ClassDigitizer.o
|
DigitizerPHA.o : DigitizerPHA.cpp DigitizerPHA.h ClassDigitizer.o
|
||||||
$(CC) $(COPTS) -c DigitizerPHA.cpp
|
$(CC) $(COPTS) -c DigitizerPHA.cpp
|
||||||
|
|
||||||
DigitizerPSD.o : DigitizerPSD.cpp DigitizerPSD.h ClassDigitizer.o
|
DigitizerPSD.o : DigitizerPSD.cpp DigitizerPSD.h ClassDigitizer.o
|
||||||
$(CC) $(COPTS) -c DigitizerPSD.cpp
|
$(CC) $(COPTS) -c DigitizerPSD.cpp
|
||||||
|
|
||||||
test : test.cpp ClassDigitizer.o DigitizerPHA.o DigitizerPSD.o
|
test : test.cpp ClassDigitizer.o DigitizerPHA.o DigitizerPSD.o
|
||||||
@echo "--------- making test"
|
@echo "--------- making test"
|
||||||
|
|
|
@ -724,8 +724,8 @@ BoardSetting::~BoardSetting(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardSetting::BdLogMsg(TString msg){
|
void BoardSetting::LogMsg(TString msg){
|
||||||
Emit("BdLogMsg(TString)", msg);
|
Emit("LogMsg(char*)", msg.Data());
|
||||||
}
|
}
|
||||||
|
|
||||||
void * BoardSetting::ReadStatus(void * ptr){
|
void * BoardSetting::ReadStatus(void * ptr){
|
||||||
|
|
|
@ -170,7 +170,7 @@ class BoardSetting{
|
||||||
///==== Readout Control
|
///==== Readout Control
|
||||||
void SetReadOutControl();
|
void SetReadOutControl();
|
||||||
|
|
||||||
void BdLogMsg(TString); // *SIGNAL*
|
void LogMsg(TString msg); // *SIGNAL*
|
||||||
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -403,8 +403,8 @@ ChannelSetting::~ChannelSetting(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChannelSetting::ChLogMsg(TString msg){
|
void ChannelSetting::LogMsg(TString msg){
|
||||||
Emit("ChLogMsg(TString)", msg);
|
Emit("LogMsg(char*)", msg.Data());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChannelSetting::ChangeBoard(){
|
void ChannelSetting::ChangeBoard(){
|
||||||
|
@ -418,7 +418,7 @@ void ChannelSetting::ChangeBoard(){
|
||||||
|
|
||||||
void ChannelSetting::ChangeCh(){
|
void ChannelSetting::ChangeCh(){
|
||||||
|
|
||||||
ChLogMsg("dsadasdsa");
|
LogMsg(Form("========== Change to Channel %d", (int)chIDEntry->GetNumber()));
|
||||||
|
|
||||||
if ( digi == NULL ) return;
|
if ( digi == NULL ) return;
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ class ChannelSetting{
|
||||||
void SetPeaking();
|
void SetPeaking();
|
||||||
void SetPeakHoldOff();
|
void SetPeakHoldOff();
|
||||||
|
|
||||||
void ChLogMsg(TString); // *SIGNAL*
|
void LogMsg(TString msg); // *SIGNAL*
|
||||||
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user