SOLARIS_QT6_DAQ/macro.h

27 lines
615 B
C
Raw Normal View History

2023-03-16 17:28:55 -04:00
#ifndef MACRO_H
#define MACRO_H
#define MaxNumberOfDigitizer 20
#define DAQLockFile "DAQLock.dat"
#define PIDFile "pid.dat"
2023-03-16 17:28:55 -04:00
2023-03-23 19:57:14 -04:00
//^=================================
namespace Utility{
/// either haha is "0xFFF" or "12435", convert to 10-base
static unsigned long TenBase(std::string haha){
QString ans = QString::fromStdString(haha);
unsigned long mask = 0 ;
if( ans.contains("0x")){
bool ok;
mask = ans.toULong(&ok, 16);
}else{
mask = ans.toULong();
}
return mask;
}
}
//just to get rip of the warning;
const unsigned long ksjaldja = Utility::TenBase("0");
2023-03-16 17:28:55 -04:00
#endif