Пример #1
0
def generate_mergeable_collection_name(bare_collection_name,
                                       mergeable_collection_suffix,
                                       merger_input_property):
    """
    Generates and returns a collection name that is also registered to
    the ISF CollectionMerger algorithm.

    :param bare_collection_name: name of the collection if no merging
        is taking place.
    :param mergeable_collection_suffix: suffix to the collection in
        case merging is taking place.
    :param merger_input_property: name of the Input* property in the
        CollectionMerger algorithm to add the mergeable collection to.
    """
    if simFlags.ISFRun() and ISF_Flags.HITSMergingRequired():
        mergeable_collection = '{bare}{suffix}'.format(
            bare=bare_collection_name,
            suffix=mergeable_collection_suffix
        )

        collection_merger = getAlgorithm('ISF_CollectionMerger')
        input_attribute_name = 'Input{merger_input_property}'.format(
            merger_input_property=merger_input_property)
        merger_input_collections = getattr(collection_merger,
                                           input_attribute_name)
        merger_input_collections.append(mergeable_collection)
    else:
        mergeable_collection = bare_collection_name

    return mergeable_collection
Пример #2
0
    if not simFlags.RandomSeedList.checkForExistingSeed('SINGLE'):
        simFlags.RandomSeedList.addSeed("SINGLE", 43657613, 78935670)
if not simFlags.RandomSeedList.checkForExistingSeed('VERTEX'):
    simFlags.RandomSeedList.addSeed('VERTEX', 9123448, 829143)
simFlags.RandomSeedList.addtoService()
simFlags.RandomSeedList.printSeeds()

#--------------------------------------------------------------
# Setup the ISF Output
#--------------------------------------------------------------
from ISF_Example.ISF_Output import ISF_HITSStream
from ISF_Example.ISF_Metadata import createSimulationParametersMetadata, configureRunNumberOverrides
createSimulationParametersMetadata()
configureRunNumberOverrides()

if ISF_Flags.HITSMergingRequired():
    topSequence += collection_merger_alg

#--------------------------------------------------------------
# Post kernel configuration
#--------------------------------------------------------------

# proper GeoModel initialization
from GeoModelSvc.GeoModelSvcConf import GeoModelSvc
GeoModelSvc = GeoModelSvc()
if (DetFlags.detdescr.LAr_on()):
    GeoModelSvc.DetectorTools["LArDetectorToolNV"].GeometryConfig = "FULL"
if (DetFlags.detdescr.Tile_on()):
    GeoModelSvc.DetectorTools["TileDetectorTool"].GeometryConfig = "FULL"

if ISF_Flags.DumpStoreGate():