CMS 3D CMS Logo

l1t::WriterProxyT< Record, Type > Class Template Reference

#include <CondTools/L1Trigger/interface/WriterProxy.h>

Inheritance diagram for l1t::WriterProxyT< Record, Type >:

l1t::WriterProxy

List of all members.

Public Member Functions

virtual std::string save (const edm::EventSetup &setup, cond::PoolTransaction &pool) const
virtual ~WriterProxyT ()


Detailed Description

template<class Record, class Type>
class l1t::WriterProxyT< Record, Type >

Definition at line 48 of file WriterProxy.h.


Constructor & Destructor Documentation

template<class Record, class Type>
virtual l1t::WriterProxyT< Record, Type >::~WriterProxyT (  )  [inline, virtual]

Definition at line 51 of file WriterProxy.h.

00051 {}


Member Function Documentation

template<class Record, class Type>
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         }


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:48:01 2009 for CMSSW by  doxygen 1.5.4