Esempio n. 1
0
def OverlayMainServicesCfg(flags):
    """Configure event loop for overlay"""
    acc = MainServicesCfg(flags)
    if not flags.Overlay.DataOverlay:
        if flags.Concurrency.NumThreads > 0:
            AthenaHiveEventLoopMgr = CompFactory.AthenaHiveEventLoopMgr
            elmgr = AthenaHiveEventLoopMgr()
        else:
            AthenaEventLoopMgr = CompFactory.AthenaEventLoopMgr
            elmgr = AthenaEventLoopMgr()
        elmgr.UseSecondaryEventNumber = True
        acc.addService(elmgr)
    return acc
Esempio n. 2
0
    from AthenaConfiguration.MainServicesConfig import MainServicesCfg
    from AthenaConfiguration.ComponentFactory import CompFactory
    from AthenaCommon import CfgMgr
    from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
    from TrigEDMConfig import DataScoutingInfo
    from AthenaCommon.CFElements import seqAND
    from Gaudi.Configuration import DEBUG

    cfg = MainServicesCfg(ConfigFlags)
    cfg.merge(ByteStreamReadCfg(ConfigFlags))

    histSvc = CompFactory.THistSvc()
    histSvc.Output += [
        "COSTSTREAM DATAFILE='" + args.outputHist + "' OPT='RECREATE'"
    ]
    cfg.addService(histSvc)

    cfg.addSequence(seqAND("Decoding"))
    cfg.addEventAlgo(CfgMgr.HLTResultMTByteStreamDecoderAlg(), "Decoding")
    costDataDeserialiser = CfgMgr.TriggerEDMDeserialiserAlg(
        "CostDataTrigDeserialiser")
    costDataDeserialiser.ModuleID = DataScoutingInfo.DataScoutingIdentifiers[
        "CostMonDS"]
    cfg.addEventAlgo(costDataDeserialiser, "Decoding")

    hltConfigSvc = CfgMgr.TrigConf__HLTConfigSvc("HLTConfigSvc")
    hltConfigSvc.ConfigSource = "None"
    hltConfigSvc.XMLMenuFile = "None"
    hltConfigSvc.InputType = "file"
    hltConfigSvc.JsonFileName = "HLTMenu_9.json"
    cfg.addService(hltConfigSvc)
Esempio n. 3
0
    from AthenaCommon.Configurable import Configurable
    Configurable.configurableRun3Behavior = 1

    from AthenaConfiguration.AllConfigFlags import ConfigFlags

    ConfigFlags.Input.Files = [
        "myRDO.pool.root",
    ]
    ConfigFlags.lock()

    from AthenaConfiguration.MainServicesConfig import MainServicesCfg
    from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg

    cfg = MainServicesCfg(ConfigFlags)
    cfg.merge(PoolReadCfg(ConfigFlags))

    from LArGeoAlgsNV.LArGMConfig import LArGMCfg
    cfg.merge(LArGMCfg(ConfigFlags))
    from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg
    cfg.merge(LArOnOffIdMappingCfg(ConfigFlags))
    cfg.addEventAlgo(
        CompFactory.DumpLArRawChannels(NtupStream="LARRC",
                                       OutputFileName="",
                                       ToLog=False))

    cfg.addService(
        CompFactory.THistSvc(
            Output=["LARRC DATAFILE='LARRC.root', OPT='RECREATE'"]))

    cfg.run(-1)
Esempio n. 4
0
    myInitialTimeStamp = 1446539185
    evtMax = 4
    from AthenaConfiguration.ComponentFactory import CompFactory
    evtIdModifierSvc = CompFactory.EvtIdModifierSvc(EvtStoreName="StoreGateSvc")
    iovDbMetaDataTool = CompFactory.IOVDbMetaDataTool()
    iovDbMetaDataTool.MinMaxRunNumbers = [myRunNumber, 2147483647]
    cfg.addPublicTool(iovDbMetaDataTool)
    EvtIdModifierSvc_add_modifier(evtIdModifierSvc, run_nbr=myRunNumber, lbk_nbr=myFirstLB, time_stamp=myInitialTimeStamp, nevts=evtMax)
    eventSelector = cfg.getService("EventSelector")
    eventSelector.OverrideRunNumber = True
    eventSelector.RunNumber = myRunNumber
    eventSelector.FirstLB = myFirstLB
    eventSelector.InitialTimeStamp = myInitialTimeStamp # Necessary to avoid a crash
    if hasattr(eventSelector, "OverrideRunNumberFromInput"):
        eventSelector.OverrideRunNumberFromInput = True
    cfg.addService(evtIdModifierSvc)
    # ... up to here?

    # add BeamEffectsAlg
    from BeamEffects.BeamEffectsAlgConfig import BeamEffectsAlgCfg
    cfg.merge(BeamEffectsAlgCfg(ConfigFlags))

    # add the ISF_MainConfig
    from ISF_Config.ISF_MainConfigNew import Kernel_FullG4MTCfg
    cfg.merge(Kernel_FullG4MTCfg(ConfigFlags))

    from TileGeoG4SD.TileGeoG4SDToolConfig import TileGeoG4SDCalcCfg
    cfg.merge(TileGeoG4SDCalcCfg(ConfigFlags))

    # FIXME hack to match to buggy behaviour in old style configuration
    OutputStreamHITS = cfg.getEventAlgo("OutputStreamHITS")
Esempio n. 5
0
    #    cfg.merge( PoolReadCfg( ConfigFlags ) )

    from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
    cfg.merge(ByteStreamReadCfg(ConfigFlags))

    acc = regSelCfg(ConfigFlags)
    cfg.merge(acc)

    RegSelTestAlg = CompFactory.RegSelTestAlg
    testerAlg = RegSelTestAlg()
    testerAlg.Mt = True
    testerAlg.OutputLevel = DEBUG
    cfg.addEventAlgo(testerAlg)
    AthenaPoolCnvSvc = CompFactory.AthenaPoolCnvSvc
    apcs = AthenaPoolCnvSvc()
    cfg.addService(apcs)
    EvtPersistencySvc = CompFactory.EvtPersistencySvc
    cfg.addService(
        EvtPersistencySvc("EventPersistencySvc",
                          CnvServices=[
                              apcs.getFullJobOptName(),
                          ]))

    cfg.getService("IOVDbSvc").OutputLevel = DEBUG

    cfg.store(open("test.pkl", "wb"))
    print("used flags")
    ConfigFlags.dump()
    cfg.run(0)
    print("All OK")
Esempio n. 6
0
    from AtlasGeoModel.InDetGMConfig import InDetGeometryCfg
    cfg.merge(InDetGeometryCfg(ConfigFlags))

    from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg
    cfg.merge(BeamPipeGeometryCfg(ConfigFlags))

    nominalAlignmentCondAlg = NominalAlignmentCondAlgCfg(ConfigFlags,
                                                         OutputLevel=VERBOSE)
    cfg.merge(nominalAlignmentCondAlg)

    histSvc = CompFactory.THistSvc(Output=[
        "ExtrapolationStudies DATAFILE='ExtrapolationStudies.root' OPT='RECREATE'"
    ])
    histSvc.OutputLevel = VERBOSE
    cfg.addService(histSvc)

    accAtlasPropResult, atlasPropResultRootWriterSvc = PropResultRootWriterSvcCfg(
        ConfigFlags, name="ATLASPropResultRootWriterSvc", TreeName="ATLAS")
    cfg.merge(accAtlasPropResult)

    accActsPropResult, actsPropResultRootWriterSvc = PropResultRootWriterSvcCfg(
        ConfigFlags, name="ACTSPropResultRootWriterSvc", TreeName="ACTS")
    cfg.merge(accActsPropResult)

    topoAcc = ExtrapolatorComparisonTestCfg(
        ConfigFlags,
        EventsPerExecute=1000,
        StartPerigeeMinPt=10000,
        StartPerigeeMaxPt=10000,
        ReferenceSurfaceRadius=[80],
Esempio n. 7
0
    ConfigFlags.lock()

    # Initialize configuration object, add accumulator, merge, and run.
    from AthenaConfiguration.MainServicesConfig import MainServicesCfg
    from AthenaConfiguration.ComponentFactory import CompFactory

    from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
    cfg = MainServicesCfg(ConfigFlags)
    cfg.merge(PoolReadCfg(ConfigFlags))

    histSvc = CompFactory.THistSvc()
    histSvc.Output += [
        "RATESTREAM DATAFILE='" + args.outputHist + "' OPT='RECREATE'"
    ]
    cfg.addService(histSvc)

    # Minimal config needed to read metadata: MetaDataSvc & ProxyProviderSvc
    from AthenaServices.MetaDataSvcConfig import MetaDataSvcCfg
    cfg.merge(MetaDataSvcCfg(ConfigFlags))

    cfgsvc = CompFactory.TrigConf.xAODConfigSvc('xAODConfigSvc')
    cfg.addService(cfgsvc)

    tdt = CompFactory.Trig.TrigDecisionTool('TrigDecisionTool')
    tdt.TrigConfigSvc = cfgsvc
    tdt.NavigationFormat = "TrigComposite"
    cfg.addPublicTool(tdt)

    # If the dataset name is in the input files path, then it will be fetched from there
    # Note to enable autolookup, first run "lsetup pyami; voms-proxy-init -voms atlas" and enter your grid pass phrase
Esempio n. 8
0
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from AthenaCommon import Logging
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory

if __name__=="__main__":
    # Setting needed for the ComponentAccumulator to do its thing
    from AthenaCommon.Configurable import Configurable
    Configurable.configurableRun3Behavior=True
    
    # Set message levels
    from AthenaCommon import Constants
    msgLvl = "WARNING"
    from AthenaCommon.Logging import log
    log.setLevel(msgLvl)
    
    # Config flags steer the job at various levels
    from AthenaConfiguration.AllConfigFlags import ConfigFlags
    ConfigFlags.Input.isMC  = True
    ConfigFlags.Input.Files = ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/ASG/mc16_13TeV.410501.PowhegPythia8EvtGen_A14_ttbar_hdamp258p75_nonallhad.merge.AOD.e5458_s3126_r9364_r9315/AOD.11182705._000001.pool.root.1"]
    
    # Flags relating to multithreaded execution
    nthreads=0
    ConfigFlags.Concurrency.NumThreads =nthreads
    if nthreads>0:
    	ConfigFlags.Concurrency.NumThreads = 1
    	ConfigFlags.Concurrency.NumConcurrentEvents = 1
    ConfigFlags.MET.UseTracks = True
    ConfigFlags.MET.DoPFlow = True
    if ConfigFlags.Beam.Type == 'cosmics' or ConfigFlags.Beam.Type == 'singlebeam':# used to have " or not rec.doInDet()" on the end