/data3/calcul/jacquem/working_dir/Micromegas/micromegasFrameWork/include/tools/Toolbox.hh

Go to the documentation of this file.
00001 /* @version $Revision: 1764 $ * @modifiedby $Author: lcdet $ * @lastmodified $Date: 2012-06-07 16:58:43 +0200 (Thu, 07 Jun 2012) $ */
00002 #ifndef TOOLBOXHH
00003 #define TOOLBOXHH
00004 
00005 #include <string>
00006 //#include <TKey.h>
00007 //#include <TTree.h>
00008 //#include <TFile.h>
00009 //#include <TreeClass.hh>
00010 
00011 
00012 #include "mTypes.h"
00013 
00014 
00015 
00016 // Define verbose level
00017 #define NO_V 0
00018 #define LAW_V 1
00019 #define HIGHT_V 2
00020 
00021 class Toolbox {
00022 
00023 public:
00024         ~Toolbox();
00025 
00026         static void readSteerFile(std::string fileNamne,  bool verbose );
00027         static unsigned short bigTolittle ( short value );
00028         static void addIntToString(std::string& chaine,int value);
00029   static void addFloatToString(std::string& chaine, float value);
00030 
00031 
00032         static const unsigned int  MASK_LSB = 0x00ff;    // 0000 0000 1111 1111
00033         static const unsigned int  MASK_MSB = 0xff00;    // 1111 1111 0000 0000
00034         static const unsigned long MASK_CHANNEL_DATA   = 0x00000fff; // 0000 0000 0000 0000 0000 1111 1111 1111
00035         static const unsigned long MASK_CHANNEL_NUMBER = 0x007ff000; // 0000 0000 0111 1111 1111 0000 0000 0000
00036         static const unsigned int  MASK_12BIT = 0x0fff;  // 0000 1111 1111 1111
00037 
00038   static void printRepere( bool xRotation, bool yRotation, int zRotation );
00039 
00040   //static void mergeEventByBcIdAbs( TTree& tree , TTree& mergedTree);
00041   //static void mergeEventByTimestamp( TTree& tree , TTree& mergedTree);
00042 
00043 
00044 private:
00045         Toolbox();  // class cannot be instantiate only static method should be used
00046 };
00047 
00048 
00049 // stream modifier : display binary number
00050  struct BinOut {
00051    unsigned long int _Num;
00052    unsigned int _Digits;
00053    inline BinOut(const unsigned long int num, const unsigned int digits = 32) : _Num(num), _Digits(digits) { };
00054 }; // public class BinOut
00055 
00056 std::ostream& operator <<(std::ostream &out, const BinOut& x);
00057 
00058 #endif

Generated on Mon Jun 11 16:55:45 2012 for MicromegasFramework by  doxygen 1.4.7