00001 //////////////////////////////////////////////////////////////////////////// 00002 // $Id: DbiSimFlag.hxx,v 1.1 2011/01/18 05:49:19 finch Exp $ 00003 // 00004 // SimFlag 00005 // 00006 // SimFlag defines SimFlag_t which is an enumeration of the 00007 // legal data sources 00008 // 00009 // Author: R. Hatcher 2000.05.09 00010 // 00011 //////////////////////////////////////////////////////////////////////////// 00012 00013 #ifndef SIMFLAG_H 00014 #define SIMFLAG_H 00015 00016 #ifndef ROOT_Rtypes 00017 #if !defined(__CINT__) || defined(__MAKECINT__) 00018 #include "Rtypes.h" 00019 #endif 00020 #endif 00021 00022 00023 namespace DbiSimFlag { 00024 00025 typedef enum ESimFlag { 00026 kUnknown = 0x00, 00027 kData = 0x01, 00028 kDaqFakeData = 0x02, 00029 kMC = 0x04, 00030 kReroot = 0x08 00031 } SimFlag_t; 00032 00033 Int_t FullMask(); 00034 00035 // Translation enum to/from character strings 00036 00037 const Char_t* AsString(SimFlag_t detector); 00038 const Char_t* MaskToString(Int_t mask); 00039 DbiSimFlag::SimFlag_t StringToEnum(const Char_t* chars, Int_t maxChar=0); 00040 Int_t StringToMask(const Char_t* chars, Int_t maxChar=0); 00041 00042 // Translation from mask to compact value 00043 Int_t Compact(SimFlag_t simFlag); 00044 DbiSimFlag::SimFlag_t Expand(Int_t compactSimFlag); 00045 00046 } 00047 00048 00049 #endif // SIMFLAG_H