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
|
||||
case M_CH_SETTING:
|
||||
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;
|
||||
|
||||
|
@ -236,11 +236,11 @@ void MainWindow::HandleMenu(Int_t id){
|
|||
case M_BOARD_SETTINGS:{
|
||||
if( boardSetting == NULL ) {
|
||||
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{
|
||||
if ( boardSetting->IsOpen() == false ){
|
||||
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;
|
||||
|
@ -326,7 +326,7 @@ void MainWindow::GoodBye(){
|
|||
|
||||
}
|
||||
|
||||
void MainWindow::LogMsg(TString msg){
|
||||
void MainWindow::LogMsg(char * msg){
|
||||
|
||||
time_t now = time(0);
|
||||
tm * ltm = localtime(&now);
|
||||
|
@ -337,10 +337,10 @@ void MainWindow::LogMsg(TString msg){
|
|||
int minute = ltm->tm_min;
|
||||
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);
|
||||
printf("%s", outMsg.Data());
|
||||
printf("%s\n", outMsg.Data());
|
||||
teLog->LineDown();
|
||||
teLog->ShowBottom();
|
||||
|
||||
|
|
2
FSUDAQ.h
2
FSUDAQ.h
|
@ -89,6 +89,6 @@ public:
|
|||
//void ChangeMod();
|
||||
//void ChangeChannel();
|
||||
|
||||
void LogMsg(TString);
|
||||
void LogMsg(char * );
|
||||
void GoodBye();
|
||||
};
|
||||
|
|
|
@ -724,8 +724,8 @@ BoardSetting::~BoardSetting(){
|
|||
|
||||
}
|
||||
|
||||
void BoardSetting::BdLogMsg(TString msg){
|
||||
Emit("BdLogMsg(TString)", msg);
|
||||
void BoardSetting::LogMsg(TString msg){
|
||||
Emit("LogMsg(char*)", msg.Data());
|
||||
}
|
||||
|
||||
void * BoardSetting::ReadStatus(void * ptr){
|
||||
|
|
|
@ -170,7 +170,7 @@ class BoardSetting{
|
|||
///==== Readout Control
|
||||
void SetReadOutControl();
|
||||
|
||||
void BdLogMsg(TString); // *SIGNAL*
|
||||
void LogMsg(TString msg); // *SIGNAL*
|
||||
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -403,8 +403,8 @@ ChannelSetting::~ChannelSetting(){
|
|||
|
||||
}
|
||||
|
||||
void ChannelSetting::ChLogMsg(TString msg){
|
||||
Emit("ChLogMsg(TString)", msg);
|
||||
void ChannelSetting::LogMsg(TString msg){
|
||||
Emit("LogMsg(char*)", msg.Data());
|
||||
}
|
||||
|
||||
void ChannelSetting::ChangeBoard(){
|
||||
|
@ -418,7 +418,7 @@ void ChannelSetting::ChangeBoard(){
|
|||
|
||||
void ChannelSetting::ChangeCh(){
|
||||
|
||||
ChLogMsg("dsadasdsa");
|
||||
LogMsg(Form("========== Change to Channel %d", (int)chIDEntry->GetNumber()));
|
||||
|
||||
if ( digi == NULL ) return;
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ class ChannelSetting{
|
|||
void SetPeaking();
|
||||
void SetPeakHoldOff();
|
||||
|
||||
void ChLogMsg(TString); // *SIGNAL*
|
||||
void LogMsg(TString msg); // *SIGNAL*
|
||||
|
||||
};
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user