CMS 3D CMS Logo

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__ (self, db, authFile=None)
 
def update_hashmap (self, input_path)
 

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,
  authFile = None 
)

Definition at line 23 of file o2o_db_cfgmap.py.

23  def __init__(self, db, authFile=None):
24  DbManager.__init__(self, db, authFile)
25  self.ConfigToPayloadMap = make_dbtype(ConfigToPayloadMapDef, self.schema)
26  if self.schema:
27  self.ConfigToPayloadMapSqlite = make_dbtype(ConfigToPayloadMapDef, schema=None)
28  else:
30 
def make_dbtype(backendName, schemaName, baseType)
Definition: conddblib.py:215
def __init__(self, db, authFile=None)

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(), conditionUploadTest.DB.connect(), RPCDBCom.connect(), l1t::DataManager.connect(), TestBase.connect(), HCALConfigDB.connect(), ReadBase.connect(), ShallowTree::BranchConnector.connect(), dqmservices::DQMMonitoringService.connect(), SimActivityRegistry.connect(), sim_act::Signaler< DDDWorld >.connect(), sim_act::Signaler< BeginOfJob >.connect(), sim_act::Signaler< EndOfRun >.connect(), sim_act::Signaler< EndOfTrack >.connect(), sim_act::Signaler< BeginOfTrack >.connect(), ShallowTree::TypedBranchConnector< T >.connect(), sim_act::Signaler< BeginOfEvent >.connect(), sim_act::Signaler< T >.connect(), sim_act::Signaler< G4Step >.connect(), sim_act::Signaler< EndOfEvent >.connect(), sim_act::Signaler< BeginOfRun >.connect(), edm::ServiceToken.connect(), edm::signalslot::Signal< void(PathsAndConsumesOfModulesBase const &, ProcessContext const &)>.connect(), edm::signalslot::Signal< void(StreamContext const &)>.connect(), edm::signalslot::Signal< void(const edmplugin::PluginFactoryBase *)>.connect(), edm::signalslot::Signal< void(StreamContext const &, PathContext const &)>.connect(), edm::signalslot::Signal< void(GlobalContext const &, TerminationOrigin)>.connect(), edm::signalslot::Signal< void(edm::StreamContext const &, edm::ModuleCallingContext const &)>.connect(), edm::signalslot::Signal< void(unsigned int, unsigned int)>.connect(), edm::signalslot::Signal< void(GlobalContext const &)>.connect(), edm::signalslot::Signal< void(edm::BranchDescription const &)>.connect(), edm::signalslot::Signal< void(const edmplugin::SharedLibrary &)>.connect(), edm::signalslot::Signal< void(GlobalContext const &, ModuleCallingContext const &)>.connect(), edm::signalslot::Signal< void(std::string const &, bool)>.connect(), edm::signalslot::Signal< void()>.connect(), edm::signalslot::Signal< void(StreamContext const &, PathContext const &, HLTPathStatus const &)>.connect(), edm::signalslot::Signal< void(TerminationOrigin)>.connect(), edm::signalslot::Signal< void(const std::string &, const edmplugin::PluginInfo &)>.connect(), edm::signalslot::Signal< T >.connect(), edm::signalslot::Signal< void(service::SystemBounds const &)>.connect(), edm::signalslot::Signal< void(const std::string &, const std::string &)>.connect(), edm::signalslot::Signal< void(StreamID)>.connect(), edm::signalslot::Signal< void(const boost::filesystem::path &)>.connect(), edm::signalslot::Signal< void(ModuleDescription const &)>.connect(), edm::signalslot::Signal< void(StreamContext const &, TerminationOrigin)>.connect(), edm::signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)>.connect(), o2o_db_manager.DbManager.connect(), confdbOfflineConverter.OfflineConverter.connect, L1TOMDSHelper.connect(), PFCandConnector.connect(), DDTOBRodAlgo.connect, GlobalTag.GlobalTag.connect(), edm::signalslot::ObsoleteSignal< void(std::string const &)>.connect(), edm::signalslot::ObsoleteSignal< void(std::string const &, HLTPathStatus const &)>.connect(), edm::signalslot::ObsoleteSignal< void(Event const &, EventSetup const &)>.connect(), edm::signalslot::ObsoleteSignal< T >.connect(), edm::signalslot::ObsoleteSignal< void(RunID const &, Timestamp const &)>.connect(), edm::signalslot::ObsoleteSignal< void(EventID const &, Timestamp const &)>.connect(), edm::signalslot::ObsoleteSignal< void(Run const &, EventSetup const &)>.connect(), edm::signalslot::ObsoleteSignal< void(ModuleDescription const &)>.connect(), edm::signalslot::ObsoleteSignal< void(LuminosityBlock const &, EventSetup const &)>.connect(), edm::signalslot::ObsoleteSignal< void(LuminosityBlockID const &, Timestamp const &)>.connect(), SiStripGainFromCalibTree.connect(), edm::serviceregistry::ServicesManager.connect(), o2olib.O2OJobMgr.connect(), cond::service::PoolDBOutputService.connect(), l1t::OMDSReader.connect(), edm::ActivityRegistry.connect(), and plotBeamSpotDB.first.

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