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

Go to the documentation of this file.
00001 /* @version $Revision: 1773 $ * @modifiedby $Author: jacquem $ * @lastmodified $Date: 2012-06-13 10:20:21 +0200 (Wed, 13 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 class Detector;
00021 
00022 class Toolbox {
00023 
00024 public:
00025         ~Toolbox();
00026 
00027         static void readSteerFile(std::string fileNamne,  bool verbose );
00028         static unsigned short bigTolittle ( short value );
00029         static void addIntToString(std::string& chaine,int value);
00030   static void addFloatToString(std::string& chaine, float value);
00031 
00032 
00033         static const unsigned int  MASK_LSB = 0x00ff;    // 0000 0000 1111 1111
00034         static const unsigned int  MASK_MSB = 0xff00;    // 1111 1111 0000 0000
00035         static const unsigned long MASK_CHANNEL_DATA   = 0x00000fff; // 0000 0000 0000 0000 0000 1111 1111 1111
00036         static const unsigned long MASK_CHANNEL_NUMBER = 0x007ff000; // 0000 0000 0111 1111 1111 0000 0000 0000
00037         static const unsigned int  MASK_12BIT = 0x0fff;  // 0000 1111 1111 1111
00038 
00039   static void printRepere( bool xRotation, bool yRotation, int zRotation );
00040 
00041   static std::string getTempFileName(void);
00042 
00043   static bool getDetector(ui32 runId,Detector &detector);
00044 
00045 
00046 
00047   //static void mergeEventByBcIdAbs( TTree& tree , TTree& mergedTree);
00048   //static void mergeEventByTimestamp( TTree& tree , TTree& mergedTree);
00049 
00050 
00051 private:
00052         Toolbox();  // class cannot be instantiate only static method should be used
00053 };
00054 
00055 
00056 // stream modifier : display binary number
00057  struct BinOut {
00058    unsigned long int _Num;
00059    unsigned int _Digits;
00060    inline BinOut(const unsigned long int num, const unsigned int digits = 32) : _Num(num), _Digits(digits) { };
00061 }; // public class BinOut
00062 
00063 std::ostream& operator <<(std::ostream &out, const BinOut& x);
00064 
00065 #endif

Generated on Mon Jan 7 13:15:21 2013 for MicromegasFramework by  doxygen 1.4.7