3 from AthenaConfiguration.ComponentAccumulator 
import ComponentAccumulator
 
    4 from AthenaConfiguration.ComponentFactory 
import CompFactory
 
    5 from LArCabling.LArCablingConfig 
import LArOnOffIdMappingSCCfg
 
    6 from LArBadChannelTool.LArBadChannelConfig 
import LArBadChannelCfg, LArMaskedSCCfg
 
    8 def LArRAWtoSuperCellCfg(flags,name="LArRAWtoSuperCell",mask=True,SCellContainerOut="",SCIn="",doReco=False, bcidShift=0):
 
   10     from AthenaCommon.Logging 
import logging
 
   11     mlog = logging.getLogger( 
'LArRAWtoSuperCellCfg:' )
 
   16     elif flags.Input.RunNumbers:
 
   18        runinfo=
getLArDTInfoForRun(flags.Input.RunNumbers[0], connstring=
"COOLONL_LAR/CONDBR2")
 
   19        for i 
in range(0,len(runinfo.streamTypes())):
 
   20          if runinfo.streamTypes()[i] ==  
"SelectedEnergy":
 
   23        SCInput=flags.LAr.LATOME.DTInfoForL1
 
   25        LArBadChannelKey=
"LArBadChannelSC" 
   30     if SCellContainerOut==
"": SCellContainerOut=flags.LAr.DT.ET_IDKey 
 
   32     algo = CompFactory.LArRAWtoSuperCell(name,isReco=doReco,SCellContainerOut=SCellContainerOut,LArBadChannelKey=LArBadChannelKey,BCIDOffset=bcidShift)
 
   34     if mask 
and not flags.Input.isMC:
 
   37         algo.LArMaskedChannelKey=
"LArMaskedSC" 
   40        mlog.info(
"Not setting SCInput container name")
 
   42        mlog.info(
"Setting SCInput container name to %s",SCInput)
 
   43        algo.SCellContainerIn = SCInput
 
   45     result.addEventAlgo(algo)