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

Go to the documentation of this file.
00001 #include "IMPL/AccessChecked.h"
00002 #include <iostream>
00003 
00004 
00005 namespace IMPL {
00006   
00007   AccessChecked::AccessChecked() : _readOnly(false) {
00008     // provide a simple unique id for LCObjects
00009     static int lCObjectId(0) ;
00010     _id = lCObjectId++ ;
00011   }
00012   
00013 
00014   void AccessChecked::setReadOnly( bool readOnly ) { _readOnly = readOnly ; }
00015   
00016   void AccessChecked::checkAccess() throw ( EVENT::ReadOnlyException ){
00017 
00018     if( _readOnly ) throw EVENT::ReadOnlyException("") ;
00019   }
00020   void AccessChecked::checkAccess(const char* what) throw ( EVENT::ReadOnlyException ){
00021 
00022     if( _readOnly ){
00023       //      std::cout << " throwing ReadOnlyException " << what << std::endl ;
00024       throw EVENT::ReadOnlyException(what) ;
00025     }
00026   }
00027   
00028   //    bool readOnly ;
00029   
00030 }

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