6def LArHVPathology2AsciiCfg(flags,OutputFile="",InputFile="",folder="/LAR/HVPathologiesOfl/Pathologies",tag=None):
7 from LArGeoAlgsNV.LArGMConfig import LArGMCfg
8 result=LArGMCfg(flags)
9 from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg
10 result.merge(LArOnOffIdMappingCfg(flags))
11 from LArCabling.LArHVCablingConfig import LArHVCablingCfg
12 result.merge(LArHVCablingCfg(flags))
13
14
15 if tag is not None:
16 if not tag.startswith("LAR"):
17 if not tag.startswith("-"): tag= "-"+tag
18 tag="".join(folder.split("/"))+tag
19
20 if (InputFile==""):
21
22 result.merge(addFolders(flags,folder,"LAR_OFL",tag=tag,
23 className="AthenaAttributeList"))
24
25
26
27 LArHVPathologyDbCondAlg=CompFactory.LArHVPathologyDbCondAlg
29 HVMappingKey="LArHVIdMap",
30 HVPAthologyKey="LArHVPathology")
31
32
33
34 result.addCondAlgo(hvpath)
35
36
37 result.addEventAlgo(CompFactory.LArHVPathologyDbAlg(OutFile=OutputFile,
38 InpFile=InputFile,
39 Folder=folder,
40 WriteCondObjs=(InputFile!=""),
41 HVPAthologyKey="LArHVPathology"))
42
43 if (InputFile!=""):
44
45 from RegistrationServices.OutputConditionsAlgConfig import OutputConditionsAlgCfg
46 result.merge(OutputConditionsAlgCfg(flags,
47 name="AttrListOutputAlg",
48 outputFile="dummy.pool.root",
49 ObjectList=["AthenaAttributeList#"+folder+"#"+folder],
50 IOVTagList=[tag,],
51 WriteIOV = True,
52 Run1=flags.Input.RunNumbers[0],
53 LB1=0,
54 Run2=0x7FFFFFFF,
55 LB2=0xFFFFFFFF
56 ))
57 result.addService(CompFactory.IOVRegistrationSvc(RecreateFolders = True))
58
59 return result
60
61
62