diff --git a/DaVinciTests/tests/refs/test_davinci_initialise_upgrade.ref b/DaVinciTests/tests/refs/test_davinci_initialise_upgrade.ref index 517b6da830b6673dfc9dd60b8ebb80b15df4fed9..a2fa69c04dd11d0a1b02ee831916cac4fb1952cd 100644 --- a/DaVinciTests/tests/refs/test_davinci_initialise_upgrade.ref +++ b/DaVinciTests/tests/refs/test_davinci_initialise_upgrade.ref @@ -5,53 +5,86 @@ ApplicationMgr INFO Application Manager Configured successfully RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> -DetectorDataSvc INFO Detector description not requested to be loaded +LoKiSvc SUCCESS +Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome +LoKi LoKi +LoKi LoKi +LoKi LoKi +LoKi (LOops & KInematics) LoKi +LoKi LoKi +LoKi Smart & Friendly C++ Physics Analysis Tool Kit LoKi +LoKi LoKi +LoKi LoKi +LoKi Author: Vanya BELYAEV Ivan.Belyaev@itep.ru LoKi +LoKi With the kind help of Galina Pakhlova & Sergey Barsuk LoKi +LoKi LoKi +LoKi Have fun and enjoy! LoKi +LoKi LoKi +Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome +Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome Welcome RootHistSvc INFO Writing ROOT histograms to: DVHistos.root HistogramPersis... INFO Added successfully Conversion service:RootHistSvc -NTupleSvc VERBOSE ServiceLocatorHelper::service: found service IncidentSvc NTupleSvc INFO Added stream file:DVNtuple.root as FILE1 DaVinciInitAlg SUCCESS ================================================================== DaVinciInitAlg SUCCESS Requested to process 100 events DaVinciInitAlg SUCCESS ================================================================== +FSROutputStream... INFO Data source: EventDataSvc output: EventPersistenc... INFO Added successfully Conversion service:RootCnvSvc ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr INFO Application Manager Started successfully EventSelector SUCCESS Reading Event record 1. Record number within stream 1: 1 SimpleHistos INFO GaudiHistoAlgorithm:: Filling Histograms...... Please be patient ! -RootCnvSvc INFO Removed disconnected IO stream:00000000-0000-0000-0000-000000000000 [root://eoslhcb.cern.ch//eos/lhcb/cern-swtest/lhcb/swtest/genFSR/genfsr_upgrade0.ldst] -EventLoopMgr INFO No more events in event selection ApplicationMgr INFO Application Manager Stopped successfully DaVinciInitAlg SUCCESS ================================================================== -DaVinciInitAlg SUCCESS 20 events processed +DaVinciInitAlg SUCCESS 100 events processed DaVinciInitAlg SUCCESS ================================================================== -DaVinciInitAlg WARNING Should have processed 100 events -DaVinciInitAlg WARNING ================================================================== +GenFSRMerge INFO ========== Merging GenFSR ========== +FSROutputStream... INFO Set up File Summary Record +FSROutputStream... INFO Events output: 1 EventLoopMgr INFO Histograms converted successfully according to request. +LoKiSvc SUCCESS +Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good +Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good +LoKi LoKi +LoKi LoKi +LoKi Good Bye from LoKi! LoKi +LoKi LoKi +LoKi (LOops & KInematics) LoKi +LoKi LoKi +LoKi Smart & Friendly C++ Physics Analysis Tool Kit LoKi +LoKi LoKi +LoKi LoKi +LoKi LoKi mailing list ('LoKi-club') : lhcb-loki@cern.ch LoKi +LoKi Comments, suggestions, criticism, ideas, questions and requests are *ALWAYS* welcome LoKi +LoKi LoKi +Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good +Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good Bye Good ToolSvc INFO Removing all tools created by ToolSvc +DaVinciInitAlg....SUCCESS Exceptions/Errors/Warnings/Infos Statistics : 0/0/2/0 *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully ApplicationMgr INFO Application Manager Terminated successfully SimpleHistos SUCCESS 1D histograms in directory "SimpleHistos" : 10 | ID | Title | # | Mean | RMS | Skewness | Kurtosis | - | 101 | "Exponential" | 20 | 0.86883 | 0.69261 | 0.96379 | 0.55029 | - | 102 | "Breit" | 20 | -0.03827 | 1.064 | 0.069108 | -0.531 | - | 1111 | "Forced Numeric ID time test" | 20 | -0.21376 | 1.0394 | -0.069985 | -0.90535 | - | AutoID time test | "AutoID time test" | 20 | -0.21376 | 1.0394 | -0.069985 | -0.90535 | - | Gaussian mean=0, sigma=1 | "Gaussian mean=0, sigma=1" | 20 | -0.21376 | 1.0394 | -0.069985 | -0.90535 | - | poisson | "Poisson" | 20 | 1.8947 | 1.4471 | 0.49597 | -1.2241 | - | subdir1/bino | "Binominal" | 20 | 2.25 | 1.299 | 0.055654 | -1.0884 | - | subdir2/bino | "Binominal" | 20 | 2.25 | 1.299 | 0.055654 | -1.0884 | - | test1 | "Forced Alpha ID time test" | 20 | -0.21376 | 1.0394 | -0.069985 | -0.90535 | - | varBinning/x | "1D Variable Binning" | 20 | 0.93986 | 2.2384 | -0.48081 | -0.51602 | + | 101 | "Exponential" | 100 | 0.86944 | 0.83526 | 1.3231 | 1.3673 | + | 102 | "Breit" | 100 | -0.050344 | 1.116 | -0.36005 | 1.6486 | + | 1111 | "Forced Numeric ID time test" | 100 | 0.04085 | 1.1075 | -0.12242 | -0.32017 | + | AutoID time test | "AutoID time test" | 100 | 0.04085 | 1.1075 | -0.12242 | -0.32017 | + | Gaussian mean=0, sigma=1 | "Gaussian mean=0, sigma=1" | 100 | 0.04085 | 1.1075 | -0.12242 | -0.32017 | + | poisson | "Poisson" | 100 | 1.8085 | 1.1694 | 0.26477 | -0.78547 | + | subdir1/bino | "Binominal" | 100 | 2.0306 | 1.138 | 0.27968 | -0.82258 | + | subdir2/bino | "Binominal" | 100 | 2.0306 | 1.138 | 0.27968 | -0.82258 | + | test1 | "Forced Alpha ID time test" | 100 | 0.04085 | 1.1075 | -0.12242 | -0.32017 | + | varBinning/x | "1D Variable Binning" | 100 | -0.20883 | 2.6896 | 0.18717 | -1.2165 | SimpleHistos SUCCESS 1D profile histograms in directory "SimpleHistos" : 9 | ID | Title | # | Mean | RMS | Skewness | Kurtosis | - | Expo V Gauss 1DProf | "Expo V Gauss 1DProf" | 20 | -0.21376 | 1.0394 | 0.58116 | -0.93335 | - | Expo V Gauss 1DProf s | "Expo V Gauss 1DProf s" | 20 | -0.21376 | 1.0394 | 0.58116 | -0.93335 | - | Gauss V Flat 1DProf | "Gauss V Flat 1DProf" | 20 | 0.87939 | 6.0918 | 0 | -3 | - | Gauss V Flat 1DProf S | "Gauss V Flat 1DProf S" | 20 | 0.87939 | 6.0918 | 0 | -3 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-I" | 9 | -0.29997 | 7.2953 | 0.69467 | -1.6474 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-I s" | 9 | -0.29997 | 7.2953 | 0.69467 | -1.6474 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-II" | 11 | 1.8443 | 4.6754 | 0 | -3 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-II s" | 11 | 1.8443 | 4.6754 | 0 | -3 | - | varBinning/a | "1D Profile Variable Binning" | 20 | 0.93986 | 2.2384 | 0 | -3 | + | Expo V Gauss 1DProf | "Expo V Gauss 1DProf" | 100 | 0.04085 | 1.1075 | -1.2689 | 2.4065 | + | Expo V Gauss 1DProf s | "Expo V Gauss 1DProf s" | 100 | 0.04085 | 1.1075 | -1.2689 | 2.4065 | + | Gauss V Flat 1DProf | "Gauss V Flat 1DProf" | 100 | -0.53201 | 5.8217 | 11.029 | 12.795 | + | Gauss V Flat 1DProf S | "Gauss V Flat 1DProf S" | 100 | -0.53201 | 5.8217 | 11.029 | 12.795 | + | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-I" | 52 | 0.1216 | 5.9301 | 0.32131 | -1.1125 | + | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-I s" | 52 | 0.1216 | 5.9301 | 0.32131 | -1.1125 | + | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-II" | 48 | -1.2401 | 5.6166 | 0 | -3 | + | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-II s" | 48 | -1.2401 | 5.6166 | 0 | -3 | + | varBinning/a | "1D Profile Variable Binning" | 100 | -0.20883 | 2.6896 | 0 | -3 | diff --git a/Phys/DaVinci/job/DaVinci.supp b/Phys/DaVinci/job/DaVinci.supp deleted file mode 100644 index 703f282e28b61950d7823691ba91a44215b81e1a..0000000000000000000000000000000000000000 --- a/Phys/DaVinci/job/DaVinci.supp +++ /dev/null @@ -1,2 +0,0 @@ -# Suppressions file for valgrind - diff --git a/Phys/DaVinci/options/DaVinci-Example.py b/Phys/DaVinci/options/DaVinci-Example.py index d4ed134db7c3f89d1e69d3e08b5556bfa9ea7588..4de665b537bb5e844a7f675cd209dacb836330da 100644 --- a/Phys/DaVinci/options/DaVinci-Example.py +++ b/Phys/DaVinci/options/DaVinci-Example.py @@ -9,121 +9,126 @@ # or submit itself to any jurisdiction. # # # ############################################################################### - # - # Simple DaVinci example job running on K*mumu data and filling an nTuple - # - # syntax - # ./run gaudirun.py DaVinci-Example.py options/DaVinciTestData.py - # - # @author P. Koppenburg based on previous versions - # +# +# Simple DaVinci example job running on K*mumu data and filling an nTuple +# +# syntax +# ./run gaudirun.py DaVinci-Example.py options/DaVinciTestData.py +# +# @author P. Koppenburg based on previous versions +# ## from Gaudi.Configuration import * -from Configurables import DaVinci, FilterDesktop, CombineParticles, OfflineVertexFitter +from Gaudi.Configuration import INFO +from Configurables import DaVinci, CombineParticles from PhysSelPython.Wrappers import AutomaticData, Selection, SelectionSequence, DataOnDemand -from Configurables import FilterDesktop -from Configurables import LoKiSvc # from StandardParticles import StdLooseMuons -from Configurables import DecayTreeTuple, LoKi__Hybrid__TupleTool, TupleToolTrigger, TupleToolDecay, TupleToolTISTOS, MCDecayTreeTuple, TupleToolMCTruth, TupleToolEventInfo, MCTupleToolHierarchy +from Configurables import DecayTreeTuple, TupleToolTrigger, TupleToolMCTruth, TupleToolEventInfo, MCTupleToolHierarchy from Configurables import TimingAuditor, SequencerTimerTool -TimingAuditor().addTool(SequencerTimerTool,name="TIMER") +TimingAuditor().addTool(SequencerTimerTool, name="TIMER") TimingAuditor().TIMER.NameSize = 60 MessageSvc().Format = "% F%80W%S%7W%R%T %0W%M" -DaVinci().EvtMax=-1 +DaVinci().EvtMax = -1 DaVinci().TupleFile = 'DVNtuple.root' #DaVinci().HistogramFile = 'DVHistos.root' -from PhysConf.Selections import AutomaticData +#from PhysConf.Selections import AutomaticData StdLooseMuons = AutomaticData('Phys/StdLooseMuons/Particles') from DecayTreeTuple.Configuration import * -name="TwoBody" - -TwoBodyComb = CombineParticles("TwoBodyComb", - #Preambulo=["from LoKiPhysMC.decorators import *","from LoKiPhysMC.functions import mcMatch"], - DecayDescriptors = ['J/psi(1S) -> mu+ mu-','[J/psi(1S) -> mu+ mu+]cc'], - CombinationCut = "(ADOCACHI2CUT(30, ''))", - MotherCut = "(BPVVDCHI2() > 30) & (VFASPF(VCHI2/VDOF) < 10)", - DaughtersCuts = { - #'mu+': '(MIPCHI2DV(PRIMARY)>9) & (PROBNNmu>0.2) & (PT > 0*GeV) & (TRGHOSTPROB<0.25)', - #'mu-': '(MIPCHI2DV(PRIMARY)>9) & (PROBNNmu>0.2) & (PT > 0*GeV) & (TRGHOSTPROB<0.25)'} - 'mu+': '(MIPCHI2DV(PRIMARY)>9) & (PT > 0*GeV) & (TRGHOSTPROB<0.25)', - 'mu-': '(MIPCHI2DV(PRIMARY)>9) & (PT > 0*GeV) & (TRGHOSTPROB<0.25)'} - ) -TwoBodySel = Selection ("TwoBodySel", - Algorithm = TwoBodyComb, - RequiredSelections = [StdLooseMuons]) - -TwoBodySeq = SelectionSequence("Seq"+name, - TopSelection = TwoBodySel) - +name = "TwoBody" + +TwoBodyComb = CombineParticles( + "TwoBodyComb", + #Preambulo=["from LoKiPhysMC.decorators import *","from LoKiPhysMC.functions import mcMatch"], + DecayDescriptors=['J/psi(1S) -> mu+ mu-', '[J/psi(1S) -> mu+ mu+]cc'], + CombinationCut="(ADOCACHI2CUT(30, ''))", + MotherCut="(BPVVDCHI2() > 30) & (VFASPF(VCHI2/VDOF) < 10)", + DaughtersCuts={ + #'mu+': '(MIPCHI2DV(PRIMARY)>9) & (PROBNNmu>0.2) & (PT > 0*GeV) & (TRGHOSTPROB<0.25)', + #'mu-': '(MIPCHI2DV(PRIMARY)>9) & (PROBNNmu>0.2) & (PT > 0*GeV) & (TRGHOSTPROB<0.25)'} + 'mu+': '(MIPCHI2DV(PRIMARY)>9) & (PT > 0*GeV) & (TRGHOSTPROB<0.25)', + 'mu-': '(MIPCHI2DV(PRIMARY)>9) & (PT > 0*GeV) & (TRGHOSTPROB<0.25)' + }) +TwoBodySel = Selection( + "TwoBodySel", Algorithm=TwoBodyComb, RequiredSelections=[StdLooseMuons]) + +TwoBodySeq = SelectionSequence("Seq" + name, TopSelection=TwoBodySel) tuple1 = DecayTreeTuple("TwoBody") -tuple1.TupleName="TwoBody" -tuple1.NTupleDir="" +tuple1.TupleName = "TwoBody" +tuple1.NTupleDir = "" -ToolList=[ -'TupleToolMCTruth', -'TupleToolEventInfo' -] +ToolList = ['TupleToolMCTruth', 'TupleToolEventInfo'] -tuple1.ToolList = ToolList +tuple1.ToolList = ToolList tuple1.addBranches({ - "TwoBody" : "J/psi(1S)", - "Track1" : "J/psi(1S) -> ^[mu+]CC [mu-]CC", - "Track2" : "J/psi(1S) -> [mu+]CC ^[mu-]CC", + "TwoBody": "J/psi(1S)", + "Track1": "J/psi(1S) -> ^[mu+]CC [mu-]CC", + "Track2": "J/psi(1S) -> [mu+]CC ^[mu-]CC", }) tuple1.TwoBody.addTool(TupleToolEventInfo) tuple1.addTool(TupleToolMCTruth) tuple1.TupleToolMCTruth.OutputLevel = INFO -tuple1.TupleToolMCTruth.ToolList = [ "MCTupleToolHierarchy" ] +tuple1.TupleToolMCTruth.ToolList = ["MCTupleToolHierarchy"] tuple1.TupleToolMCTruth.addTool(MCTupleToolHierarchy) tuple1.TupleToolMCTruth.MCTupleToolHierarchy.OutputLevel = INFO tuple1.addTool(TupleToolMCTruth) -LoKi_TwoBody=tuple1.TwoBody.addTupleTool("LoKi::Hybrid::TupleTool/LoKi_TwoBody") +LoKi_TwoBody = tuple1.TwoBody.addTupleTool( + "LoKi::Hybrid::TupleTool/LoKi_TwoBody") LoKi_TwoBody.Preambulo.append("from LoKiPhysMC.decorators import *") LoKi_TwoBody.Preambulo.append("from LoKiPhysMC.functions import mcMatch") LoKi_TwoBody.Variables = { - 'Mcorr' : "BPVCORRM()", - 'M' : "M", - 'P' : "P", - 'PT' : "PT", - 'ETA' : "ETA", - 'MINIPCHI2' : "MIPCHI2DV(PRIMARY)", - 'DIRA_OWNPV' : "BPVDIRA()", - 'FDCHI2_OWNPV' : "BPVVDCHI2()", - 'ENDVERTEX_CHI2' : "VFASPF(VCHI2/VDOF)", - 'DOCAMAX' : "PFUNA(ADOCAMAX(''))", - 'FromSameB' : "switch( mcMatch('([ (Beauty) --> [X+]CC [X-]CC ... ]CC) ') , 1 , 0)", + 'Mcorr': + "BPVCORRM()", + 'M': + "M", + 'P': + "P", + 'PT': + "PT", + 'ETA': + "ETA", + 'MINIPCHI2': + "MIPCHI2DV(PRIMARY)", + 'DIRA_OWNPV': + "BPVDIRA()", + 'FDCHI2_OWNPV': + "BPVVDCHI2()", + 'ENDVERTEX_CHI2': + "VFASPF(VCHI2/VDOF)", + 'DOCAMAX': + "PFUNA(ADOCAMAX(''))", + 'FromSameB': + "switch( mcMatch('([ (Beauty) --> [X+]CC [X-]CC ... ]CC) ') , 1 , 0)", } -LoKi_one=tuple1.Track1.addTupleTool("LoKi::Hybrid::TupleTool/LoKi_one") +LoKi_one = tuple1.Track1.addTupleTool("LoKi::Hybrid::TupleTool/LoKi_one") LoKi_one.Preambulo.append("from LoKiPhysMC.decorators import *") LoKi_one.Preambulo.append("from LoKiPhysMC.functions import mcMatch") LoKi_one.Variables = { - 'ID' : "ID", - 'P' : "P", - 'PT' : "PT", - 'ETA' : "ETA", - 'MINIPCHI2' : "MIPCHI2DV(PRIMARY)", - 'TRCHI2DOF' : "TRCHI2DOF", - 'TRGHOSTPROB' : "TRGHOSTPROB", - 'FromB' : "switch( mcMatch('([ (Beauty) --> X+ ... ]CC) ') , 1 , 0)", - } - -LoKi_two=tuple1.Track2.addTupleTool("LoKi::Hybrid::TupleTool/LoKi_two") -LoKi_two.Preambulo=LoKi_one.Preambulo + 'ID': "ID", + 'P': "P", + 'PT': "PT", + 'ETA': "ETA", + 'MINIPCHI2': "MIPCHI2DV(PRIMARY)", + 'TRCHI2DOF': "TRCHI2DOF", + 'TRGHOSTPROB': "TRGHOSTPROB", + 'FromB': "switch( mcMatch('([ (Beauty) --> X+ ... ]CC) ') , 1 , 0)", +} + +LoKi_two = tuple1.Track2.addTupleTool("LoKi::Hybrid::TupleTool/LoKi_two") +LoKi_two.Preambulo = LoKi_one.Preambulo LoKi_two.Variables = LoKi_one.Variables tuple1.Decay = "J/psi(1S) -> ^[mu+]CC ^[mu-]CC" tuple1.Inputs = [TwoBodySeq.outputLocation()] -DaVinci().appendToMainSequence( [TwoBodySeq,tuple1] ) - +DaVinci().appendToMainSequence([TwoBodySeq, tuple1]) diff --git a/Phys/DaVinci/options/DaVinci-Simplest.py b/Phys/DaVinci/options/DaVinci-Simplest.py index e37777be8677518850c4a2d3c255deb671c3577f..d07d0ea0394aa56e456a61970f96a96397c1000a 100644 --- a/Phys/DaVinci/options/DaVinci-Simplest.py +++ b/Phys/DaVinci/options/DaVinci-Simplest.py @@ -12,20 +12,16 @@ # # The simplest options file which reads some data and creates an ntuple. # -# Used for DaVinciTutorial 0 and 0.5 -# ######################################################################## - -from Gaudi.Configuration import * from Configurables import DaVinci #configure differently depending on which data you use -DaVinci().DataType="Upgrade" +DaVinci().DataType = "Upgrade" #save an ntuple with the luminosity -DaVinci().Lumi=True -DaVinci().TupleFile="DVnTuples.root" +DaVinci().Lumi = True +DaVinci().TupleFile = "DVnTuples.root" ######################################################################## # diff --git a/Phys/DaVinci/options/DaVinciTestData.py b/Phys/DaVinci/options/DaVinciTestData.py index 650c3e3cc17fdfc4f5548e05eae2eaf07ed4d12a..9c86167d186302458ec03fd7fb56a1f95b9f6b25 100644 --- a/Phys/DaVinci/options/DaVinciTestData.py +++ b/Phys/DaVinci/options/DaVinciTestData.py @@ -8,16 +8,16 @@ # granted to it by virtue of its status as an Intergovernmental Organization # # or submit itself to any jurisdiction. # ############################################################################### - # - # This will always contain some data - # - # syntax gaudirun.py <Some options> options/DaVinciTestData.py - # - # @author P. Koppenburg - # +# +# This will always contain some data +# +# syntax gaudirun.py <Some options> options/DaVinciTestData.py +# +# @author P. Koppenburg +# ## -from Gaudi.Configuration import * from Configurables import DaVinci from PRConfig import TestFileDB + TestFileDB.test_file_db['Upgrade_Bd2KstarMuMu'].run(configurable=DaVinci()) diff --git a/Phys/DaVinci/python/DaVinci/Configuration.py b/Phys/DaVinci/python/DaVinci/Configuration.py index 545828040fe7c6123308777f080ca67d88ada8d7..63220f6d43f29b9aa32a689476c0135f91a5a6c7 100644 --- a/Phys/DaVinci/python/DaVinci/Configuration.py +++ b/Phys/DaVinci/python/DaVinci/Configuration.py @@ -13,10 +13,10 @@ High level configuration tools for DaVinci. """ from LHCbKernel.Configuration import * +from Configurables import ApplicationMgr from Configurables import GaudiSequencer -from Configurables import ( LHCbConfigurableUser, LHCbApp, - PhysConf, - DstConf, LumiAlgsConf, TurboConf, FlavourTaggingConf ) +from Configurables import (LHCbConfigurableUser, LHCbApp, PhysConf, DstConf, + LumiAlgsConf, TurboConf, FlavourTaggingConf) from Configurables import ToolSvc, DataOnDemandSvc from LumiAlgs.LumiIntegratorConf import LumiIntegratorConf import GaudiKernel.ProcessJobOptions @@ -25,7 +25,7 @@ import GaudiKernel.ProcessJobOptions ## # from AnalysisPython.Logger import getLogger -log = getLogger ( 'DaVinci' ) +log = getLogger('DaVinci') class DaVinciConfigurationError(Exception): @@ -33,93 +33,180 @@ class DaVinciConfigurationError(Exception): pass -class DaVinci(LHCbConfigurableUser) : +class DaVinci(LHCbConfigurableUser): __slots__ = { # Application Configuration : sent to LHCbApp and Gaudi - "EvtMax" : -1 # Number of events to analyse - , "SkipEvents" : 0 # Number of events to skip at beginning for file - , "PrintFreq" : 1000 # The frequency at which to print event numbers - , "DataType" : '' # Data type, can be ['2008','2009','MC09','2010','2011','2012','2015','2016','2017','2018','Upgrade'] Forwarded to PhysConf, DstConf and LHCbApp. MUST be set. - , "Simulation" : False # set to True to use SimCond. Forwarded to PhysConf - , "DDDBtag" : "" # Tag for DDDB. Default as set in DDDBConf for DataType - , "CondDBtag" : "" # Tag for CondDB. Default as set in DDDBConf for DataType - , "DQFLAGStag" : "" # Tag for DQFLAGS. Default as set in DDDBConf for DataType + "EvtMax": + -1 # Number of events to analyse + , + "SkipEvents": + 0 # Number of events to skip at beginning for file + , + "PrintFreq": + 1000 # The frequency at which to print event numbers + , + "DataType": + '' # Data type, can be ['2008','2009','MC09','2010','2011','2012','2015','2016','2017','2018','Upgrade'] Forwarded to PhysConf, DstConf and LHCbApp. MUST be set. + , + "Simulation": + False # set to True to use SimCond. Forwarded to PhysConf + , + "DDDBtag": + "" # Tag for DDDB. Default as set in DDDBConf for DataType + , + "CondDBtag": + "" # Tag for CondDB. Default as set in DDDBConf for DataType + , + "DQFLAGStag": + "" # Tag for DQFLAGS. Default as set in DDDBConf for DataType # Input - , "Input" : [] # Input data. Can also be passed as a second option file. - , "InputType" : "DST" # 'DST', 'DIGI', 'RDST', 'MDST', 'XDST' or 'LDST'. Nothing means the input type is compatible with being a DST. - , 'EnableUnpack' : None # Explicitly enable/disable unpacking for input data (if specified) - , "Turbo" : False # Set to True to access Turbo data from the input file (made by Tesla) + , + "Input": [] # Input data. Can also be passed as a second option file. + , + "InputType": + "DST" # 'DST', 'DIGI', 'RDST', 'MDST', 'XDST' or 'LDST'. Nothing means the input type is compatible with being a DST. + , + 'EnableUnpack': + None # Explicitly enable/disable unpacking for input data (if specified) + , + "Turbo": + False # Set to True to access Turbo data from the input file (made by Tesla) # Output - , "HistogramFile" : "" # Name of output Histogram file (set to "" to get no output) - , "TupleFile" : "" # Name of output Tuple file - , "WriteFSR" : True # Flags whether to write out an FSR - , "MergeGenFSR" : False # Flags whether to merge the generatore level FSRs - , "RootCompressionLevel" : "LZMA:6" # ROOT compression level for ntuple files + , + "HistogramFile": + "" # Name of output Histogram file (set to "" to get no output) + , + "TupleFile": + "" # Name of output Tuple file + , + "WriteFSR": + True # Flags whether to write out an FSR + , + "MergeGenFSR": + False # Flags whether to merge the generatore level FSRs + , + "RootCompressionLevel": + "LZMA:6" # ROOT compression level for ntuple files # DQ - , "IgnoreDQFlags" : False # If False (default), process only events with good DQ. + , + "IgnoreDQFlags": + False # If False (default), process only events with good DQ. # Monitoring - , "MoniSequence" : [] # Add your monitors here + , + "MoniSequence": [] # Add your monitors here # DaVinci Options - , "MainOptions" : "" # Main option file to execute - , "UserAlgorithms" : [] # User algorithms to run. - , "RedoMCLinks" : False # On some stripped DST one needs to redo the Track<->MC link table. Set to true if problems with association. - , "Lumi" : False # Run Lumi accounting (should normally be True for user jobs) - , "EventPreFilters" : [] - , "VerboseMessages" : False # Turn on some verbose printout - , "RootInTES" : "" # RootInTES property propagated to MainSequence in case of MDST input type - , "Detectors" : ['VP', 'UT', 'FT', 'Rich1Pmt', 'Rich2Pmt', 'Ecal', 'Hcal', 'Muon', 'Magnet', 'Tr' ] - , "TurboStream": + , + "MainOptions": + "" # Main option file to execute + , + "UserAlgorithms": [] # User algorithms to run. + , + "RedoMCLinks": + False # On some stripped DST one needs to redo the Track<->MC link table. Set to true if problems with association. + , + "Lumi": + False # Run Lumi accounting (should normally be True for user jobs) + , + "EventPreFilters": [], + "VerboseMessages": + False # Turn on some verbose printout + , + "RootInTES": + "" # RootInTES property propagated to MainSequence in case of MDST input type + , + "Detectors": [ + 'VP', 'UT', 'FT', 'Rich1Pmt', 'Rich2Pmt', 'Ecal', 'Hcal', 'Muon', + 'Magnet', 'Tr' + ], + "TurboStream": None # Name of the Turbo stream for the data. Mutually exclusive with StrippingStream - , "StrippingStream": + , + "StrippingStream": None # Name of the Stripping stream of the data. Mutually exclusive with TurboStream - } + } _propertyDocDct = { - "EvtMax" : """ Number of events to analyse """ - , "SkipEvents" : """ Number of events to skip at beginning for file """ - , "PrintFreq" : """ The frequency at which to print event numbers """ - , "DataType" : """ Data type, can be ['2008','2009','MC09','2010','2011','2012','2015','2016','2017','2018','Upgrade'] Forwarded to PhysConf, DstConf and LHCbApp """ - , "Simulation" : """ set to True to use SimCond. Forwarded to PhysConf """ - , "DDDBtag" : """ Tag for DDDB. Default as set in DDDBConf for DataType """ - , "CondDBtag" : """ Tag for CondDB. Default as set in DDDBConf for DataType """ - , "DQFLAGStag" : """ Tag for DQFLAGS. Default as set in DDDBConf for DataType """ - , "Input" : """ Input data. Can also be passed as a second option file. """ - , "InputType" : """ 'DST', 'DIGI', 'RDST', 'MDST', 'XDST' or 'LDST'. Nothing means the input type is compatible with being a DST. """ - , 'EnableUnpack' : """Explicitly enable/disable unpacking for input data (if specified) """ - , "Turbo" : """Set to True to access Turbo data from the input file (made by Tesla)""" - , "HistogramFile" : """ Write name of output Histogram file """ - , "TupleFile" : """ Write name of output Tuple file """ - , 'WriteFSR' : """ Flags whether to write out an FSR """ - , 'MergeGenFSR' : """ Flags whether to merge the generatore level FSRs """ - , "RootCompressionLevel" : """ ROOT Compression level for ntuples """ - , 'IgnoreDQFlags' : """ If False, process only events with good DQ. Default is False """ - , "MainOptions" : """ Main option file to execute """ - , "UserAlgorithms" : """ User algorithms to run. """ - , "RedoMCLinks" : """ On some stripped DST one needs to redo the Track<->MC link table. Set to true if problems with association. """ - , "Lumi" : """ Run event count and Lumi accounting (should normally be True) """ - , "EventPreFilters" : """Set of event filtering algorithms to be run before DaVinci initializaton sequence. Only events passing these filters will be processed.""" - , "VerboseMessages" : """ Enable additional verbose printouts """ - , "RootInTES" : """ RootInTES (for uDst input type) """ - , "Detectors" : """ List of detectors """ - , "TurboStream": - """ Name of the Turbo stream for the data. Mutually exclusive with StrippingStream """ - , "StrippingStream": + "EvtMax": + """ Number of events to analyse """, + "SkipEvents": + """ Number of events to skip at beginning for file """, + "PrintFreq": + """ The frequency at which to print event numbers """, + "DataType": + """ Data type, can be ['2008','2009','MC09','2010','2011','2012','2015','2016','2017','2018','Upgrade'] Forwarded to PhysConf, DstConf and LHCbApp """, + "Simulation": + """ set to True to use SimCond. Forwarded to PhysConf """, + "DDDBtag": + """ Tag for DDDB. Default as set in DDDBConf for DataType """, + "CondDBtag": + """ Tag for CondDB. Default as set in DDDBConf for DataType """, + "DQFLAGStag": + """ Tag for DQFLAGS. Default as set in DDDBConf for DataType """, + "Input": + """ Input data. Can also be passed as a second option file. """, + "InputType": + """ 'DST', 'DIGI', 'RDST', 'MDST', 'XDST' or 'LDST'. Nothing means the input type is compatible with being a DST. """, + 'EnableUnpack': + """Explicitly enable/disable unpacking for input data (if specified) """, + "Turbo": + """Set to True to access Turbo data from the input file (made by Tesla)""", + "HistogramFile": + """ Write name of output Histogram file """, + "TupleFile": + """ Write name of output Tuple file """, + 'WriteFSR': + """ Flags whether to write out an FSR """, + 'MergeGenFSR': + """ Flags whether to merge the generatore level FSRs """, + "RootCompressionLevel": + """ ROOT Compression level for ntuples """, + 'IgnoreDQFlags': + """ If False, process only events with good DQ. Default is False """, + "MainOptions": + """ Main option file to execute """, + "UserAlgorithms": + """ User algorithms to run. """, + "RedoMCLinks": + """ On some stripped DST one needs to redo the Track<->MC link table. Set to true if problems with association. """, + "Lumi": + """ Run event count and Lumi accounting (should normally be True) """, + "EventPreFilters": + """Set of event filtering algorithms to be run before DaVinci initializaton sequence. Only events passing these filters will be processed.""", + "VerboseMessages": + """ Enable additional verbose printouts """, + "RootInTES": + """ RootInTES (for uDst input type) """, + "Detectors": + """ List of detectors """, + "TurboStream": + """ Name of the Turbo stream for the data. Mutually exclusive with StrippingStream """, + "StrippingStream": """ Name of the Stripping stream for the data. Mutually exclusive with TurboStream """ - } + } __used_configurables__ = [ - PhysConf , - DstConf , - LumiAlgsConf , - LumiIntegratorConf, - TurboConf , - FlavourTaggingConf, - LHCbApp ] - - __legacy_datatypes__ = [ "MC09", "2008", "2009", "2010", "2011", "2012", "2015", "2016", "2017", "2018", ] + PhysConf, DstConf, LumiAlgsConf, LumiIntegratorConf, TurboConf, + FlavourTaggingConf, LHCbApp + ] + + __legacy_datatypes__ = [ + "MC09", + "2008", + "2009", + "2010", + "2011", + "2012", + "2015", + "2016", + "2017", + "2018", + ] __known_datatypes__ = ["Upgrade"] - __known_upgrade_detectors__ = ['VP', 'UT', 'FT', 'Rich1Pmt', 'Rich2Pmt', 'Ecal', 'Hcal', 'Muon', 'Magnet', 'Tr' ] + __known_upgrade_detectors__ = [ + 'VP', 'UT', 'FT', 'Rich1Pmt', 'Rich2Pmt', 'Ecal', 'Hcal', 'Muon', + 'Magnet', 'Tr' + ] __known_TurboStreams = { 'Allstreams', 'Turbo', 'Charmcharged', 'Charmkshh', 'Charmmultibody', @@ -187,49 +274,57 @@ class DaVinci(LHCbConfigurableUser) : ################################################################################ # Check Options are OK # + def _checkOptions(self): """ Checks options. Changes a few if needed. """ # Temp hack for DV v30r1 (fix need in LHCbApp, but missed the release) if self.getProp("Simulation") or self.getProp("DataType") == "MC09": - self.setProp("IgnoreDQFlags",True) + self.setProp("IgnoreDQFlags", True) dataType = self.getProp("DataType") if (not dataType): - raise TypeError( "You must set DataType" ) + raise TypeError("You must set DataType") if dataType in self.__legacy_datatypes__: raise TypeError( "Invalid DataType '{}'. DaVinci versions higher than v50 " \ "should be used for Run3 data only. " \ "See http://lhcbdoc.web.cern.ch/lhcbdoc/davinci/releases/".format(dataType) ) - if dataType not in self.__known_datatypes__ : - raise TypeError( "Invalid DataType '%s'" %dataType ) - inputType = self.getProp( "InputType" ).upper() - if inputType not in [ "MDF", "DST", "DIGI", "RDST", "MDST", "SDST", "XDST", "LDST" ]: - raise TypeError( "Invalid inputType '%s'"%inputType ) - if ( dataType in [ "MC09" ] ): + if dataType not in self.__known_datatypes__: + raise TypeError("Invalid DataType '%s'" % dataType) + inputType = self.getProp("InputType").upper() + if inputType not in [ + "MDF", "DST", "DIGI", "RDST", "MDST", "SDST", "XDST", "LDST" + ]: + raise TypeError("Invalid inputType '%s'" % inputType) + if (dataType in ["MC09"]): if not self.getProp("Simulation"): - log.warning("Setting Simulation = True for "+dataType) - self.setProp("Simulation",True) + log.warning("Setting Simulation = True for " + dataType) + self.setProp("Simulation", True) - if self.getProp("Simulation") and not inputType in ( "MDF" , "DIGI" , "MDST" ) : + if self.getProp("Simulation") and not inputType in ("MDF", "DIGI", + "MDST"): redo = self.getProp("RedoMCLinks") - if (inputType == "RDST") and (redo) : + if (inputType == "RDST") and (redo): log.warning("Re-doing MC links not possible for RDST") - self.setProp("RedoMCLinks", False ) + self.setProp("RedoMCLinks", False) - if self.getProp("Simulation") and self.getProp('Lumi') : + if self.getProp("Simulation") and self.getProp('Lumi'): log.warning('Lumi not valid for Simulation. Setting Lumi = False') - self.setProp('Lumi', False ) + self.setProp('Lumi', False) ## for simulation, it is very important to specify proper DB-tags: - if self.getProp('Simulation') : - if not self.isPropertySet('DDDBtag' ) or not self.getProp('DDDBtag' ) : - log.warning("``DDDBtag'' is not specified for simulated data") - if not self.isPropertySet('CondDBtag') or not self.getProp('CondDBtag' ) : - log.warning("``CondDBtag'' is not specified for simulated data") + if self.getProp('Simulation'): + if not self.isPropertySet('DDDBtag') or not self.getProp( + 'DDDBtag'): + log.warning( + "``DDDBtag'' is not specified for simulated data") + if not self.isPropertySet('CondDBtag') or not self.getProp( + 'CondDBtag'): + log.warning( + "``CondDBtag'' is not specified for simulated data") if self.getProp("MergeGenFSR") and not self.getProp("Simulation"): - raise TypeError("Cannot MergeGenFSR on real data"); + raise TypeError("Cannot MergeGenFSR on real data") # Turbo data. if self.isPropertySet('TurboStream'): @@ -275,43 +370,55 @@ class DaVinci(LHCbConfigurableUser) : log.info('Set RootInTES = ' + repr(rootInTes)) self.setProp('RootInTES', rootInTes) - if 'MDST' == self.getProp('InputType').upper() : - if not self.getProp('RootInTES') : - log.warning ('RootInTES is not specified for MDST input') - elif self.getProp('Simulation') and self.getProp('Turbo') : pass - elif self.getProp('Simulation') and not self.getProp('RootInTES') in ( '/Event/AllStreams' , '/Event/AllStreams/' ) : - log.warning ('RootInTES for MC-uDST ("%s") is not equal to "/Event/AllStreams"' % self.getProp('RootInTES') ) - + if 'MDST' == self.getProp('InputType').upper(): + if not self.getProp('RootInTES'): + log.warning('RootInTES is not specified for MDST input') + elif self.getProp('Simulation') and self.getProp('Turbo'): + pass + elif self.getProp('Simulation') and not self.getProp( + 'RootInTES') in ('/Event/AllStreams', + '/Event/AllStreams/'): + log.warning( + 'RootInTES for MC-uDST ("%s") is not equal to "/Event/AllStreams"' + % self.getProp('RootInTES')) ################################################################################ # Configure sub-packages # + def _configureSubPackages(self): """ Define DB and so on """ # Delegate handling to LHCbApp configurable - self.setOtherProps(LHCbApp(),["DataType","CondDBtag","DDDBtag", - "DQFLAGStag","Simulation","IgnoreDQFlags"]) - self.setOtherProps(PhysConf(),["DataType","Simulation","InputType","Detectors"]) - self.setOtherProps(DstConf(),["DataType","Turbo"]) + self.setOtherProps(LHCbApp(), [ + "DataType", "CondDBtag", "DDDBtag", "DQFLAGStag", "Simulation", + "IgnoreDQFlags" + ]) + self.setOtherProps( + PhysConf(), ["DataType", "Simulation", "InputType", "Detectors"]) + self.setOtherProps(DstConf(), ["DataType", "Turbo"]) if self.getProp("Turbo"): data_type = self.getProp('DataType') - if not self.isPropertySet("RootInTES") : - if self.getProp('Simulation') and '2015' == data_type : - self.setProp('RootInTES','/Event/Turbo') - else : - raise DaVinciConfigurationError ( "You must set DaVinci().RootInTES when DaVinci().Turbo is `True`") + if not self.isPropertySet("RootInTES"): + if self.getProp('Simulation') and '2015' == data_type: + self.setProp('RootInTES', '/Event/Turbo') + else: + raise DaVinciConfigurationError( + "You must set DaVinci().RootInTES when DaVinci().Turbo is `True`" + ) - if self.getProp('Simulation') and '2015' == data_type : pass - elif 'MDST' != self.getProp('InputType') : - log.info ("Forcing `InputType` to `'MDST'` as `Turbo` is `True`") - self.setProp ( "InputType" , "MDST") + if self.getProp('Simulation') and '2015' == data_type: pass + elif 'MDST' != self.getProp('InputType'): + log.info( + "Forcing `InputType` to `'MDST'` as `Turbo` is `True`") + self.setProp("InputType", "MDST") - self.setOtherProps(TurboConf(), ["DataType","Simulation","RootInTES"]) + self.setOtherProps(TurboConf(), + ["DataType", "Simulation", "RootInTES"]) # These lines are here and not in TurboConf because different applications need to process Turbo data differently: # Tesla has to do a bit of juggling to get the data from HLT2 to locations under a single RootInTES, whereas DaVinci doesn't. @@ -322,23 +429,25 @@ class DaVinci(LHCbConfigurableUser) : # Enable the unpacking of the persisted reconstruction objects TurboConf().RunPersistRecoUnpacking = True - def _analysisSeq(self) : - return GaudiSequencer('DaVinciAnalysisSeq', IgnoreFilterPassed = True) + def _analysisSeq(self): + return GaudiSequencer('DaVinciAnalysisSeq', IgnoreFilterPassed=True) - def _filteredEventSeq(self) : + def _filteredEventSeq(self): prefilters = self.getProp('EventPreFilters') - return GaudiSequencer('FilteredEventSeq', - Members = prefilters + [self._init(), self._analysisSeq()]) + return GaudiSequencer( + 'FilteredEventSeq', + Members=prefilters + [self._init(), + self._analysisSeq()]) ################################################################################ # Event Initialisation sequence # + def _dvInit(self): """ Initialisation sequence """ - from Configurables import (DaVinciInit, - MemoryTool) + from Configurables import (DaVinciInit, MemoryTool) di = DaVinciInit('DaVinciInitAlg', Increment=self.getProp("PrintFreq")) di.addTool(MemoryTool) @@ -348,23 +457,23 @@ class DaVinci(LHCbConfigurableUser) : def _init(self): from Configurables import PhysConf - inputType = self.getProp( "InputType" ).upper() + inputType = self.getProp("InputType").upper() initSeqs = [] - if ( (inputType != 'MDST' ) & (inputType != "MDF") & (inputType != "DIGI" )) : - physinit = PhysConf().initSequence() # PhysConf initSequence + if ((inputType != 'MDST') & (inputType != "MDF") & + (inputType != "DIGI")): + physinit = PhysConf().initSequence() # PhysConf initSequence # Analysis analysisinit = self.anaInitSequence() - initSeqs = [physinit,analysisinit] + initSeqs = [physinit, analysisinit] - return GaudiSequencer('DaVinciEventInitSeq', - Members = initSeqs, - IgnoreFilterPassed = True) + return GaudiSequencer( + 'DaVinciEventInitSeq', Members=initSeqs, IgnoreFilterPassed=True) # # configure reconstruction to be redone - # + # def anaInitSequence(self): """ Analysis init Sequence. @@ -384,13 +493,13 @@ class DaVinci(LHCbConfigurableUser) : """ from CaloKernel.ConfUtils import getAlgo from Configurables import NeutralPP2MC, ChargedPP2MC - + root_ = '/Event' if self.getProp("InputType") == 'MDST' and self.getProp('RootInTES'): root_ = self.getProp('RootInTES') - + self.unpackMC(root_) - + ## offline neutral protoparticles alg1 = getAlgo( NeutralPP2MC, ## type @@ -398,7 +507,7 @@ class DaVinci(LHCbConfigurableUser) : 'Offline', ## context root_ + '/Relations/Rec/ProtoP/Neutrals', ## base-location True) ## on-demand - + ## hlt neutral protoparticles alg2 = getAlgo( NeutralPP2MC, ## type @@ -406,13 +515,13 @@ class DaVinci(LHCbConfigurableUser) : 'Hlt', ## context root_ + '/Relations/Rec/ProtoP/Neutrals', ## base-location True) ## on-demand - + from Configurables import DataOnDemandSvc, ChargedPP2MC - + if root_ != '/Event': alg1.RootInTES = root_ ChargedPP2MC(RootInTES=root_) - + dod = DataOnDemandSvc() dod.AlgMap[root_ + '/Relations/Rec/ProtoP/Charged'] = ChargedPP2MC() dod.AlgMap[root_ + '/Relations/Rec/ProtoP/Upstream'] = ChargedPP2MC() @@ -426,18 +535,18 @@ class DaVinci(LHCbConfigurableUser) : """ import os from Configurables import UnpackMCParticle, UnpackMCVertex - + mcRoot = os.path.join(rootInTES, "MC") - + log.info("Will unpack MC objects to {0}".format(mcRoot)) - + particlesOutput = os.path.join(mcRoot, "Particles") verticesOutput = os.path.join(mcRoot, "Vertices") - + dod = DataOnDemandSvc() - + dod.NodeMap[mcRoot] = "DataObject" - + dod.AlgMap[particlesOutput] = UnpackMCParticle(RootInTES=rootInTES) dod.AlgMap[verticesOutput] = UnpackMCVertex(RootInTES=rootInTES) @@ -447,18 +556,18 @@ class DaVinci(LHCbConfigurableUser) : dod.NodeMap[rootInTES + '/pSim'] = 'DataObject' from Configurables import Gaudi__DataLink as Link for name, target, what in [ - ## process ``pMC'' and ``pSim'' variants of uDST coherently + ## process ``pMC'' and ``pSim'' variants of uDST coherently ('LINK:MC2Sim4Particles', rootInTES + '/pSim/MCParticles', rootInTES + '/pMC/Particles'), ('LINK:MC2Sim4Vertices', rootInTES + '/pSim/MCVertices', rootInTES + '/pMC/Vertices'), - # In case any algorithm has a hard-coded dependency on /Event/MC/..., - # creates links from the location under RootInTES to /Event/MC + # In case any algorithm has a hard-coded dependency on /Event/MC/..., + # creates links from the location under RootInTES to /Event/MC ('LINK:MCParticles', '/Event/MC/Particles', rootInTES + '/MC/Particles'), ('LINK:MCVertices', '/Event/MC/Vertices', rootInTES + '/MC/Vertices'), - ]: + ]: dod.AlgMap[target] = Link( name, Target=target, What=what, OutputLevel=5) log.debug( @@ -469,29 +578,29 @@ class DaVinci(LHCbConfigurableUser) : dod.AlgMap[particlesOutput] = GaudiSequencer( "SEQ:MCParticles", Members=[ - dod.AlgMap[particlesOutput], - Link( - 'LINK:MCParticles2MC', - Target=particlesOutput, - What='/Event/MC/Particles', - OutputLevel=5) + dod.AlgMap[particlesOutput], + Link( + 'LINK:MCParticles2MC', + Target=particlesOutput, + What='/Event/MC/Particles', + OutputLevel=5) ]) dod.AlgMap[verticesOutput] = GaudiSequencer( "SEQ:MCVertices", Members=[ - dod.AlgMap[verticesOutput], - Link( - 'LINK:MCVertices2MC', - Target=verticesOutput, - What='/Event/MC/Vertices', - OutputLevel=5) + dod.AlgMap[verticesOutput], + Link( + 'LINK:MCVertices2MC', + Target=verticesOutput, + What='/Event/MC/Vertices', + OutputLevel=5) ]) def redoMCLinks(self, init): """ Redo MC links. """ - + if (self.getProp("Simulation")): redo = self.getProp("RedoMCLinks") if (redo): @@ -499,7 +608,7 @@ class DaVinci(LHCbConfigurableUser) : EventNodeKiller, TrackAssociator) mcKillSeq = GaudiSequencer( "KillMCLinks" - ) # The sequence killing the node of it exists + ) # The sequence killing the node of it exists tescheck = TESCheck( "DaVinciEvtCheck") # Check for presence of node ... tescheck.Inputs = ["Link/Rec/Track/Best"] # @@ -511,7 +620,7 @@ class DaVinci(LHCbConfigurableUser) : mcKillSeq.Members = [ tescheck, evtnodekiller, TrackAssociator() - ] + ] mcLinkSeq = GaudiSequencer( "RedoMCLinks") # The sequence redoing the links mcLinkSeq.IgnoreFilterPassed = True # Run it always @@ -526,7 +635,7 @@ class DaVinci(LHCbConfigurableUser) : from Configurables import LoKiSvc lokiService = LoKiSvc() ApplicationMgr().ExtSvc += [lokiService] - + # # BTaggingTool configuration # @@ -547,6 +656,7 @@ class DaVinci(LHCbConfigurableUser) : ################################################################################ # Lumi setup # + def _lumi(self): """ read FSR and accumulate event and luminosity data @@ -554,25 +664,28 @@ class DaVinci(LHCbConfigurableUser) : """ log.info("Creating Lumi Algorithms") seq = [] - self.setOtherProps(LumiAlgsConf(),["DataType","InputType"]) + self.setOtherProps(LumiAlgsConf(), ["DataType", "InputType"]) # add merge, touch-and-count sequence lumiSeq = GaudiSequencer("LumiSeq") LumiAlgsConf().LumiSequencer = lumiSeq - seq += [ lumiSeq ] + seq += [lumiSeq] - if self.getProp( "Lumi" ) : + if self.getProp("Lumi"): tupleFile = self.getProp('TupleFile') - if tupleFile == '' : log.warning('TupleFile has not been set. No Lumi ntuple will be produced.') - # add integrator for normalization - self.setOtherProps(LumiIntegratorConf(),["InputType","TupleFile","IgnoreDQFlags"]) + if tupleFile == '': + log.warning( + 'TupleFile has not been set. No Lumi ntuple will be produced.' + ) + # add integrator for normalization + self.setOtherProps(LumiIntegratorConf(), + ["InputType", "TupleFile", "IgnoreDQFlags"]) lumiInt = GaudiSequencer("IntegratorSeq") LumiIntegratorConf().LumiSequencer = lumiInt - seq += [ lumiInt ] + seq += [lumiInt] return seq - ################################################################################ # Generator FSR writer @@ -588,8 +701,8 @@ class DaVinci(LHCbConfigurableUser) : seqGenFSR.Members += [GenFSRMerge()] seq += [seqGenFSR] - FSRWriter = RecordStream( "FSROutputStreamDstWriter") - if not FSRWriter.isPropertySet( "OutputLevel" ): + FSRWriter = RecordStream("FSROutputStreamDstWriter") + if not FSRWriter.isPropertySet("OutputLevel"): FSRWriter.OutputLevel = INFO return seq @@ -597,44 +710,45 @@ class DaVinci(LHCbConfigurableUser) : ################################################################################ # @todo Stolen from Brunel. Could be common to all apps? # + def _defineMonitors(self): """ Define monitors """ - from Configurables import (ApplicationMgr, - AuditorSvc, - SequencerTimerTool) + from Configurables import (AuditorSvc, SequencerTimerTool) from Configurables import TimingAuditor, SequencerTimerTool - ApplicationMgr().ExtSvc += [ 'AuditorSvc' ] + ApplicationMgr().ExtSvc += ['AuditorSvc'] ApplicationMgr().AuditAlgorithms = True - AuditorSvc().Auditors += [ 'TimingAuditor' ] + AuditorSvc().Auditors += ['TimingAuditor'] SequencerTimerTool().OutputLevel = 4 # Do not print event number at every event printfreq = self.getProp("PrintFreq") - if ( printfreq == 0 ): + if (printfreq == 0): log.warning("Print frequence cannot be 0") printfreq = 1000 EventSelector().PrintFreq = printfreq # Change the column size of Timing table - TimingAuditor().addTool(SequencerTimerTool,name="TIMER") + TimingAuditor().addTool(SequencerTimerTool, name="TIMER") if not TimingAuditor().TIMER.isPropertySet("NameSize"): TimingAuditor().TIMER.NameSize = 50 ################################################################################ # set EvtMax # + def _defineEvents(self): """ Define number of events """ # Delegate handling to LHCbApp configurable - self.setOtherProps(LHCbApp(),["EvtMax","SkipEvents"]) + self.setOtherProps(LHCbApp(), ["EvtMax", "SkipEvents"]) ################################################################################ # returns evtMax # + def evtMax(self): """ Get evtMax @@ -644,104 +758,116 @@ class DaVinci(LHCbConfigurableUser) : ################################################################################ # Defines input # + def _defineInput(self): """ Define Input """ input = self.getProp("Input") - if ( len(input) > 0 ) : + if (len(input) > 0): from GaudiConf import IOHelper - persistency=None - inputType = self.getProp( "InputType" ).upper() - if inputType == "MDF" : persistency = "MDF" + persistency = None + inputType = self.getProp("InputType").upper() + if inputType == "MDF": persistency = "MDF" #support connection strings and lists of files - input=IOHelper(persistency,persistency).convertConnectionStrings(input,"I") + input = IOHelper(persistency, + persistency).convertConnectionStrings(input, "I") #clear selector to maintain the same behaviour - IOHelper(persistency,persistency).inputFiles(input, clear=True) + IOHelper(persistency, persistency).inputFiles(input, clear=True) ################################################################################ # Tune initialisation # + def _configureInput(self): """ Tune initialisation """ # Input data type - inputType = self.getProp( "InputType" ).upper() + inputType = self.getProp("InputType").upper() # Get the event time (for CondDb) from ODIN from Configurables import EventClockSvc - EventClockSvc().EventTimeDecoder = "OdinTimeDecoder"; + EventClockSvc().EventTimeDecoder = "OdinTimeDecoder" # if property set explcicitly - use it! - if self.isPropertySet('EnableUnpack') : + if self.isPropertySet('EnableUnpack'): unPack = self.getProp('EnableUnpack') - DstConf ( EnableUnpack = unPack ) - PhysConf ( EnableUnpack = unPack ) + DstConf(EnableUnpack=unPack) + PhysConf(EnableUnpack=unPack) elif inputType != "MDF": - defaultUnpacking = ["Reconstruction","Stripping"] - DstConf ( EnableUnpack = defaultUnpacking ) - PhysConf ( EnableUnpack = defaultUnpacking ) - if inputType != "MDST" : - if self.getProp("Simulation") : - DstConf().setProp("SimType","Full") + defaultUnpacking = ["Reconstruction", "Stripping"] + DstConf(EnableUnpack=defaultUnpacking) + PhysConf(EnableUnpack=defaultUnpacking) + if inputType != "MDST": + if self.getProp("Simulation"): + DstConf().setProp("SimType", "Full") return inputType ################################################################################ # ROOT files # + def _rootFiles(self): """ output files """ ApplicationMgr().HistogramPersistency = "ROOT" - if ( self.isPropertySet('HistogramFile') and self.getProp("HistogramFile") != "" ): - HistogramPersistencySvc().OutputFile = self.getProp("HistogramFile") + if (self.isPropertySet('HistogramFile') + and self.getProp("HistogramFile") != ""): + HistogramPersistencySvc().OutputFile = self.getProp( + "HistogramFile") - if ( self.isPropertySet('TupleFile') and self.getProp("TupleFile") != "" ): + if (self.isPropertySet('TupleFile') + and self.getProp("TupleFile") != ""): tupleFile = self.getProp("TupleFile") ntSvc = NTupleSvc() - ApplicationMgr().ExtSvc += [ ntSvc ] - for _line in ntSvc.Output : - if 0 <= _line.find ('FILE1') : - log.warning ('Replace NTuple-LUN FILE1: ' + _line ) - ntSvc.Output.remove ( _line ) + ApplicationMgr().ExtSvc += [ntSvc] + for _line in ntSvc.Output: + if 0 <= _line.find('FILE1'): + log.warning('Replace NTuple-LUN FILE1: ' + _line) + ntSvc.Output.remove(_line) tupleStr = "FILE1 DATAFILE='%s' TYP='ROOT' OPT='NEW'" % tupleFile - NTupleSvc().Output += [ tupleStr ] + NTupleSvc().Output += [tupleStr] # NTupleSvc().OutputLevel = 1 # Set the compression level for the ROOT tuple file from GaudiKernel.Configurable import ConfigurableGeneric as RFileCnv - RFileCnv('RFileCnv').GlobalCompression = self.getProp("RootCompressionLevel") + RFileCnv('RFileCnv').GlobalCompression = self.getProp( + "RootCompressionLevel") ################################################################################ ################################################################################ # Main sequence # + def _mainSequence(self): """ Main Sequence """ self.mainSeq.IgnoreFilterPassed = True - self._analysisSeq().Members += [ self.mainSeq ] - opts = self.getProp( "MainOptions" ) - if not (opts == '') : - importOptions( self.getProp( "MainOptions" ) ) - else : - log.info("No MainOptions specified. DaVinci() will import no options file!") + self._analysisSeq().Members += [self.mainSeq] + opts = self.getProp("MainOptions") + if not (opts == ''): + importOptions(self.getProp("MainOptions")) + else: + log.info( + "No MainOptions specified. DaVinci() will import no options file!" + ) log.info("Creating User Algorithms") - self.appendToMainSequence( self.getProp("UserAlgorithms") ) + self.appendToMainSequence(self.getProp("UserAlgorithms")) ################################################################################ # Append to Main sequence # + def appendToMainSequence(self, algs): """ Append to main sequence. Can be called from other configurables @@ -749,41 +875,41 @@ class DaVinci(LHCbConfigurableUser) : log.info("Append to Main Sequence has been called") for alg in algs: configurable = self._configurable(alg) - self.mainSeq.Members += [ configurable ] + self.mainSeq.Members += [configurable] ################################################################################ # Preppend to Main sequence # + def prependToMainSequence(self, algs): """ Preppend to main sequence. Can be called from other configurables """ log.info("Append to Main Sequence has been called") - addseq = [ ] + addseq = [] for alg in algs: configurable = self._configurable(alg) - addseq += [ configurable ] + addseq += [configurable] self.mainSeq.Members = addseq + self.mainSeq.Members - def _configurable(self, obj) : + def _configurable(self, obj): - - from PhysConf.Selections import SelectionSequence as SS + from PhysConf.Selections import SelectionSequence as SS from PhysConf.Selections import MultiSelectionSequence as MS - from SelPy.selection import SelectionBase as SB + from SelPy.selection import SelectionBase as SB - if isinstance ( obj , ( SS , MS ) ) : + if isinstance(obj, (SS, MS)): ## get the actual sequence(configurable) from (multi) selection sequence return obj.sequence() - elif isinstance ( obj , SB ) : + elif isinstance(obj, SB): ## construct the selection sequence and get the configurable - ss = SS ( 'SEQ:%s' % obj.name() , obj ) + ss = SS('SEQ:%s' % obj.name(), obj) return ss.sequence() return obj ## for MDST input type and if RootInTES is specified, propagate it - def _root_in_Tes ( self ) : + def _root_in_Tes(self): """ Propagate RootInTES : @@ -792,95 +918,101 @@ class DaVinci(LHCbConfigurableUser) : """ ## - itype = self.getProp ( 'InputType' ).upper() - if not 'MDST' == itype : return ## no action + itype = self.getProp('InputType').upper() + if not 'MDST' == itype: return ## no action # - if not self.isPropertySet ('RootInTES') : return ## no action + if not self.isPropertySet('RootInTES'): return ## no action rit = self.getProp('RootInTES') - if rit in ( '' , '/' , '/Event' , '/Event/' ) : return ## no action + if rit in ('', '/', '/Event', '/Event/'): return ## no action # ## call uDstConf # from PhysConf.MicroDST import uDstConf - uDstConf ( rit , logger = getLogger ( 'PhysConf.MicroDST' ) ) ## use it! + uDstConf(rit, logger=getLogger('PhysConf.MicroDST')) ## use it! # ## setup RootInTES property for mainSeq - if not hasattr ( self , 'mainSeq' ) : return + if not hasattr(self, 'mainSeq'): return ms = self.mainSeq - def _set_root_in_tes_ ( s , root ) : + def _set_root_in_tes_(s, root): # - if isinstance ( s , str ) : return + if isinstance(s, str): return prps = set(s.getProperties()) - if 'RootInTES' in prps : - if not s.isPropertySet ( 'RootInTES' ) : - log.info ( "Set RootInTES=%s for %s" % ( root , s.getName() ) ) + if 'RootInTES' in prps: + if not s.isPropertySet('RootInTES'): + log.info("Set RootInTES=%s for %s" % (root, s.getName())) s.RootInTES = root # - if not 'Members' in prps : return + if not 'Members' in prps: return # - for a in s.Members : - _set_root_in_tes_ ( a , root ) + for a in s.Members: + _set_root_in_tes_(a, root) - _set_root_in_tes_ ( ms , rit ) + _set_root_in_tes_(ms, rit) ################################################################################ # Monitoring sequence # + def _moniSequence(self): """ Monitoring sequence """ self.moniSeq.IgnoreFilterPassed = True - self._analysisSeq().Members += [ self.moniSeq ] + self._analysisSeq().Members += [self.moniSeq] log.info("Creating Moni Algorithms") - self.appendToMoniSequence( self.getProp("MoniSequence") ) + self.appendToMoniSequence(self.getProp("MoniSequence")) ## Specific action for DataType='Upgrade' - def _upgradeAction ( self ) : + def _upgradeAction(self): """ Define specific action for DataType='Upgrade' """ - if self.getProp('DataType').upper() == 'UPGRADE' : + if self.getProp('DataType').upper() == 'UPGRADE': from Configurables import CondDB _db = CondDB() - if _db.isPropertySet('Upgrade') : - if not _db.getProp('Upgrade') : - log.warning('Inconsistent configuration: CondDB ( Upgrade = False ) is set explicitely') - else : - log.info ('Define CondDB( Upgrade = True ) ') + if _db.isPropertySet('Upgrade'): + if not _db.getProp('Upgrade'): + log.warning( + 'Inconsistent configuration: CondDB ( Upgrade = False ) is set explicitely' + ) + else: + log.info('Define CondDB( Upgrade = True ) ') _db.Upgrade = True - if not self.isPropertySet('Detectors') or not self.getProp('Detectors') : + if not self.isPropertySet('Detectors') or not self.getProp( + 'Detectors'): upgrade_only_dets = self.__known_upgrade_detectors__ - log.warning("It is suspicious that the list of ``Detectors'' is not specified though ``DataType=Upgrade'' ...") - log.warning("Sure that none of the upgrade-only detectors %s are to be specified via ``Detectors''?" % upgrade_only_dets ) + log.warning( + "It is suspicious that the list of ``Detectors'' is not specified though ``DataType=Upgrade'' ..." + ) + log.warning( + "Sure that none of the upgrade-only detectors %s are to be specified via ``Detectors''?" + % upgrade_only_dets) from Configurables import SimConf self.setOtherProps(SimConf(), ["Detectors"]) ################################################################################ # Append to Moni sequence # + def appendToMoniSequence(self, algs): """ Append to moni sequence. Can be called from other configurables """ log.info("Append to Moni Sequence has been called") for alg in algs: - self.moniSeq.Members += [ alg ] - - def sequence(self) : - return GaudiSequencer('DaVinciEventSeq', - IgnoreFilterPassed = True) + self.moniSeq.Members += [alg] + def sequence(self): + return GaudiSequencer('DaVinciEventSeq', IgnoreFilterPassed=True) - def _setAncestorDepth(self) : + def _setAncestorDepth(self): """ Calculate depth of ancestry for input files and set IODataManager().AgeLimit accordingly. Set to 1 for InputType = 'RDST' or 'SDST' and 0 for others. """ - if not IODataManager().isPropertySet('AgeLimit') : - depthMap = { 'RDST' : 1, - 'SDST' : 1 } + if not IODataManager().isPropertySet('AgeLimit'): + depthMap = {'RDST': 1, 'SDST': 1} inputType = self.getProp('InputType').upper() IODataManager().setProp('AgeLimit', depthMap.get(inputType, 0)) @@ -888,12 +1020,13 @@ class DaVinci(LHCbConfigurableUser) : ################################################################################ # Apply configuration # + def __apply_configuration__(self): """ DaVinci configuration """ log.info("Applying DaVinci configuration") - log.info( self ) + log.info(self) self._checkOptions() @@ -901,9 +1034,10 @@ class DaVinci(LHCbConfigurableUser) : ApplicationMgr().TopAlg = [self.sequence()] self._configureSubPackages() - importOptions("$STDOPTS/PreloadUnits.opts") # to get units in .opts files + importOptions( + "$STDOPTS/PreloadUnits.opts") # to get units in .opts files inputType = self._configureInput() - self.sequence().Members = [ self._dvInit() ] + self.sequence().Members = [self._dvInit()] self.sequence().Members += [self._filteredEventSeq()] # _lumi handles event count, lumi integration and merging independently @@ -916,7 +1050,7 @@ class DaVinci(LHCbConfigurableUser) : from Configurables import LoKiSvc LoKiSvc().Welcome = verbosePrint DataOnDemandSvc().Dump = verbosePrint - if not verbosePrint : + if not verbosePrint: msgSvc = getConfigurable("MessageSvc") msgSvc.setWarning += ['RFileCnv'] @@ -931,14 +1065,14 @@ class DaVinci(LHCbConfigurableUser) : log.info("Applying Analysis configuration") log.info(self) if (self.getProp("Simulation")): - self.configureMC() + self.configureMC() self._upgradeAction() self.tagging() self.standardParticles() # Add main sequence to TopAlg - self._mainSequence () + self._mainSequence() # monitoring - self._moniSequence () + self._moniSequence() - self._root_in_Tes () + self._root_in_Tes() diff --git a/Phys/DaVinci/python/DaVinci/__init__.py b/Phys/DaVinci/python/DaVinci/__init__.py index e3bd7f802c1b98bdc8fa5dea01c60befd4dedf36..59c447726c1e5ff7d6acc0b64c236bb8173b1f1b 100644 --- a/Phys/DaVinci/python/DaVinci/__init__.py +++ b/Phys/DaVinci/python/DaVinci/__init__.py @@ -14,4 +14,5 @@ from __future__ import absolute_import from .ConfigurationUpgrade import data, mc, main from .config import options, run_davinci, dv_node, DVSelection -__all__ = ('data', 'mc', 'main') +__all__ = ('data', 'mc', 'main', 'options', 'run_davinci', 'dv_node', + 'DVSelection') diff --git a/Phys/DaVinci/python/DaVinci/algorithms.py b/Phys/DaVinci/python/DaVinci/algorithms.py index 180056e658eb8e987e8255bdfaaf0548fd161a26..c31fb651706c74283de4b0a91aadd70db1d92878 100644 --- a/Phys/DaVinci/python/DaVinci/algorithms.py +++ b/Phys/DaVinci/python/DaVinci/algorithms.py @@ -66,7 +66,7 @@ def define_monitors(config, slots): evtSel = C.EventSelector() configure_event_selector(slots, evtSel) - evtTime = C.EventClockSvc(EventTimeDecoder="OdinTimeDecoder") + #evtTime = C.EventClockSvc(EventTimeDecoder="OdinTimeDecoder") config.extend([auditor, timer, sequencer, evtSel]) #, evtTime]) diff --git a/Phys/DaVinci/python/DaVinci/config.py b/Phys/DaVinci/python/DaVinci/config.py index 2c41b18a01077153c81778d14464325329ba08b3..feae065bcbdbad765eaaffee867b2b2bf8583c26 100644 --- a/Phys/DaVinci/python/DaVinci/config.py +++ b/Phys/DaVinci/python/DaVinci/config.py @@ -14,9 +14,8 @@ from __future__ import absolute_import import logging from collections import namedtuple -from PyConf import configurable -from PyConf.Algorithms import DeterministicPrescaler -from PyConf.application import configure_input, configure, make_odin +from PyConf.application import configure_input, configure +from PyConf.components import Algorithm from PyConf.control_flow import CompositeNode, NodeLogic from DaVinci.application import DVAppOptions diff --git a/Phys/DaVinci/python/DaVinci/configurations.py b/Phys/DaVinci/python/DaVinci/configurations.py index a1b3572b740e02497403074d9e307f54e9f05bec..43aed758699d638e2e2bfdd84bfb6e7eb5d1b132 100644 --- a/Phys/DaVinci/python/DaVinci/configurations.py +++ b/Phys/DaVinci/python/DaVinci/configurations.py @@ -143,8 +143,6 @@ def configure_MC_algorithms(slots, dataSvc): """ Configure DaVinciAssociators and do MC unpacking. """ - from CaloKernel.ConfUtils import getAlgo - root = "" if get_slot_value(slots, "InputType") == "MDST" and get_slot_value( slots, "RootInTES"): @@ -165,10 +163,10 @@ def configure_MC_unpacking(slots, dataSvc, root): mcRoot = os.path.join(root, "MC") log.info("Will unpack MC objects to {0}".format(mcRoot)) - particlesOutput = os.path.join(mcRoot, "Particles") - verticesOutput = os.path.join(mcRoot, "Vertices") + #particlesOutput = os.path.join(mcRoot, "Particles") + #verticesOutput = os.path.join(mcRoot, "Vertices") - samba = C.UnpackMCParticle("UnpackMCParticle", RootInTES=root) + #samba = C.UnpackMCParticle("UnpackMCParticle", RootInTES=root) dataSvc.NodeMap[mcRoot] = "DataObject" #dataSvc.AlgMap[particlesOutput] = C.UnpackMCParticle("UnpackMCParticle", RootInTES=root) #dataSvc.AlgMap[verticesOutput] = C.UnpackMCVertex("UnpackMCVertex", RootInTES=root) diff --git a/Phys/DaVinci/python/DaVinci/optionChecker.py b/Phys/DaVinci/python/DaVinci/optionChecker.py index 89dbb4f18efcbbc488e357dbd886b620c7d1f6ca..8aeaa68fc32fbc396acc9ecbcb9ce25d3c43d765 100644 --- a/Phys/DaVinci/python/DaVinci/optionChecker.py +++ b/Phys/DaVinci/python/DaVinci/optionChecker.py @@ -86,7 +86,7 @@ def print_allowed_option_values(allowedValues, name=None): """ Print the allowed values for the DaVinci option configurations. """ - if name == None: + if name is None: print set_color( "green") + "Known job option configurations and allowed values:" for name, values in allowedValues.iteritems(): diff --git a/Phys/DaVinci/python/DaVinci/utilities.py b/Phys/DaVinci/python/DaVinci/utilities.py index a0e4e06c2fd6a7dd5511bfbd7307bf2536259da6..61c9d608c5432d9d84e1c327478da66a6adc90dc 100644 --- a/Phys/DaVinci/python/DaVinci/utilities.py +++ b/Phys/DaVinci/python/DaVinci/utilities.py @@ -9,7 +9,6 @@ # or submit itself to any jurisdiction. # ############################################################################### -from GaudiConfig2 import Configurables as C from DaVinci.configOptions import get_slot_value import os, click diff --git a/Phys/DaVinci/tests/dummy_davinci.py b/Phys/DaVinci/tests/dummy_davinci.py index 1fdb983bd46af5126412c58b02c6e21148cfa180..d60b11b0bc78f8da4e9d5587810e2f274b27f0da 100644 --- a/Phys/DaVinci/tests/dummy_davinci.py +++ b/Phys/DaVinci/tests/dummy_davinci.py @@ -13,7 +13,6 @@ A dummy DaVinci job with no algorithm/node run. """ from __future__ import absolute_import -from DaVinci import DVSelection from DaVinci.config import options, run_davinci # Basic input-like metadata required even though there is no input data diff --git a/Phys/DaVinci/tests/selection.py b/Phys/DaVinci/tests/selection.py index 650ed20d3a19a760e057926844154c7d3c89b5ec..41138569b67ce1a4467f431d06cbbe3b6c1c198f 100644 --- a/Phys/DaVinci/tests/selection.py +++ b/Phys/DaVinci/tests/selection.py @@ -8,15 +8,7 @@ # granted to it by virtue of its status as an Intergovernmental Organization # # or submit itself to any jurisdiction. # ############################################################################### -from PyConf import configurable -from PyConf.Algorithms import GaudiHistoAlgorithm, FunctionalParticleMaker -from DaVinci import options, run_davinci, dv_node, DVSelection -from DaVinci.hacks import patched_hybrid_tool -# -from PyConf.control_flow import NodeLogic -from PyConf.Tools import (LoKi__Hybrid__ProtoParticleFilter as - ProtoParticleFilter, LoKi__Hybrid__TrackSelector as - TrackSelector) +from DaVinci import options, run_davinci, DVSelection # print control flow and data flow graphs options.control_flow_file = 'control_flow.gv' diff --git a/Phys/DaVinci/tests/simple_histos.py b/Phys/DaVinci/tests/simple_histos.py index c23b2564f9daec6018081475217884bfd8bdcd56..c4aabf706b9eb5568d38403817cf444134186a3a 100644 --- a/Phys/DaVinci/tests/simple_histos.py +++ b/Phys/DaVinci/tests/simple_histos.py @@ -8,9 +8,8 @@ # granted to it by virtue of its status as an Intergovernmental Organization # # or submit itself to any jurisdiction. # ############################################################################### -from PyConf import configurable from PyConf.Algorithms import GaudiHistoAlgorithm -from DaVinci import options, run_davinci, dv_node, DVSelection +from DaVinci import options, run_davinci, DVSelection # print control flow and data flow graphs options.control_flow_file = 'control_flow.gv'