CMS 3D CMS Logo

HCALConfigDB.h

Go to the documentation of this file.
00001 //
00002 // Gena Kukartsev (Brown), Feb. 1, 2008
00003 //
00004 //
00005 #ifndef HCALConfigDB_h
00006 #define HCALConfigDB_h
00007 
00008 #include <iostream>
00009 #include <string.h>
00010 #include "CaloOnlineTools/HcalOnlineDb/interface/ConfigurationDatabaseImpl.hh"
00011 
00012 using namespace std;
00013 using namespace hcal;
00014 
00023 class HCALConfigDB{
00024  public:
00025   
00026   HCALConfigDB( );
00027   ~HCALConfigDB( );
00028   HCALConfigDB( string _accessor );
00029   void connect( string _accessor );
00030   void connect( string _accessor1, string _accessor2 ); // for very specific case of XML and Oracle
00031   void disconnect( void );
00032   void setAccessor( string _accessor );
00033   std::vector<unsigned int> getOnlineLUT( string tag, int crate, int slot, int topbottom, int fiber, int channel, int luttype );
00034   std::vector<unsigned int> getOnlineLUT( string tag, uint32_t _rawid, hcal::ConfigurationDatabase::LUTType _lt = hcal::ConfigurationDatabase::LinearizerLUT );
00035   std::vector<unsigned int> getOnlineLUTFromXML( string tag, uint32_t _rawid, hcal::ConfigurationDatabase::LUTType _lt = hcal::ConfigurationDatabase::LinearizerLUT );
00036   //hcal::ConfigurationDatabase::LUTId getLUTId( uint32_t _rawid );
00037 
00038   oracle::occi::Connection * getConnection( void );
00039   oracle::occi::Environment * getEnvironment( void );
00040 
00041   
00042  protected:
00043 
00044   string accessor;
00045   ConfigurationDatabaseImpl * database;
00046 
00047   // the second DB handle for a crazy case
00048   // when two connections are needed,
00049   // e.g. when the main connection is to
00050   // an XML file
00051   string accessor2;
00052   ConfigurationDatabaseImpl * database2;
00053 
00054 };
00055 #endif

Generated on Tue Jun 9 17:25:54 2009 for CMSSW by  doxygen 1.5.4