ATLAS Offline Software
xAODTrigMissingETCreator.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
2 
3 # Import the package's configurables:
4 from xAODTrigMissingETCnv.xAODTrigMissingETCnvConf import xAODMaker__TrigMissingETCnvAlg
5 
6 
7 def xAODTrigMissingETCreator( sequence = None, stream = None,
8  key = "HLT_TrigEFMissingET" ):
9  """
10  Helper function that schedules all the components that create xAOD
11  TrigMissingET objects out of existing AOD objects.
12 
13  Arguments:
14  sequence: Optional sequence to which the components should be added.
15  If not specified, the main algorithm sequence is used.
16  stream: Optional stream that the objects should be written to.
17  If not specified, the objects are added to StreamAOD.
18  key: Optional StoreGate key for the AOD object that is supposed to be
19  translated.
20  """
21 
22  # Create a logger for the function:
23  from AthenaCommon.Logging import logging
24  logger = logging.getLogger( "xAODTrigMissingETCreator" )
25 
26  # Tell the user what's happening:
27  logger.info( "Creating xAOD::TrigMissingET from TrigDec::TrigMissingET" )
28 
29  # Get the main sequence if necessary:
30  if sequence is None:
31  from AthenaCommon.AlgSequence import AlgSequence
32  sequence = AlgSequence()
33  pass
34 
35  # Access the stream if necessary:
36  if stream is None:
37  from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
38  stream = MSMgr.GetStream( "StreamAOD" )
39  pass
40 
41  # Schedule the converter algorithm:
42  alg = xAODMaker__TrigMissingETCnvAlg()
43  alg.AODKey = key
44  alg.xAODKey = key
45  sequence += alg
46 
47  # Add the created objects to the output:
48  stream.AddItem( "xAOD::TrigMissingETContainer_v1#%s" % key )
49  stream.AddItem( "xAOD::TrigMissingETAuxContainer_v1#%sAux." % key )
50 
51  pass
python.AlgSequence.AlgSequence
AlgSequence
Definition: PhysicsAnalysis/D3PDTools/AnaAlgorithm/python/AlgSequence.py:7
xAODTrigMissingETCreator.xAODTrigMissingETCreator
def xAODTrigMissingETCreator(sequence=None, stream=None, key="HLT_TrigEFMissingET")
Helper function for creating xAOD TrigMissingET objects.
Definition: xAODTrigMissingETCreator.py:7