10 os.environ[
'CLING_STANDARD_PCH'] =
'none'
11 from PyCool
import cool
12 from CoolConvUtilities
import AtlCoolLib, AtlCoolTool
20 self.
folder=args[2]
if len(args)>2
else '/DMTest/TestAttrList'
23 """ Define the additional syntax for options """
25 print (
'TAG xint [Folder]')
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)
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)
43 if (self.
tag==
"HEAD"):
44 cfolder.storeObject(self.since,self.until,payload,0)
46 cfolder.storeObject(self.since,self.until,payload,0,self.
tag)
47 print (
">== Storing COOL object succeeded. Current content:")
51 print (
'>== Storing COOL object FAILED')
55 act = AtlCoolTool.AtlCoolTool(self.db)
56 print (act.more(self.
folder))