#include <CondTools/L1Trigger/interface/WriterProxy.h>
Public Member Functions | |
virtual std::string | save (const edm::EventSetup &setup, cond::PoolTransaction &pool) const |
virtual | ~WriterProxyT () |
Definition at line 48 of file WriterProxy.h.
virtual l1t::WriterProxyT< Record, Type >::~WriterProxyT | ( | ) | [inline, virtual] |
virtual std::string l1t::WriterProxyT< Record, Type >::save | ( | const edm::EventSetup & | setup, | |
cond::PoolTransaction & | pool | |||
) | const [inline, virtual] |
Implements l1t::WriterProxy.
Definition at line 54 of file WriterProxy.h.
References edm::eventsetup::heterocontainer::HCTypeTagTemplate< T, Group >::className(), edm::EventSetup::get(), edm::ESHandle< T >::product(), and HLT_VtxMuL3::recordName.
00055 { 00056 // get className for the record first 00057 std::string recordName = 00058 edm::eventsetup::heterocontainer::HCTypeTagTemplate<Record, edm::eventsetup::EventSetupRecordKey>::className (); 00059 00060 // load record and type from EventSetup and save them in db 00061 edm::ESHandle<Type> handle; 00062 00063 try 00064 { 00065 setup.get<Record> ().get (handle); 00066 } 00067 catch( l1t::DataAlreadyPresentException& ex ) 00068 { 00069 return std::string() ; 00070 } 00071 00072 // If handle is invalid, then data is already in DB 00073 cond::TypedRef<Type> ref (pool, 00074 new Type (*(handle.product ()))); 00075 ref.markWrite (recordName); 00076 00077 return ref.token (); 00078 }