00001 from AthenaCommon.SystemOfUnits import *
00002 from AthenaCommon.Constants import *
00003 from AthenaCommon.Logging import logging
00004 import traceback
00005 from RecExConfig.Configured import Configured
00006
00007
00008
00009
00010
00011
00012
00013 class AtlfastFastShowerGetter ( Configured ) :
00014
00015
00016
00017
00018 def configure(self):
00019
00020 try:
00021
00022 from AtlfastAlgs.IAddSequencer import IAddSequencer
00023
00024 except Exception:
00025
00026 mlog = logging.getLogger( 'AtlfastFastShowerGetter::configure:' )
00027 mlog.error("could not import IAddSequencer from AtlfastAlgs.IAddSequencer")
00028
00029 Atlfast = IAddSequencer("Atlfast")
00030 if Atlfast.Members == []:
00031
00032 try:
00033
00034 from AtlfastAlgs.GlobalEventDataGetter import Atlfast__GlobalEventDataGetter
00035 from AtlfastAlgs.TrackGetter import Atlfast__TrackGetter
00036 from AtlfastAlgs.TauGetter import Atlfast__TauGetter
00037 from AtlfastAlgs.TauTaggerGetter import Atlfast__TauTaggerGetter
00038 from AtlfastAlgs.CellFastShowerGetter import Atlfast__CellFastShowerGetter
00039 from AtlfastAlgs.ClusterGetter import Atlfast__ClusterGetter
00040 from AtlfastAlgs.ElectronGetter import Atlfast__ElectronGetter
00041 from AtlfastAlgs.PhotonGetter import Atlfast__PhotonGetter
00042 from AtlfastAlgs.MuonGetter import Atlfast__MuonGetter
00043 from AtlfastAlgs.ElectronKIsolatorGetter import Atlfast__ElectronKIsolatorGetter
00044 from AtlfastAlgs.PhotonKIsolatorGetter import Atlfast__PhotonKIsolatorGetter
00045 from AtlfastAlgs.MuonKIsolatorGetter import Atlfast__MuonKIsolatorGetter
00046 from AtlfastAlgs.JetGetter import Atlfast__JetGetter
00047 from AtlfastAlgs.AtlfastBGetter import Atlfast__AtlfastBGetter
00048 from AtlfastAlgs.EventHeaderGetter import Atlfast__EventHeaderGetter
00049 from AtlfastAlgs.StandardHistogramGetter import Atlfast__StandardHistogramGetter
00050
00051 except Exception:
00052
00053 mlog = logging.getLogger( 'AtlfastFastShowerGetter::configure:' )
00054 mlog.error("could not import an algorithm-getter from AtlfastAlgs")
00055 print traceback.format_exc()
00056 return False
00057
00058
00059 Atlfast += Atlfast__GlobalEventDataGetter().AlgHandle()
00060 Atlfast += Atlfast__TrackGetter().AlgHandle()
00061 Atlfast += Atlfast__TauGetter().AlgHandle()
00062 Atlfast += Atlfast__TauTaggerGetter().AlgHandle()
00063 Atlfast += Atlfast__CellFastShowerGetter().AlgHandle()
00064 Atlfast += Atlfast__ClusterGetter().AlgHandle()
00065 Atlfast += Atlfast__ElectronGetter().AlgHandle()
00066 Atlfast += Atlfast__PhotonGetter().AlgHandle()
00067 Atlfast += Atlfast__MuonGetter().AlgHandle()
00068 Atlfast += Atlfast__ElectronKIsolatorGetter().AlgHandle()
00069 Atlfast += Atlfast__PhotonKIsolatorGetter().AlgHandle()
00070 Atlfast += Atlfast__MuonKIsolatorGetter().AlgHandle()
00071 Atlfast += Atlfast__JetGetter().AlgHandle()
00072 Atlfast += Atlfast__AtlfastBGetter().AlgHandle()
00073 Atlfast += Atlfast__EventHeaderGetter().AlgHandle()
00074 Atlfast += Atlfast__StandardHistogramGetter().AlgHandle()
00075
00076 mlog = logging.getLogger( 'AtlfastNoFastShowerGetter::configure:' )
00077 mlog.info("Atlfast configured with members:")
00078 print Atlfast.Members
00079
00080 from __main__ import topSequence
00081 topSequence += Atlfast
00082
00083 else:
00084 mlog = logging.getLogger( 'AtlfastFastShowerGetter::configure:' )
00085 mlog.info("Atlfast already configured, not doing anything")
00086
00087
00088 self._algHandle_algHandle = Atlfast;
00089 return True
00090
00091
00092
00093 def AlgHandle(self):
00094 return self._algHandle_algHandle