AlcapDAQ  1
Mql.h
Go to the documentation of this file.
1 #ifndef __MQL_H
2 #define __MQL_H
3 
4 #include <math.h>
5 
6 #ifndef MIN
7 #define MIN(a,b) (((a) < (b))? (a) : (b))
8 #endif
9 
10 #ifndef MAX
11 #define MAX(a,b) (((a) > (b))? (a) : (b))
12 #endif
13 
14 static inline double safe_fmod(double x, double y)
15 {
16  if(x >= 0) return fmod(x, y);
17  else {
18  x += (((int)(-x/y))+1)*y;
19  return fmod(x,y);
20  }
21 }
22 
23 class TTree;
24 TTree *MqlRegisterTree(char *treeName);
25 
26 #endif