def dumpSignatureList(self, l1_items, fname): def dumpIt(fp, sigs, slicename): log.info("SignatureList %s" % sigs) fp.write('%sSliceFlags.signatures = [\n' % slicename) for s in sigs: fp.write(" '%s', \n" % s) fp.write(' ]\n') f = open(fname, 'w') f.write('Items = [\n') for i in l1_items: f.write("'%s', \n" % i) f.write(' ]\n') dumpIt(f, JetSliceFlags.signatures(), 'Jet') dumpIt(f, BjetSliceFlags.signatures(), 'Bjet') dumpIt(f, MuonSliceFlags.signatures(), 'Muon') dumpIt(f, BphysicsSliceFlags.signatures(), 'Bphysics') dumpIt(f, EgammaSliceFlags.signatures(), 'Egamma') dumpIt(f, METSliceFlags.signatures(), 'MET') dumpIt(f, TauSliceFlags.signatures(), 'Tau') dumpIt(f, MinBiasSliceFlags.signatures(), 'MinBias') dumpIt(f, HeavyIonSliceFlags.signatures(), 'HeavyIon') dumpIt(f, CosmicSliceFlags.signatures(), 'Cosmic') dumpIt(f, CalibSliceFlags.signatures(), 'Calibration') dumpIt(f, StreamingSliceFlags.signatures(), 'Streaming') dumpIt(f, MonitorSliceFlags.signatures(), 'Monitoring') dumpIt(f, BeamspotSliceFlags.signatures(), 'Beamspot') dumpIt(f, EnhancedBiasSliceFlags.signatures(), 'EnhancedBias') dumpIt(f, TestSliceFlags.signatures(), 'Test') pass
def getChainsFromMenu(self): """ == returns the list of chain names that are in the menu """ log.debug('Creating list of all available slice signatures flags') # make one big list of enabled signatures chains = [] if (CombinedSliceFlags.signatures() or EgammaSliceFlags.signatures()) and self.doEgammaChains: chains += EgammaSliceFlags.signatures() log.debug('GenerateMenu : Electrons and Photons : %s', chains) else: self.doEgammaChains = False if (CombinedSliceFlags.signatures() or JetSliceFlags.signatures()) and self.doJetChains: chains += JetSliceFlags.signatures() else: self.doJetChains = False if (CombinedSliceFlags.signatures() or BjetSliceFlags.signatures()) and self.doBjetChains: chains += BjetSliceFlags.signatures() else: self.doBjetChains = False if (CombinedSliceFlags.signatures() or MuonSliceFlags.signatures()) and self.doMuonChains: chains += MuonSliceFlags.signatures() log.debug('GenerateMenu : Muons : %s', chains) else: self.doMuonChains = False if (CombinedSliceFlags.signatures() or BphysicsSliceFlags.signatures()) and self.doBphysicsChains: chains += BphysicsSliceFlags.signatures() log.debug('GenerateMenu : Bphysics : %s', chains) else: self.doBphysicsChains = False if (CombinedSliceFlags.signatures() or METSliceFlags.signatures()) and self.doMETChains: chains += METSliceFlags.signatures() log.debug('GenerateMenu : MET : %s', chains) else: self.doMETChains = False if (CombinedSliceFlags.signatures() or TauSliceFlags.signatures()) and self.doTauChains: chains += TauSliceFlags.signatures() log.debug('GenerateMenu : Tau : %s', chains) else: self.doTauChains = False if (CombinedSliceFlags.signatures() or MinBiasSliceFlags.signatures()) and self.doMinBiasChains: chains += MinBiasSliceFlags.signatures() log.debug('GenerateMenu : MinBias : %s', chains) else: self.doMinBiasChains = False if (CombinedSliceFlags.signatures() or HeavyIonSliceFlags.signatures()) and self.doHeavyIonChains: chains += HeavyIonSliceFlags.signatures() log.debug('GenerateMenu : HeavyIon : %s', chains) else: self.doHeavyIonChains = False if CosmicSliceFlags.signatures() and self.doCosmicChains: chains += CosmicSliceFlags.signatures() log.debug('GenerateMenu : Cosmic : %s', chains) else: self.doCosmicChains = False if CalibSliceFlags.signatures() and self.doCalibrationChains: chains += CalibSliceFlags.signatures() log.debug('GenerateMenu : Calibration : %s', chains) else: self.doCalibrationChains = False if StreamingSliceFlags.signatures() and self.doStreamingChains: chains += StreamingSliceFlags.signatures() log.debug('GenerateMenu : Streaming : %s', chains) else: self.doStreamingChains = False if MonitorSliceFlags.signatures() and self.doMonitorChains: chains += MonitorSliceFlags.signatures() log.debug('GenerateMenu : Monitor : %s', chains) else: self.doMonitorChains = False if BeamspotSliceFlags.signatures() and self.doBeamspotChains: chains += BeamspotSliceFlags.signatures() log.debug('GenerateMenu : Beamspot : %s', chains) else: self.doBeamspotChains = False if EnhancedBiasSliceFlags.signatures() and self.doEnhancedBiasChains: chains += EnhancedBiasSliceFlags.signatures() log.debug('GenerateMenu : EnhancedBias : %s', chains) else: self.doEnhancedBiasChains = False if TestSliceFlags.signatures() and self.doTestChains: chains += TestSliceFlags.signatures() log.debug('GenerateMenu : Test chains : %s', chains) else: self.doTestChains = False log.debug('Enabled before comb chains: %s', chains) if CombinedSliceFlags.signatures(): chains += CombinedSliceFlags.signatures() else: self.doCombinedChains = False log.debug('Enabled after comb chains: %s', chains) log.debug('GenerateMenu : all Chains : %s', chains) return chains
try: from TriggerMenu import useNewTriggerMenu useNewTM = useNewTriggerMenu() log.info("Using new TriggerMenu: %r" % useNewTM) except: useNewTM = False log.info( "Using old TriggerMenuPython since TriggerMenu.useNewTriggerMenu can't be imported" ) if useNewTM: from TriggerMenu.minbias.MinBiasSliceFlags import MinBiasSliceFlags else: from TriggerMenuPython.MinBiasSliceFlags import MinBiasSliceFlags MinBiasSliceFlags.add_Container(TrigT2MinBiasProperties) trigT2MinBiasProperties = MinBiasSliceFlags.TrigT2MinBiasProperties ##----------------------------------------------------------------------------- ## 4th step ## adding athena common flags to the trigT2MinBiasProperties container trigT2MinBiasProperties.add_JobProperty(pixelClusToTCut) trigT2MinBiasProperties.add_JobProperty(pixelClusTotBins) trigT2MinBiasProperties.add_JobProperty(pixelClusTotMin) trigT2MinBiasProperties.add_JobProperty(pixelClusTotMax) trigT2MinBiasProperties.add_JobProperty(pixelClusSizeBins) trigT2MinBiasProperties.add_JobProperty(pixelClusSizeMin) trigT2MinBiasProperties.add_JobProperty(pixelClusSizeMax) trigT2MinBiasProperties.add_JobProperty(trtHitTotBins) trigT2MinBiasProperties.add_JobProperty(trtHitTotMin) trigT2MinBiasProperties.add_JobProperty(trtHitTotMax)