ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
dmtest_condwriter.createTestDB Class Reference
Inheritance diagram for dmtest_condwriter.createTestDB:
Collaboration diagram for dmtest_condwriter.createTestDB:

Public Member Functions

def setup (self, args)
 
def usage (self)
 
def execute (self)
 

Public Attributes

 tag
 
 xint
 
 folder
 

Detailed Description

Definition at line 14 of file dmtest_condwriter.py.

Member Function Documentation

◆ execute()

def dmtest_condwriter.createTestDB.execute (   self)

Definition at line 28 of file dmtest_condwriter.py.

28  def execute(self):
29 
30  # do update - setup folder specification and create if needed
31  spec = cool.RecordSpecification()
32  spec.extend("xint", cool.StorageType.Int32)
33  print (">== Store object in folder", self.folder)
34  cfolder = AtlCoolLib.ensureFolder(self.db, self.folder, spec,
35  AtlCoolLib.athenaDesc(self.runLumi, 'AthenaAttributeList'),
36  cool.FolderVersioning.MULTI_VERSION)
37  if (cfolder is None): sys.exit(1)
38  # now write data
39  payload = cool.Record(spec)
40  payload['xint'] = self.xint
41  print ('>== Store object with IOV [',self.since,',',self.until,'] and tag',self.tag,'xint',self.xint)
42  try:
43  if (self.tag=="HEAD"):
44  cfolder.storeObject(self.since,self.until,payload,0)
45  else:
46  cfolder.storeObject(self.since,self.until,payload,0,self.tag)
47  print (">== Storing COOL object succeeded. Current content:")
48  except Exception:
49  import traceback
50  traceback.print_exc()
51  print ('>== Storing COOL object FAILED')
52  sys.exit(1)
53 
54  # print full content
55  act = AtlCoolTool.AtlCoolTool(self.db)
56  print (act.more(self.folder))
57 

◆ setup()

def dmtest_condwriter.createTestDB.setup (   self,
  args 
)

Definition at line 16 of file dmtest_condwriter.py.

16  def setup(self,args):
17  # set values of non-optional parameters
18  self.tag=str(args[0])
19  self.xint=int(args[1])
20  self.folder=args[2] if len(args)>2 else '/DMTest/TestAttrList'
21 

◆ usage()

def dmtest_condwriter.createTestDB.usage (   self)
Define the additional syntax for options 

Definition at line 22 of file dmtest_condwriter.py.

22  def usage(self):
23  """ Define the additional syntax for options """
24  self._usage1()
25  print ('TAG xint [Folder]')
26  self._usage2()
27 

Member Data Documentation

◆ folder

dmtest_condwriter.createTestDB.folder

Definition at line 20 of file dmtest_condwriter.py.

◆ tag

dmtest_condwriter.createTestDB.tag

Definition at line 18 of file dmtest_condwriter.py.

◆ xint

dmtest_condwriter.createTestDB.xint

Definition at line 19 of file dmtest_condwriter.py.


The documentation for this class was generated from the following file:
AtlCoolConsole.usage
tuple usage
Definition: AtlCoolConsole.py:443
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
LArG4FSStartPointFilterLegacy.execute
execute
Definition: LArG4FSStartPointFilterLegacy.py:20
str
Definition: BTagTrackIpAccessor.cxx:11
python.setup
def setup()
Definition: Control/Hephaestus/python/__init__.py:9