Anaphe Home Page Reference Documentation

Main Page     Namespaces     Classes     Source Code    

H_macros.h

Go to the documentation of this file.
00001 #ifndef _H_MACROS_H_
00002 #define _H_MACROS_H_ 1
00003 
00004 // Construct a 1D histo with even partition and using default end point
00005 // convention:
00006 //      e.g. H_P_REF(H_P__Histo_1D_WED) h = 
00007 //              new (dbH) H_H1D_E( H_P__Histo_1D_WED, "H1D", 100, 0.0, 20.0);
00008 //
00009 #define H_H1D_E(h, name, nx, x1, x2)    \
00010         h( name, h::Partition_Type(nx, x1, x2) )
00011 
00012 // Construct a 1D histo with uneven partition and using default end point
00013 // convention:
00014 //      e.g. H_P_REF(H_P__Histo_1D_WUD) h =
00015 //              new (dbH) H_H1D_U( H_P__Histo_1D_WUD, "H1D", my_points );
00016 //
00017 #define H_H1D_U(h, name, v)     \
00018         h( name, h::Partition_Type(v) )
00019 
00020 
00021 // Construct a 2D histo with even partition and using default end point
00022 // convention:
00023 //      e.g. H_P_REF(H_P__Histo_2D_WED) h = 
00024 //              new (dbH) H_H2D_E( H_P__Histo_2D_WED, "H2D", 100, 0.0, 20.0,
00025 //                      100, 0.0, 25.0 );
00026 //
00027 #define H_H2D_E(h, name, nx, x1, x2, ny, y1, y2)        \
00028         h( name, h::Partition_X_Type(nx, x1, x2)        \
00029                 , h::Partition_Y_Type(ny, y1, y2) )
00030 
00031 // Construct a 2D histo with uneven partition and using default end point
00032 // convention:
00033 //      e.g. H_P_REF(H_P__Histo_2D_WUD) h =
00034 //              new (dbH) H_H2D_U( H_P__Histo_2D_WUD, "H2D", my_points_x,
00035 //                      my_points_y );
00036 //
00037 #define H_H2D_U(h, name, vx, vy)        \
00038         h( name, h::Partition_X_Type(vx), h::Partition_Y_Type(vy) )
00039 
00040 
00041 // Same as above but with end point convention:
00042 //
00043 #define H_H1D_E_EP(h, name, nx, x1, x2, ep) \
00044         h( name, h::Partition_Type(nx, x1, x2, ep) )
00045 
00046 #define H_H1D_U_EP(h, name, v, ep) \
00047         h( name, h::Partition_Type(v, ep) )
00048 
00049 #define H_H2D_E_EP(h, name, nx, x1, x2, epx, ny, y1, y2, epy) \
00050         h( name, h::Partition_X_Type(nx, x1, x2, epx)   \
00051                 , h::Partition_Y_Type(ny, y1, y2, epy) )
00052 
00053 #define H_H2D_U_EP(h, name, vx, epx, vy, epy ) \
00054         h( name, h::Partition_X_Type(vx, epx), h::Partition_Y_Type(vy, epy) )
00055 
00056 // 3D histograms
00057 
00058 #define H_H3D_E_EP(h, name, nx, x1, x2, epx, ny, y1, y2, epy, \
00059                    nz, z1, z2, epz) \
00060         h( name, h::Partition_X_Type(nx, x1, x2, epx)  \
00061                 , h::Partition_Y_Type(ny, y1, y2, epy) \
00062                 , h::Partition_Z_Type(nz, z1, z2, epz) )
00063 
00064 #define H_H3D_U_EP(h, name, vx, epx, vy, epy , vz , epz) \
00065         h( name, h::Partition_X_Type(vx, epx), \
00066            h::Partition_Y_Type(vy, epy),  \
00067            h::Partition_Z_Type(vz, epz) )
00068 
00069 #endif // _H_MACROS_H_
00070 


Anaphe documentation generated by Doxygen (www.doxygen.org)