ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
AtlTriggerDBCopy.DBConnection Class Reference
Collaboration diagram for AtlTriggerDBCopy.DBConnection:

Public Member Functions

def __init__ (self, dbalias)
 
def __enter__ (self)
 
def __exit__ (self, type, value, traceback)
 
def cursor (self)
 
def schema (self)
 

Public Attributes

 dbalias
 
 connection
 
 schema
 

Detailed Description

Definition at line 30 of file AtlTriggerDBCopy.py.

Constructor & Destructor Documentation

◆ __init__()

def AtlTriggerDBCopy.DBConnection.__init__ (   self,
  dbalias 
)

Definition at line 31 of file AtlTriggerDBCopy.py.

31  def __init__(self, dbalias):
32  self.dbalias = dbalias
33  self.connection = None
34  self.schema = None
35 

Member Function Documentation

◆ __enter__()

def AtlTriggerDBCopy.DBConnection.__enter__ (   self)

Definition at line 36 of file AtlTriggerDBCopy.py.

36  def __enter__(self):
37  credentials = ConfigDBLoader.getConnectionParameters(self.dbalias)
38  self.connection, self.schema = ConfigDBLoader.getConnection(credentials)
39  print(f"Opening connection to {self.dbalias}")
40  return self
41 

◆ __exit__()

def AtlTriggerDBCopy.DBConnection.__exit__ (   self,
  type,
  value,
  traceback 
)

Definition at line 42 of file AtlTriggerDBCopy.py.

42  def __exit__(self, type, value, traceback):
43  self.connection.close()
44  print(f"Closing connection to {self.dbalias}" )
45 

◆ cursor()

def AtlTriggerDBCopy.DBConnection.cursor (   self)

Definition at line 46 of file AtlTriggerDBCopy.py.

46  def cursor(self):
47  return self.connection.cursor()
48 

◆ schema()

def AtlTriggerDBCopy.DBConnection.schema (   self)

Definition at line 49 of file AtlTriggerDBCopy.py.

49  def schema(self):
50  return self.schema
51 
52 # class to handle the insertion of schema and data on the sqlite side

Member Data Documentation

◆ connection

AtlTriggerDBCopy.DBConnection.connection

Definition at line 33 of file AtlTriggerDBCopy.py.

◆ dbalias

AtlTriggerDBCopy.DBConnection.dbalias

Definition at line 32 of file AtlTriggerDBCopy.py.

◆ schema

AtlTriggerDBCopy.DBConnection.schema

Definition at line 34 of file AtlTriggerDBCopy.py.


The documentation for this class was generated from the following file:
CheckTagAssociation.schema
schema
Definition: CheckTagAssociation.py:22
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
query_example.cursor
cursor
Definition: query_example.py:21
dbg::print
void print(std::FILE *stream, std::format_string< Args... > fmt, Args &&... args)
Definition: SGImplSvc.cxx:70