CMS 3D CMS Logo

DTConfigDBInit Class Reference

Description:. More...

#include <CondTools/DT/plugins/DTConfigDBInit.h>

Inheritance diagram for DTConfigDBInit:

edm::EDAnalyzer

List of all members.

Public Member Functions

virtual void analyze (const edm::Event &e, const edm::EventSetup &c)
virtual void beginJob (edm::EventSetup const &c)
 Operations.
 DTConfigDBInit (const edm::ParameterSet &ps)
 Constructor.
virtual ~DTConfigDBInit ()
 Destructor.

Private Attributes

std::string authPath
std::string catalog
std::string contact
std::string name


Detailed Description

Description:.

Date
2007/12/07 15:12:56
Revision
1.2
Author:
Paolo Ronchese INFN Padova

Definition at line 35 of file DTConfigDBInit.h.


Constructor & Destructor Documentation

DTConfigDBInit::DTConfigDBInit ( const edm::ParameterSet ps  )  [explicit]

Constructor.

Definition at line 36 of file DTConfigDBInit.cc.

00036                                                          :
00037  name(     ps.getParameter<std::string> ( "name"     ) ),
00038  contact(  ps.getParameter<std::string> ( "contact"  ) ),
00039  catalog(  ps.getParameter<std::string> ( "catalog"  ) ),
00040  authPath( ps.getParameter<std::string> ( "authPath" ) ) {
00041 }

DTConfigDBInit::~DTConfigDBInit (  )  [virtual]

Destructor.

Definition at line 46 of file DTConfigDBInit.cc.

00046                                 {
00047 }


Member Function Documentation

void DTConfigDBInit::analyze ( const edm::Event e,
const edm::EventSetup c 
) [virtual]

Implements edm::EDAnalyzer.

Definition at line 81 of file DTConfigDBInit.cc.

00082                                                        {
00083   return;
00084 }

void DTConfigDBInit::beginJob ( edm::EventSetup const &  c  )  [virtual]

Operations.

Reimplemented from edm::EDAnalyzer.

Definition at line 52 of file DTConfigDBInit.cc.

References authPath, catalog, DTDBSession::connect(), contact, GenMuonPlsPt100GeV_cfg::cout, DTDBSession::disconnect(), lat::endl(), DTConfigToken::id, name, DTDBSession::poolDB(), DTConfigToken::ref, python::TagTree::session, DTConfigList::set(), and DTConfigData::setId().

00052                                                       {
00053 
00054   DTDBSession* session = new DTDBSession( contact, catalog, authPath );
00055   session->connect( false );
00056 
00057   int dummyId = -999999999;
00058   DTConfigData* dummyConf = new DTConfigData();
00059   dummyConf->setId( dummyId );
00060   cond::TypedRef<DTConfigData> confRef( *session->poolDB(), dummyConf );
00061   confRef.markWrite( "DTConfigData" );
00062 
00063   DTConfigList* confList = new DTConfigList( name );
00064   DTConfigToken token;
00065   token.id  = 0;
00066   token.ref = confRef.token();
00067   confList->set( dummyId, token );
00068   cond::TypedRef<DTConfigList> setRef( *session->poolDB(), confList );
00069   setRef.markWrite( "DTConfigList" );
00070   std::string listToken = setRef.token();
00071   std::cout << "configuration list stored with token: " << std::endl 
00072             << listToken << std::endl;
00073 
00074   session->disconnect();
00075   delete session;
00076   return;
00077 
00078 }


Member Data Documentation

std::string DTConfigDBInit::authPath [private]

Definition at line 58 of file DTConfigDBInit.h.

Referenced by beginJob().

std::string DTConfigDBInit::catalog [private]

Definition at line 57 of file DTConfigDBInit.h.

Referenced by beginJob().

std::string DTConfigDBInit::contact [private]

Definition at line 56 of file DTConfigDBInit.h.

Referenced by beginJob().

std::string DTConfigDBInit::name [private]

Definition at line 55 of file DTConfigDBInit.h.

Referenced by beginJob().


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