CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/CondCore/DBCommon/src/DbOpenTransaction.cc

Go to the documentation of this file.
00001 // local includes
00002 #include "CondCore/DBCommon/interface/DbTransaction.h"
00003 #include "CondCore/DBCommon/interface/DbOpenTransaction.h"
00004 
00005 cond::DbOpenTransaction::DbOpenTransaction( cond::DbTransaction& transaction ):
00006   m_transaction(transaction),m_status(false){
00007 }
00008 
00009 #include <iostream>
00010 cond::DbOpenTransaction::~DbOpenTransaction(){
00011   if(!m_status && m_transaction.isActive() ) {
00012     m_transaction.rollback();
00013   }
00014 }
00015 
00016 void cond::DbOpenTransaction::ok()
00017 {
00018   m_status = true;
00019 }
00020