/data3/calcul/jacquem/working_dir/Micromegas/micromegasFrameWork/lcio/src/cpp/src/IMPL/LCFlagImpl.cc

Go to the documentation of this file.
00001 #include "IMPL/LCFlagImpl.h"
00002 
00003 
00004 using namespace EVENT ;
00005 
00006 namespace IMPL {
00007   
00008   LCFlagImpl::LCFlagImpl() : _flag(0) {}
00009 
00010   LCFlagImpl::LCFlagImpl(int flag) : _flag( flag ) {} 
00011 
00012   
00013   bool LCFlagImpl::bitSet(int bit) const { return (_flag & (1<< bit)   ) ? true : false ; } 
00014 
00015   int LCFlagImpl::getFlag() const { return _flag ; } 
00016 
00017 
00018   void LCFlagImpl::setBit(int bit) { 
00019 
00020     if( 0<=bit && bit<=31 &&  !bitSet( bit) ){
00021       
00022       _flag = _flag | ( 1 << bit ) ; 
00023       
00024     }   
00025   }
00026   
00027 
00028   void LCFlagImpl::unsetBit(int bit){
00029 
00030     if( 0<=bit && bit<=31 &&  bitSet( bit) ){
00031       
00032       _flag = _flag &  ~( 1 << bit ) ; 
00033       
00034     }   
00035   }
00036 
00037 } // namespace

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