2023-03-16 17:28:55 -04:00
|
|
|
#ifndef MACRO_H
|
|
|
|
#define MACRO_H
|
|
|
|
|
|
|
|
#define MaxNumberOfDigitizer 20
|
2023-03-22 12:36:24 -04:00
|
|
|
#define DAQLockFile "DAQLock.dat"
|
|
|
|
#define PIDFile "pid.dat"
|
2023-03-16 17:28:55 -04:00
|
|
|
|
2024-07-31 14:54:50 -04:00
|
|
|
#include <QString>
|
|
|
|
|
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
|