ATLAS Offline Software
Static Public Member Functions | List of all members
TrigRDBManager Class Reference

Helper to manage database connections. More...

#include <TrigRDBManager.h>

Collaboration diagram for TrigRDBManager:

Static Public Member Functions

static StatusCode closeDBConnections (MsgStream &msg)
 Close database connections. More...
 

Detailed Description

Helper to manage database connections.

This class is a "friend" of IRDBAccessSvc and allowed to manage database connections.

Definition at line 21 of file TrigRDBManager.h.

Member Function Documentation

◆ closeDBConnections()

static StatusCode TrigRDBManager::closeDBConnections ( MsgStream &  msg)
inlinestatic

Close database connections.

Parameters
msgreference to MsgStream

Definition at line 28 of file TrigRDBManager.h.

29  {
30  // Cleanup of dangling database connections from RDBAccessSvc
31  ServiceHandle<IRDBAccessSvc> rdbAccessSvc("RDBAccessSvc", "TrigRDBManager");
32  if (rdbAccessSvc->shutdown("*Everything*")) {
33  msg << MSG::INFO << "Cleaning up RDBAccessSvc connections" << endmsg;
34  }
35  else {
36  msg << MSG::ERROR << "Cleaning up RDBAccessSvc connections failed" << endmsg;
37  return StatusCode::FAILURE;
38  }
39 
40  // Instantiate connection service
41  coral::Context& context = coral::Context::instance();
42  // Load CORAL connection service
43  coral::IHandle<coral::IConnectionService> connSvcH = context.query<coral::IConnectionService>();
44  if (connSvcH.isValid()) {
45  msg << MSG::INFO << "Cleaning up idle CORAL connections" << endmsg;
46  connSvcH->purgeConnectionPool();
47  }
48  return StatusCode::SUCCESS;
49  }

The documentation for this class was generated from the following file:
instance
std::map< std::string, double > instance
Definition: Run_To_Get_Tags.h:8
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
ServiceHandle< IRDBAccessSvc >