ATLAS Offline Software
Loading...
Searching...
No Matches
TriggerBitsMakerTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef TRIGOUTPUTHANDLING_TRIGGERBITSMAKERTOOL_H
5#define TRIGOUTPUTHANDLING_TRIGGERBITSMAKERTOOL_H
6
7#include <string>
13
18class TriggerBitsMakerTool : public extends<AthAlgTool, HLTResultMTMakerTool, ITriggerBitsMakerTool> {
19public:
20 TriggerBitsMakerTool(const std::string& type, const std::string& name, const IInterface* parent);
21 virtual ~TriggerBitsMakerTool() override = default;
22
23 virtual StatusCode fill( HLT::HLTResultMT& resultToFill, const EventContext& ctx ) const override;
24
25 virtual StatusCode getBits(boost::dynamic_bitset<uint32_t>& passRaw,
26 boost::dynamic_bitset<uint32_t>& prescaled,
27 const EventContext& ctx) const override;
28
29 virtual StatusCode initialize() override;
30 virtual StatusCode start() override;
31
32private:
33
37 StatusCode setBit(const TrigCompositeUtils::DecisionID chain, boost::dynamic_bitset<uint32_t>& resultToFill) const;
38
42 StatusCode hashConsistencyCheck(const std::string& chain, const size_t hash) const;
43
47 StatusCode preInsertCheck(const std::string& chain, const uint32_t bit) const;
48
50 "Container with final chain decisions" };
51
52 SG::ReadHandleKey<TrigConf::HLTMenu> m_HLTMenuKey{this, "HLTTriggerMenu", "DetectorStore+HLTTriggerMenu", "HLT Menu"};
53
54 Gaudi::Property<std::map<std::string, uint32_t>> m_extraChainToBit { this, "ExtraChainToBit", {},
55 "Special case and testing purposes hard-coded chain-to-bit mappings to use in addition to those from the HLT menu."};
56
57 using ChainToBitMap = std::map< TrigCompositeUtils::DecisionID, uint32_t>;
59
60 uint32_t m_largestBit{0};
61};
62
63#endif // TRIGOUTPUTHANDLING_TRIGGERBITSMAKERTOOL_H
A container class for data required to build online output from HLT.
Definition HLTResultMT.h:38
Property holding a SG store/key/clid from which a ReadHandle is made.
ChainToBitMap m_mapping
Mapping of each chain's hash ID to its chain counter.
TriggerBitsMakerTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode start() override
SG::ReadHandleKey< TrigCompositeUtils::DecisionContainer > m_finalChainDecisions
StatusCode preInsertCheck(const std::string &chain, const uint32_t bit) const
Check that no existing key maps to a given value and that the string is not empty.
std::map< TrigCompositeUtils::DecisionID, uint32_t > ChainToBitMap
virtual StatusCode getBits(boost::dynamic_bitset< uint32_t > &passRaw, boost::dynamic_bitset< uint32_t > &prescaled, const EventContext &ctx) const override
StatusCode setBit(const TrigCompositeUtils::DecisionID chain, boost::dynamic_bitset< uint32_t > &resultToFill) const
Set to 1 the bit correspinding to 'chain' in 'resultToFill'.
virtual StatusCode fill(HLT::HLTResultMT &resultToFill, const EventContext &ctx) const override
SG::ReadHandleKey< TrigConf::HLTMenu > m_HLTMenuKey
Gaudi::Property< std::map< std::string, uint32_t > > m_extraChainToBit
StatusCode hashConsistencyCheck(const std::string &chain, const size_t hash) const
Check that a chain's hash in the menu JSON (via python) agrees with the C++ implementation.
virtual StatusCode initialize() override
uint32_t m_largestBit
Largest chain counter hence largest bit needed to be stored in result bitmap.
virtual ~TriggerBitsMakerTool() override=default
unsigned int DecisionID