8 OutputTag='-calib-02', **kwargs):
11 from AthenaCommon.Logging
import logging
12 mlog = logging.getLogger(
'LArPhysWaveFromStdNtuple' )
13 if not flags.hasCategory(
'LArCalib'):
14 mlog.error(
"We need the LArCalib flags")
17 if flags.LArCalib.isSC:
18 mlog.info(
"Running for SC")
20 from LArCalibProcessing.LArCalibBaseConfig
import LArCalibBaseCfg
23 from LArCabling.LArCablingConfig
import LArOnOffIdMappingCfg
26 if 'NtupleName' not in kwargs:
27 kwargs.setdefault(
'NtupleName',
'PHYSWAVE')
28 if 'SkipPoints' not in kwargs:
29 kwargs.setdefault(
'SkipPoints', 0)
30 if 'PrefixPoints' not in kwargs:
31 kwargs.setdefault(
'PrefixPoints', 0)
32 if 'StoreKey' not in kwargs:
33 kwargs.setdefault(
'StoreKey',
'LArPhysWaveHECIdeal')
35 algo = CompFactory.LArPhysWaveFromStdNtuple(
"LArPhysWaveFromStdNtuple", **kwargs)
36 algo.FileNames = [InputRootFile]
37 algo.GroupingType = flags.LArCalib.GroupingType
38 algo.isSC = flags.LArCalib.isSC
40 cfg.addEventAlgo(algo)
42 if flags.LArCalib.Output.ROOTFile !=
"":
44 ntdump = CompFactory.LArPhysWaves2Ntuple(
"LArPhysWaves2Ntuple" )
45 ntdump.NtupleName =
"PHYSWAVE"
46 ntdump.KeyList = [ kwargs[
'StoreKey'] ]
47 ntdump.SaveDerivedInfo =
True
48 if flags.LArCalib.isSC:
49 ntdump.isSC = flags.LArCalib.isSC
50 ntdump.BadChanKey =
"LArBadChannelSC"
52 cfg.addEventAlgo(ntdump)
54 cfg.addService(CompFactory.NTupleSvc(Output = [
"FILE1 DATAFILE='"+flags.LArCalib.Output.ROOTFile+
"' OPT='NEW'" ]))
55 cfg.setAppProperty(
"HistogramPersistency",
"ROOT")
57 if ( flags.LArCalib.Output.POOLFile !=
"" ):
59 OutputObjectSpecPhysWave =
"LArPhysWaveContainer#"+kwargs[
'StoreKey']+
"#"+ flags.LArCalib.PhysWave.Folder
60 OutputObjectSpecTagPhysWave =
''.
join(flags.LArCalib.PhysWave.Folder.split(
'/')) + OutputTag
62 from RegistrationServices.OutputConditionsAlgConfig
import OutputConditionsAlgCfg
64 outputFile=flags.LArCalib.Output.POOLFile,
65 ObjectList=[OutputObjectSpecPhysWave],
66 IOVTagList=[OutputObjectSpecTagPhysWave],
67 Run1=flags.LArCalib.IOVStart,
68 Run2=flags.LArCalib.IOVEnd
71 cfg.addService(CompFactory.IOVRegistrationSvc(RecreateFolders =
True))
74 cfg.getService(
"IOVDbSvc").DBInstance=
""