ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigAnalysis
TrigDecisionMaker
src
TrigDecisionMakerMT.h
Go to the documentation of this file.
1
// -*- C++ -*-
2
3
/*
4
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
/**************************************************************************
8
**
9
** File: TrigDecisionMakerMT.h
10
**
11
** Description: - Re-entrant algorithm-derived class to run after the Steering
12
** - Finds the list of defined chains at initialization
13
** - For each event:
14
** * Creates a xAODTriggerDecision object
15
** * Fills it with the outcome of each defined chain
16
** * Output to StoreGate via writehandle written to ESD/AOD
17
**
18
* @author Tim Martin <Tim.Martin@cern.ch> - University of Warwick
19
**
20
** Created: 16 July 2018
21
**
22
**************************************************************************/
23
#ifndef TrigDecisionMaker_TrigDecisionMakerMT_H
24
#define TrigDecisionMaker_TrigDecisionMakerMT_H
25
26
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
27
#include "GaudiKernel/ServiceHandle.h"
28
#include "GaudiKernel/ToolHandle.h"
29
30
#include "
xAODEventInfo/EventInfo.h
"
31
#include "
xAODTrigger/TrigDecision.h
"
32
#include "
xAODTrigger/CTPResult.h
"
33
34
#include "
TrigDecisionMaker/ILvl1ResultAccessTool.h
"
35
#include "
TrigT1Result/RoIBResult.h
"
36
#include "
TrigSteeringEvent/HLTResultMT.h
"
37
#include "
TrigOutputHandling/ITriggerBitsMakerTool.h
"
38
#include "
TrigConfData/L1BunchGroupSet.h
"
39
#include "
TrigConfData/HLTMenu.h
"
40
41
// containers
42
#include <vector>
43
#include <string>
44
45
namespace
LVL1CTP
{
46
class
Lvl1Result
;
47
}
48
49
namespace
TrigDec
{
50
63
class
TrigDecisionMakerMT
:
public
::AthReentrantAlgorithm
64
{
65
66
public
:
67
68
TrigDecisionMakerMT
(
const
std::string &name, ISvcLocator *pSvcLocator);
69
~TrigDecisionMakerMT
();
70
71
// IAlgorithm virtual methods to implement
72
virtual
StatusCode
initialize
()
override
;
73
virtual
StatusCode
execute
(
const
EventContext& context )
const override
;
74
virtual
StatusCode
finalize
()
override
;
75
76
private
:
77
78
StatusCode
getL1Result
(
const
LVL1CTP::Lvl1Result
*& result,
const
EventContext& context)
const
;
79
80
Gaudi::Property<bool>
m_doL1
{
this
,
"doL1"
,
true
,
"Read L1 trigger information"
};
81
Gaudi::Property<bool>
m_doHLT
{
this
,
"doHLT"
,
true
,
"Read HLT trigger information"
};
82
Gaudi::Property<bool>
m_useEDMxAOD
{
this
,
"UseEDMxAOD"
,
false
,
"Flag whether to use xAOD::CTPResult instead of ROIB::RoIBResult for CTP result"
};
83
84
// Tools & services
85
ToolHandle<HLT::ILvl1ResultAccessTool>
m_lvl1Tool
{
this
,
"Lvl1ResultAccessTool"
,
"HLT::Lvl1ResultAccessTool/Lvl1ResultAccessTool"
,
"L1 tool to fetch"
};
86
87
ToolHandle<ITriggerBitsMakerTool>
m_bitsMakerTool
{
this
,
"BitsMakerTool"
,
""
,
"Tool to create trigger bits for MC"
};
88
89
// Input keys configuration
90
SG::ReadCondHandleKey<TrigConf::L1BunchGroupSet>
m_bgKey
{
this
,
"L1BunchGroup"
,
"L1BunchGroup"
,
"L1BunchGroupSet key name"
};
91
SG::ReadHandleKey<TrigConf::HLTMenu>
m_HLTMenuKey
{
this
,
"HLTTriggerMenu"
,
"DetectorStore+HLTTriggerMenu"
,
"HLT Menu key"
};
92
93
SG::ReadHandleKey<HLT::HLTResultMT>
m_hltResultKeyIn
{
this
,
"HLTResultMT"
,
"HLTResultMT"
,
"Key of the HLTResultMT object to get bits from online bytestream"
};
94
SG::ReadHandleKey<ROIB::RoIBResult>
m_ROIBResultKeyIn
{
this
,
"RoIBResult"
,
"RoIBResult"
,
"RoIB Result Object Key"
};
95
SG::ReadHandleKey<xAOD::CTPResult>
m_CTPResultKeyIn
{
this
,
"CTPResult"
,
"CTPResult"
,
"Key to retrieve the L1 xAOD CTP result from SG"
};
96
SG::ReadHandleKey<xAOD::EventInfo>
m_EventInfoKeyIn
{
this
,
"EventInfo"
,
"EventInfo"
,
"Event Info Object Key"
};
97
98
// Output configuration
99
SG::WriteHandleKey<LVL1CTP::Lvl1Result>
m_l1ResultKeyOut
{
this
,
"L1Result"
,
"L1Result"
,
"L1 result"
};
100
SG::WriteHandleKey<xAOD::TrigDecision>
m_trigDecisionKeyOut
{
this
,
"TrigDecisionKey"
,
"xTrigDecision"
,
"Output trigger decision object key"
};
101
102
// For statistics
103
mutable
std::atomic<uint32_t>
m_nEvents
{0},
m_l1Passed
{0},
m_hltPassed
{0};
104
};
105
}
106
107
#endif
AthReentrantAlgorithm.h
CTPResult.h
TrigDecision.h
HLTMenu.h
HLTResultMT.h
ILvl1ResultAccessTool.h
ITriggerBitsMakerTool.h
L1BunchGroupSet.h
RoIBResult.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
LVL1CTP::Lvl1Result
Definition
Lvl1Result.h:30
SG::ReadCondHandleKey
Definition
ReadCondHandleKey.h:21
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition
StoreGate/StoreGate/WriteHandleKey.h:40
TrigDec::TrigDecisionMakerMT::m_useEDMxAOD
Gaudi::Property< bool > m_useEDMxAOD
Definition
TrigDecisionMakerMT.h:82
TrigDec::TrigDecisionMakerMT::m_hltResultKeyIn
SG::ReadHandleKey< HLT::HLTResultMT > m_hltResultKeyIn
Definition
TrigDecisionMakerMT.h:93
TrigDec::TrigDecisionMakerMT::finalize
virtual StatusCode finalize() override
std Gaudi finalize method -> print out statistics
Definition
TrigDecisionMakerMT.cxx:67
TrigDec::TrigDecisionMakerMT::m_lvl1Tool
ToolHandle< HLT::ILvl1ResultAccessTool > m_lvl1Tool
tool to ease the access to the L1 results (RoIs, items, etc)
Definition
TrigDecisionMakerMT.h:85
TrigDec::TrigDecisionMakerMT::m_doL1
Gaudi::Property< bool > m_doL1
Definition
TrigDecisionMakerMT.h:80
TrigDec::TrigDecisionMakerMT::m_CTPResultKeyIn
SG::ReadHandleKey< xAOD::CTPResult > m_CTPResultKeyIn
Definition
TrigDecisionMakerMT.h:95
TrigDec::TrigDecisionMakerMT::execute
virtual StatusCode execute(const EventContext &context) const override
Re-entrant execute to create the xAOD::TrigDecision.
Definition
TrigDecisionMakerMT.cxx:81
TrigDec::TrigDecisionMakerMT::m_l1ResultKeyOut
SG::WriteHandleKey< LVL1CTP::Lvl1Result > m_l1ResultKeyOut
Definition
TrigDecisionMakerMT.h:99
TrigDec::TrigDecisionMakerMT::m_bgKey
SG::ReadCondHandleKey< TrigConf::L1BunchGroupSet > m_bgKey
Definition
TrigDecisionMakerMT.h:90
TrigDec::TrigDecisionMakerMT::getL1Result
StatusCode getL1Result(const LVL1CTP::Lvl1Result *&result, const EventContext &context) const
retrieve LVL1 result (called in execute)
Definition
TrigDecisionMakerMT.cxx:231
TrigDec::TrigDecisionMakerMT::m_nEvents
std::atomic< uint32_t > m_nEvents
Definition
TrigDecisionMakerMT.h:103
TrigDec::TrigDecisionMakerMT::m_hltPassed
std::atomic< uint32_t > m_hltPassed
Definition
TrigDecisionMakerMT.h:103
TrigDec::TrigDecisionMakerMT::m_doHLT
Gaudi::Property< bool > m_doHLT
Definition
TrigDecisionMakerMT.h:81
TrigDec::TrigDecisionMakerMT::m_l1Passed
std::atomic< uint32_t > m_l1Passed
Definition
TrigDecisionMakerMT.h:103
TrigDec::TrigDecisionMakerMT::initialize
virtual StatusCode initialize() override
std Gaudi initialize method -> read-in trigger configuration
Definition
TrigDecisionMakerMT.cxx:35
TrigDec::TrigDecisionMakerMT::m_ROIBResultKeyIn
SG::ReadHandleKey< ROIB::RoIBResult > m_ROIBResultKeyIn
Definition
TrigDecisionMakerMT.h:94
TrigDec::TrigDecisionMakerMT::m_EventInfoKeyIn
SG::ReadHandleKey< xAOD::EventInfo > m_EventInfoKeyIn
Definition
TrigDecisionMakerMT.h:96
TrigDec::TrigDecisionMakerMT::TrigDecisionMakerMT
TrigDecisionMakerMT(const std::string &name, ISvcLocator *pSvcLocator)
std Gaudi Algorithm constructor
Definition
TrigDecisionMakerMT.cxx:28
TrigDec::TrigDecisionMakerMT::m_HLTMenuKey
SG::ReadHandleKey< TrigConf::HLTMenu > m_HLTMenuKey
Definition
TrigDecisionMakerMT.h:91
TrigDec::TrigDecisionMakerMT::m_trigDecisionKeyOut
SG::WriteHandleKey< xAOD::TrigDecision > m_trigDecisionKeyOut
Definition
TrigDecisionMakerMT.h:100
TrigDec::TrigDecisionMakerMT::~TrigDecisionMakerMT
~TrigDecisionMakerMT()
std deconstructor
Definition
TrigDecisionMakerMT.cxx:32
TrigDec::TrigDecisionMakerMT::m_bitsMakerTool
ToolHandle< ITriggerBitsMakerTool > m_bitsMakerTool
Definition
TrigDecisionMakerMT.h:87
LVL1CTP
Definition
Lvl1ResultAccessTool.h:20
TrigDec
Definition
ITrigDecisionCnvTool.h:18
EventInfo.h
Generated on
for ATLAS Offline Software by
1.17.0