constants.hh

Go to the documentation of this file.
00001 
00015 #ifndef CONSTANTS_HH
00016 #define CONSTANTS_HH
00017 #include <string>
00018 #include "types.hh"
00019 
00021 namespace MSG{
00022 
00024   enum Level{
00025     DEBUG=0,      
00026     INFO,         
00027     NORMAL,       
00028     WARNING,      
00029     ERROR,        
00030     MSG_TYPE_MAX
00031   };
00032 
00033   const std::string ColorPrefix[MSG_TYPE_MAX] =
00034     {
00035       "\033[94m", 
00036       "\033[92m", 
00037       "\033[95m", 
00038       "\033[93m", 
00039       "\033[91m"  
00040     };
00042 
00043   const std::string StringPrefix[MSG_TYPE_MAX] =
00044     {
00045       "     [DEBUG]  ", 
00046       "      [INFO]  ", 
00047       "    [NORMAL]  ", 
00048       "   [WARNING]  ", 
00049       "     [ERROR]  "  
00050     };
00052 };
00053 
00055 namespace FORMAT{
00056   
00058   enum INPUT_FILE{
00060     BINARY=0,
00062     ASCII,
00064     UNDEFINED
00065   };
00066 };
00067 
00069 namespace PMT{
00070   
00071   const PMT::ch_number_t INVALID_CH=0xffff;       
00072   const PMT::word_t      INVALID_WORD=0xffffffff; 
00073   const PMT::word_t      EMPTY_WORD=0x0;          
00074 
00075   const PMT::word_t      BEAMGATE_NSAMPLE=1500;   
00076   const PMT::ch_number_t NUM_PMT_CHANNEL=40;      
00077   const PMT::ch_adc_t    MAX_ADC=4095;            
00078 
00080   enum DISCRIMINATOR {
00081     BASE_DISC = 0, 
00082     COSMIC_DISC,   
00083     MICHEL_DISC,   
00084     BEAM_DISC,     
00085     BEAM_WIN,      
00086     DISC_MAX
00087   };
00088 
00089   /*
00091   enum PMT_WORD{
00092     UNDEFINED_WORD = 0, ///< Word type ... undefined
00093     EVENT_FIRST_HEADER, ///< A signal word (no data) to flag the start of headers 
00094     EVENT_HEADER,       ///< Event header word
00095     FIRST_WORD,         ///< First word in the event (after the event header, before channel data )
00096     CHANNEL_HEADER,     ///< Channel header word
00097     CHANNEL_WORD,       ///< Channel word such as ADC sample
00098     CHANNEL_LAST_WORD , ///< Last word per channel-wise readout
00099     FEM_LAST_WORD,      ///< Last word per fem
00100     EVENT_LAST_WORD     ///< Last word in the event
00101   };
00102   */
00103 
00105   enum PMT_WORD{
00106     UNDEFINED_WORD = 0, 
00107     EVENT_HEADER,       
00108     FEM_HEADER,         
00109     FEM_FIRST_WORD,     
00110     CHANNEL_HEADER,     
00111     CHANNEL_WORD,       
00112     CHANNEL_LAST_WORD,  
00113     FEM_LAST_WORD,      
00114     EVENT_LAST_WORD     
00115   };
00116 }
00117 
00118 namespace DATA_STRUCT{
00119 
00121   enum DATA_TYPE{
00122     PMT_WF_COLLECTION=0,        
00123     TPC_WF_COLLECTION,          
00124     TRIG_INFO,                  
00125     PULSE_COLLECTION,           
00126     FIXED_WIN_PULSE_COLLECTION, 
00127     THRES_WIN_PULSE_COLLECTION, 
00128     SLIDE_WIN_PULSE_COLLECTION, 
00129     USER_COLLECTION,            
00130     DATA_TYPE_MAX
00131   };
00132 
00134   const std::string DATA_TREE_NAME[DATA_TYPE_MAX] = {
00135     "pmt_wf_collection",
00136     "tpc_wf_collection",
00137     "trig_info",
00138     "pulse_collection",
00139     "pulse_fixed_window",
00140     "pulse_thres_window",
00141     "pulse_slide_window",
00142     "user_collection"
00143   };
00144 
00145 
00146 }
00147 
00148 
00149 #endif
00150  // end of doxygen group

Generated on Mon Apr 7 15:35:12 2014 for MyProject by  doxygen 1.4.7