8 from LArCalibProcessing.LArCalibBaseConfig
import LArCalibBaseCfg
10 from LArCabling.LArCablingConfig
import LArOnOffIdMappingCfg
12 if flags.LArCalib.isSC:
13 from LArCabling.LArCablingConfig
import LArOnOffIdMappingSCCfg
16 theLArCompleteToFlat = CompFactory.LArCompleteToFlat(FakeEMBPSLowGain =
not flags.LArCalib.isSC, isSC=flags.LArCalib.isSC)
17 theLArCompleteToFlat.OutputLevel = 2
22 for (fldr,ftag,key,classtype)
in inputFolders:
23 if "Pedestal" in fldr:
24 outTypes.append(
"Pedestal")
25 theLArCompleteToFlat.PedestalInput=key
26 overrides.extend([
"Pedestal",
"PedestalRMS"])
28 outTypes.append(
"Ramp")
29 theLArCompleteToFlat.RampInput=key
30 overrides.extend([
"RampVec"])
32 if 'CaliWave' in fldr:
33 outTypes.append(
"OFCCali")
34 theLArCompleteToFlat.OFCCaliInput=key
36 outTypes.append(
"OFC")
37 theLArCompleteToFlat.OFCInput=key
38 overrides.extend([
"OFCa",
"OFCb",
"TimeOffset"])
39 elif "MphysOverMcal" in fldr:
40 outTypes.append(
"MphysOverMcal")
41 theLArCompleteToFlat.MphysOverMcalInput=key
42 overrides.extend([
"MphysOverMcal"])
44 outTypes.append(
"Shape")
45 theLArCompleteToFlat.ShapeInput=key
46 overrides.extend([
"Shape",
"ShapeDer"])
48 from IOVDbSvc.IOVDbSvcConfig
import addFolders
50 result.merge(
addFolders(flags,fldr,detDb=flags.LArCalib.Input.Database,tag=ftag))
56 result.merge(
addFolders(flags,fldr,detDb=flags.LArCalib.Input.Database))
60 result.addEventAlgo(theLArCompleteToFlat)
62 flatName=
"ElecCalibFlat"
63 if flags.LArCalib.isSC:
65 if "outObjects" not in dir():
66 outObjects=[
"CondAttrListCollection#/LAR/"+flatName+
"/"+ot
for ot
in outTypes]
68 print(
"outObjects are: ",outObjects)
70 from RegistrationServices.OutputConditionsAlgConfig
import OutputConditionsAlgCfg
72 outputFile=
"dummy.root",
73 ObjectList=outObjects,
75 Run1=flags.LArCalib.IOVStart,
76 Run2=flags.LArCalib.IOVEnd
79 print(
"OVERRIDES ARE:",overrides)
81 for i
in range(len(overrides)):
82 types.append(
"Blob16M")
83 result.addService(CompFactory.IOVRegistrationSvc(RecreateFolders =
True, SVFolder=
True,OverrideNames = overrides, OverrideTypes = types))
84 result.getService(
"IOVDbSvc").DBInstance=
""
87 from McEventSelector.McEventSelectorConfig
import McEventSelectorCfg
89 RunNumber = flags.LArCalib.Input.RunNumbers[0],
93 TimeStampInterval = 1))