ATLAS Offline Software
Loading...
Searching...
No Matches
AtlTriggerDBCopy.DBConnection Class Reference
Collaboration diagram for AtlTriggerDBCopy.DBConnection:

Public Member Functions

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

Public Attributes

 dbalias = dbalias
 connection = None
 schema = None

Detailed Description

Definition at line 30 of file AtlTriggerDBCopy.py.

Constructor & Destructor Documentation

◆ __init__()

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__()

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
void print(char *figname, TCanvas *c1)

◆ __exit__()

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()

AtlTriggerDBCopy.DBConnection.cursor ( self)

Definition at line 46 of file AtlTriggerDBCopy.py.

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

◆ schema()

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 = None

Definition at line 33 of file AtlTriggerDBCopy.py.

◆ dbalias

AtlTriggerDBCopy.DBConnection.dbalias = dbalias

Definition at line 32 of file AtlTriggerDBCopy.py.

◆ schema

AtlTriggerDBCopy.DBConnection.schema = None

Definition at line 34 of file AtlTriggerDBCopy.py.


The documentation for this class was generated from the following file: