CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
o2o_db_cfgmap.DbManagerDAQ Class Reference
Inheritance diagram for o2o_db_cfgmap.DbManagerDAQ:

Public Member Functions

def __init__
 
def update_hashmap
 

Public Attributes

 ConfigToPayloadMap
 
 ConfigToPayloadMapSqlite
 

Detailed Description

Definition at line 22 of file o2o_db_cfgmap.py.

Constructor & Destructor Documentation

def o2o_db_cfgmap.DbManagerDAQ.__init__ (   self,
  db,
  authPath = None 
)

Definition at line 23 of file o2o_db_cfgmap.py.

23 
24  def __init__(self, db, authPath=None):
25  DbManager.__init__(self, db, authPath)
26  self.ConfigToPayloadMap = make_dbtype(ConfigToPayloadMapDef, self.schema)
27  if self.schema:
28  self.ConfigToPayloadMapSqlite = make_dbtype(ConfigToPayloadMapDef, schema=None)
29  else:
def make_dbtype
Definition: conddblib.py:190

Member Function Documentation

def o2o_db_cfgmap.DbManagerDAQ.update_hashmap (   self,
  input_path 
)

Definition at line 31 of file o2o_db_cfgmap.py.

References o2o_db_manager.DbManager.check_table(), o2o_db_cfgmap.DbManagerDAQ.ConfigToPayloadMap, o2o_db_cfgmap.DbManagerDAQ.ConfigToPayloadMapSqlite, ConnectionManager.connect(), RPCDBCom.connect(), conditionUploadTest.DB.connect(), l1t::DataManager.connect(), HCALConfigDB.connect(), TestBase.connect(), ReadBase.connect(), ShallowTree::BranchConnector.connect(), SimActivityRegistry.connect(), dqmservices::DQMMonitoringService.connect(), sim_act::Signaler< EndOfEvent >.connect(), sim_act::Signaler< EndOfTrack >.connect(), sim_act::Signaler< T >.connect(), sim_act::Signaler< BeginOfEvent >.connect(), sim_act::Signaler< EndOfRun >.connect(), sim_act::Signaler< G4Step >.connect(), sim_act::Signaler< BeginOfRun >.connect(), sim_act::Signaler< BeginOfTrack >.connect(), sim_act::Signaler< DDDWorld >.connect(), sim_act::Signaler< BeginOfJob >.connect(), L1TOMDSHelper.connect(), ShallowTree::TypedBranchConnector< T >.connect(), edm::signalslot::Signal< void(StreamID)>.connect(), edm::signalslot::Signal< void(GlobalContext const &, ModuleCallingContext const &)>.connect(), edm::signalslot::Signal< void(eventsetup::EventSetupRecordKey const &, ESModuleCallingContext const &)>.connect(), edm::signalslot::Signal< void(PathsAndConsumesOfModulesBase const &, ProcessContext const &)>.connect(), edm::signalslot::Signal< void(const edmplugin::PluginFactoryBase *)>.connect(), edm::signalslot::Signal< void(const edmplugin::SharedLibrary &)>.connect(), edm::signalslot::Signal< void(GlobalContext const &, TerminationOrigin)>.connect(), edm::signalslot::Signal< void(StreamContext const &, PathContext const &)>.connect(), edm::signalslot::Signal< void(GlobalContext const &)>.connect(), edm::signalslot::Signal< void(edm::BranchDescription const &)>.connect(), edm::signalslot::Signal< void(eventsetup::ComponentDescription const &)>.connect(), edm::signalslot::Signal< void(LuminosityBlockIndex)>.connect(), edm::signalslot::Signal< void(eventsetup::ComponentDescription const *, eventsetup::EventSetupRecordKey const &, eventsetup::DataKey const &)>.connect(), edm::signalslot::Signal< void(RunIndex)>.connect(), edm::signalslot::Signal< void(const std::filesystem::path &)>.connect(), edm::signalslot::Signal< void()>.connect(), edm::signalslot::Signal< void(edm::StreamContext const &, edm::ModuleCallingContext const &)>.connect(), edm::signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)>.connect(), edm::signalslot::Signal< void(StreamContext const &)>.connect(), edm::signalslot::Signal< void(const std::string &, const edmplugin::PluginInfo &)>.connect(), edm::signalslot::Signal< void(TerminationOrigin)>.connect(), edm::signalslot::Signal< void(StreamContext const &, PathContext const &, HLTPathStatus const &)>.connect(), edm::signalslot::Signal< void(ModuleDescription const &)>.connect(), edm::signalslot::Signal< T >.connect(), edm::signalslot::Signal< void(StreamContext const &, TerminationOrigin)>.connect(), edm::signalslot::Signal< void(const std::string &, const std::string &)>.connect(), edm::signalslot::Signal< void(service::SystemBounds const &)>.connect(), edm::signalslot::Signal< void(std::string const &)>.connect(), o2o_db_manager.DbManager.connect(), edm::ServiceToken.connect(), DDTOBRodAlgo.connect, GlobalTag.GlobalTag.connect(), PFCandConnector.connect(), confdbOfflineConverter.OfflineConverter.connect, SiStripGainFromCalibTree.connect(), edm::signalslot::ObsoleteSignal< T >.connect(), o2olib.O2OJobMgr.connect(), edm::serviceregistry::ServicesManager.connect(), conddb_version_mgr.conddb_tool.connect(), l1t::OMDSReader.connect(), cond::OMSService.connect(), edm::ActivityRegistry.connect(), and first.

31 
32  def update_hashmap(self, input_path):
33  if not os.path.exists(input_path):
34  logging.info('No config-to-payload map file at %s. Skipping.' % input_path)
35  return
36  session = self.connect('sqlite:///%s' % input_path)
37  entry = session.query(self.ConfigToPayloadMapSqlite).first()
38  if entry:
39  self.check_table(ConfigToPayloadMapDef, self.ConfigToPayloadMap)
40  destSession = self.connect()
41  cfgmap = self.ConfigToPayloadMap(config_hash=entry.config_hash,
42  payload_hash=entry.payload_hash,
43  payload_type=entry.payload_type,
44  config_string=entry.config_string,
45  insertion_time=entry.insertion_time)
46  destSession.add(cfgmap)
47  destSession.commit()
48  logging.info('Updated config-to-payload map for %s' % cfgmap.payload_type)
49  logging.info('... config_hash = %s, payload_hash = %s' % (cfgmap.config_hash, cfgmap.payload_hash))
50  else:
51  raise RuntimeError('No entry found in config-to-payload map file %s' % input_path)

Member Data Documentation

o2o_db_cfgmap.DbManagerDAQ.ConfigToPayloadMap

Definition at line 25 of file o2o_db_cfgmap.py.

Referenced by o2o_db_cfgmap.DbManagerDAQ.update_hashmap().

o2o_db_cfgmap.DbManagerDAQ.ConfigToPayloadMapSqlite

Definition at line 27 of file o2o_db_cfgmap.py.

Referenced by o2o_db_cfgmap.DbManagerDAQ.update_hashmap().