ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
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  {
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  }

◆ 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  }

◆ 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 
76  ATH_CHECK( bgRH.isValid() );
77  const TrigConf::L1BunchGroupSet* l1BunchGroupSet{*bgRH};
78  bgk = l1BunchGroupSet->bgsk();
79 
80  if (!m_writeBgKey.empty()) {
82  ATH_CHECK( writeBgKey.record( std::make_unique<xAOD::BunchConfKey>(bgk) ) );
83  }
84 
85  return StatusCode::SUCCESS;
86  }

◆ 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  }

◆ 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 
44  ATH_CHECK( l1psRH.isValid() );
45  const TrigConf::L1PrescalesSet* l1PrescaleSet{*l1psRH};
46  l1psk = l1PrescaleSet->psk();
47  } else {
48  l1psk = 0;
49  }
50 
52  ATH_CHECK( hltpsRH.isValid() );
53  const TrigConf::HLTPrescalesSet* hltPrescaleSet{*hltpsRH};
54  hltpsk = hltPrescaleSet->psk();
55 
57  ATH_CHECK( hltRH.isValid() );
58  smk = hltRH->smk();
59 
60  if (!m_writeKeys.empty()) {
62  ATH_CHECK( writeKeys.record( std::make_unique<xAOD::TrigConfKeys>(smk, l1psk, hltpsk) ) );
63  }
64 
65  return StatusCode::SUCCESS;
66  }

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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.


The documentation for this class was generated from the following files:
TrigConf::KeyWriterTool::m_hltMenuInputKey
SG::ReadHandleKey< TrigConf::HLTMenu > m_hltMenuInputKey
Definition: KeyWriterTool.h:55
TrigConf::KeyWriterTool::m_writeBgKey
SG::WriteHandleKey< xAOD::BunchConfKey > m_writeBgKey
Definition: KeyWriterTool.h:61
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
RunEBWeightsComputation.smk
smk
Definition: RunEBWeightsComputation.py:87
TrigConf::KeyWriterTool::m_l1PrescaleSetInputKey
SG::ReadCondHandleKey< TrigConf::L1PrescalesSet > m_l1PrescaleSetInputKey
Definition: KeyWriterTool.h:52
TrigConf::KeyWriterTool::writeBunchgroupKey
virtual StatusCode writeBunchgroupKey(const EventContext &ctx, uint32_t &bgk) const final
Definition: KeyWriterTool.cxx:69
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TrigConf::KeyWriterTool::m_includeL1PrescaleKey
Gaudi::Property< bool > m_includeL1PrescaleKey
Definition: KeyWriterTool.h:57
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
TrigConf::L1BunchGroupSet
L1 board configuration.
Definition: L1BunchGroupSet.h:71
TrigConf::KeyWriterTool::m_bgInputKey
SG::ReadCondHandleKey< TrigConf::L1BunchGroupSet > m_bgInputKey
Definition: KeyWriterTool.h:54
TrigConf::L1PrescalesSet
L1 menu configuration.
Definition: L1PrescalesSet.h:19
TrigConf::KeyWriterTool::m_writeKeys
SG::WriteHandleKey< xAOD::TrigConfKeys > m_writeKeys
Definition: KeyWriterTool.h:60
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
TrigConf::KeyWriterTool::m_hltPrescaleSetInputKey
SG::ReadCondHandleKey< TrigConf::HLTPrescalesSet > m_hltPrescaleSetInputKey
Definition: KeyWriterTool.h:53
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
a
TList * a
Definition: liststreamerinfos.cxx:10
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
xAOD::l1psk
l1psk
Definition: TriggerMenu_v1.cxx:29
TrigConf::L1BunchGroupSet::bgsk
unsigned int bgsk() const
setter and getter for the bunch group key
Definition: L1BunchGroupSet.h:95
TrigConf::HLTPrescalesSet::psk
unsigned int psk() const
setter and getter for the HLT prescale key
Definition: HLTPrescalesSet.cxx:75
TrigConf::HLTPrescalesSet
HLT menu configuration.
Definition: HLTPrescalesSet.h:19
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
TrigConf::KeyWriterTool::m_includeBunchgroupKey
Gaudi::Property< bool > m_includeBunchgroupKey
Definition: KeyWriterTool.h:58
python.compressB64.c
def c
Definition: compressB64.py:93
TrigConf::KeyWriterTool::writeKeys
virtual StatusCode writeKeys(const EventContext &ctx, uint32_t &smk, uint32_t &l1psk, uint32_t &hltpsk) const final
Definition: KeyWriterTool.cxx:40