ATLAS Offline Software
Loading...
Searching...
No Matches
TrigConf::KeyWriterTool Class Reference

#include <KeyWriterTool.h>

Inheritance diagram for TrigConf::KeyWriterTool:
Collaboration diagram for TrigConf::KeyWriterTool:

Public Member Functions

 KeyWriterTool ()=delete
 KeyWriterTool (const std::string &type, const std::string &name, const IInterface *parent)
virtual ~KeyWriterTool () override=default
virtual StatusCode initialize () final
virtual StatusCode writeKeys (const EventContext &ctx, uint32_t &smk, uint32_t &l1psk, uint32_t &hltpsk) const final
virtual StatusCode writeKeys (const EventContext &ctx) const final
virtual StatusCode writeBunchgroupKey (const EventContext &ctx, uint32_t &bgk) const final
virtual StatusCode writeBunchgroupKey (const EventContext &ctx) const final

Private Attributes

SG::ReadCondHandleKey< TrigConf::L1PrescalesSetm_l1PrescaleSetInputKey { this, "L1Prescales", "L1Prescales", "L1 prescales set condition handle key"}
SG::ReadCondHandleKey< TrigConf::HLTPrescalesSetm_hltPrescaleSetInputKey { this, "HLTPrescales", "HLTPrescales", "HLT prescales set condition handle key"}
SG::ReadCondHandleKey< TrigConf::L1BunchGroupSetm_bgInputKey {this, "L1BunchGroup", "L1BunchGroup", "L1BunchGroupSet condition handle key"}
SG::ReadHandleKey< TrigConf::HLTMenum_hltMenuInputKey {this, "HLTMenu", "DetectorStore+HLTTriggerMenu", "HLT Menu key"}
Gaudi::Property< bool > m_includeL1PrescaleKey {this, "IncludeL1PrescaleKey", true, "Set this to false when running this tool online."}
Gaudi::Property< bool > m_includeBunchgroupKey {this, "IncludeBunchgroupKey", true, "Set this to false when running this tool online."}
SG::WriteHandleKey< xAOD::TrigConfKeysm_writeKeys {this, "ConfKeys", "TrigConfKeys", "SG Key of key triplet object."}
SG::WriteHandleKey< xAOD::BunchConfKeym_writeBgKey {this, "BunchConfKey", "BunchConfKey", "SG Key of bunchgroup key object."}

Detailed Description

Definition at line 31 of file KeyWriterTool.h.

Constructor & Destructor Documentation

◆ KeyWriterTool() [1/2]

TrigConf::KeyWriterTool::KeyWriterTool ( )
delete

◆ KeyWriterTool() [2/2]

TrigConf::KeyWriterTool::KeyWriterTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 10 of file KeyWriterTool.cxx.

12 :
13 base_class(type, name, parent)
14 {}

◆ ~KeyWriterTool()

virtual TrigConf::KeyWriterTool::~KeyWriterTool ( )
overridevirtualdefault

Member Function Documentation

◆ initialize()

StatusCode TrigConf::KeyWriterTool::initialize ( )
finalvirtual

Definition at line 16 of file KeyWriterTool.cxx.

16 {
18 ATH_CHECK( m_hltPrescaleSetInputKey.initialize() );
20 ATH_CHECK( m_hltMenuInputKey.initialize() );
21 renounce(m_hltMenuInputKey); // This is DetStore
22
23 if (not m_includeBunchgroupKey) {
24 m_writeBgKey = "";
25 }
26
27 ATH_CHECK( m_writeKeys.initialize( SG::AllowEmpty ) );
28 ATH_CHECK( m_writeBgKey.initialize( SG::AllowEmpty ) );
29
30 return StatusCode::SUCCESS;
31 }
#define ATH_CHECK
Evaluate an expression and check for errors.
SG::ReadCondHandleKey< TrigConf::L1BunchGroupSet > m_bgInputKey
SG::WriteHandleKey< xAOD::BunchConfKey > m_writeBgKey
SG::ReadCondHandleKey< TrigConf::HLTPrescalesSet > m_hltPrescaleSetInputKey
Gaudi::Property< bool > m_includeL1PrescaleKey
SG::WriteHandleKey< xAOD::TrigConfKeys > m_writeKeys
SG::ReadCondHandleKey< TrigConf::L1PrescalesSet > m_l1PrescaleSetInputKey
SG::ReadHandleKey< TrigConf::HLTMenu > m_hltMenuInputKey
Gaudi::Property< bool > m_includeBunchgroupKey

◆ writeBunchgroupKey() [1/2]

StatusCode TrigConf::KeyWriterTool::writeBunchgroupKey ( const EventContext & ctx) const
finalvirtual

Definition at line 89 of file KeyWriterTool.cxx.

89 {
90 uint32_t a; // Unused
91 return writeBunchgroupKey(ctx, a);
92 }
static Double_t a
virtual StatusCode writeBunchgroupKey(const EventContext &ctx, uint32_t &bgk) const final
setEventNumber uint32_t

◆ writeBunchgroupKey() [2/2]

StatusCode TrigConf::KeyWriterTool::writeBunchgroupKey ( const EventContext & ctx,
uint32_t & bgk ) const
finalvirtual

Definition at line 69 of file KeyWriterTool.cxx.

69 {
70
72 return StatusCode::SUCCESS; // Nothing to do
73 }
74
75 SG::ReadCondHandle<TrigConf::L1BunchGroupSet> bgRH(m_bgInputKey, ctx);
76 ATH_CHECK( bgRH.isValid() );
77 const TrigConf::L1BunchGroupSet* l1BunchGroupSet{*bgRH};
78 bgk = l1BunchGroupSet->bgsk();
79
80 if (!m_writeBgKey.empty()) {
81 SG::WriteHandle<xAOD::BunchConfKey> writeBgKey(m_writeBgKey, ctx);
82 ATH_CHECK( writeBgKey.record( std::make_unique<xAOD::BunchConfKey>(bgk) ) );
83 }
84
85 return StatusCode::SUCCESS;
86 }
unsigned int bgsk() const
setter and getter for the bunch group key

◆ writeKeys() [1/2]

StatusCode TrigConf::KeyWriterTool::writeKeys ( const EventContext & ctx) const
finalvirtual

Definition at line 34 of file KeyWriterTool.cxx.

34 {
35 uint32_t a, b, c; // Unused
36 return writeKeys(ctx, a, b, c);
37 }
virtual StatusCode writeKeys(const EventContext &ctx, uint32_t &smk, uint32_t &l1psk, uint32_t &hltpsk) const final

◆ writeKeys() [2/2]

StatusCode TrigConf::KeyWriterTool::writeKeys ( const EventContext & ctx,
uint32_t & smk,
uint32_t & l1psk,
uint32_t & hltpsk ) const
finalvirtual

Definition at line 40 of file KeyWriterTool.cxx.

40 {
41
43 SG::ReadCondHandle<TrigConf::L1PrescalesSet> l1psRH(m_l1PrescaleSetInputKey, ctx);
44 ATH_CHECK( l1psRH.isValid() );
45 const TrigConf::L1PrescalesSet* l1PrescaleSet{*l1psRH};
46 l1psk = l1PrescaleSet->psk();
47 } else {
48 l1psk = 0;
49 }
50
51 SG::ReadCondHandle<TrigConf::HLTPrescalesSet> hltpsRH(m_hltPrescaleSetInputKey, ctx);
52 ATH_CHECK( hltpsRH.isValid() );
53 const TrigConf::HLTPrescalesSet* hltPrescaleSet{*hltpsRH};
54 hltpsk = hltPrescaleSet->psk();
55
56 SG::ReadHandle<TrigConf::HLTMenu> hltRH(m_hltMenuInputKey, ctx);
57 ATH_CHECK( hltRH.isValid() );
58 smk = hltRH->smk();
59
60 if (!m_writeKeys.empty()) {
61 SG::WriteHandle<xAOD::TrigConfKeys> writeKeys(m_writeKeys, ctx);
62 ATH_CHECK( writeKeys.record( std::make_unique<xAOD::TrigConfKeys>(smk, l1psk, hltpsk) ) );
63 }
64
65 return StatusCode::SUCCESS;
66 }
unsigned int psk() const
setter and getter for the HLT prescale key
unsigned int psk() const
setter and getter for the L1 prescale key

Member Data Documentation

◆ m_bgInputKey

SG::ReadCondHandleKey<TrigConf::L1BunchGroupSet> TrigConf::KeyWriterTool::m_bgInputKey {this, "L1BunchGroup", "L1BunchGroup", "L1BunchGroupSet condition handle key"}
private

Definition at line 54 of file KeyWriterTool.h.

54{this, "L1BunchGroup", "L1BunchGroup", "L1BunchGroupSet condition handle key"};

◆ m_hltMenuInputKey

SG::ReadHandleKey<TrigConf::HLTMenu> TrigConf::KeyWriterTool::m_hltMenuInputKey {this, "HLTMenu", "DetectorStore+HLTTriggerMenu", "HLT Menu key"}
private

Definition at line 55 of file KeyWriterTool.h.

55{this, "HLTMenu", "DetectorStore+HLTTriggerMenu", "HLT Menu key"};

◆ m_hltPrescaleSetInputKey

SG::ReadCondHandleKey<TrigConf::HLTPrescalesSet> TrigConf::KeyWriterTool::m_hltPrescaleSetInputKey { this, "HLTPrescales", "HLTPrescales", "HLT prescales set condition handle key"}
private

Definition at line 53 of file KeyWriterTool.h.

53{ this, "HLTPrescales", "HLTPrescales", "HLT prescales set condition handle key"};

◆ m_includeBunchgroupKey

Gaudi::Property<bool> TrigConf::KeyWriterTool::m_includeBunchgroupKey {this, "IncludeBunchgroupKey", true, "Set this to false when running this tool online."}
private

Definition at line 58 of file KeyWriterTool.h.

58{this, "IncludeBunchgroupKey", true, "Set this to false when running this tool online."};

◆ m_includeL1PrescaleKey

Gaudi::Property<bool> TrigConf::KeyWriterTool::m_includeL1PrescaleKey {this, "IncludeL1PrescaleKey", true, "Set this to false when running this tool online."}
private

Definition at line 57 of file KeyWriterTool.h.

57{this, "IncludeL1PrescaleKey", true, "Set this to false when running this tool online."};

◆ m_l1PrescaleSetInputKey

SG::ReadCondHandleKey<TrigConf::L1PrescalesSet> TrigConf::KeyWriterTool::m_l1PrescaleSetInputKey { this, "L1Prescales", "L1Prescales", "L1 prescales set condition handle key"}
private

Definition at line 52 of file KeyWriterTool.h.

52{ this, "L1Prescales", "L1Prescales", "L1 prescales set condition handle key"};

◆ m_writeBgKey

SG::WriteHandleKey<xAOD::BunchConfKey> TrigConf::KeyWriterTool::m_writeBgKey {this, "BunchConfKey", "BunchConfKey", "SG Key of bunchgroup key object."}
private

Definition at line 61 of file KeyWriterTool.h.

61{this, "BunchConfKey", "BunchConfKey", "SG Key of bunchgroup key object."};

◆ m_writeKeys

SG::WriteHandleKey<xAOD::TrigConfKeys> TrigConf::KeyWriterTool::m_writeKeys {this, "ConfKeys", "TrigConfKeys", "SG Key of key triplet object."}
private

Definition at line 60 of file KeyWriterTool.h.

60{this, "ConfKeys", "TrigConfKeys", "SG Key of key triplet object."};

The documentation for this class was generated from the following files: