ATLAS Offline Software
Loading...
Searching...
No Matches
TrigPassBits_v1.h
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
5*/
6
7// $Id: TrigPassBits_v1.h 773869 2016-09-19 15:27:05Z krasznaa $
8#ifndef XAODTRIGGER_VERSIONS_TRIGPASSBITS_V1_H
9#define XAODTRIGGER_VERSIONS_TRIGPASSBITS_V1_H
10
11// System include(s):
12extern "C" {
13# include <stdint.h>
14}
15#include <vector>
16#include <memory>
17#include <string>
18
19// EDM include(s):
21#include "AthLinks/DataLink.h"
22
23namespace xAOD {
24
39
40 public:
43
45 static const uint32_t DEFAULT_KEY = 0xffff;
46
49
51 template< class CONT >
52 void reset( const CONT* container, uint32_t containerKey = 0xffff );
53
55 template< class OBJ, class CONT >
56 void markPassing( const OBJ* obj, const CONT* container,
57 bool passed = true );
59 void markPassing( size_t index, bool passed = true );
60
62 template< class OBJ, class CONT >
63 bool isPassing( const OBJ* obj, const CONT* container ) const;
65 template< class OBJ, class CONT >
66 bool isPassing( const OBJ* obj, const CONT* container,
67 uint32_t containerKey ) const;
69 template< class OBJ, class CONT >
70 bool isPassing( const OBJ* obj, const CONT* container,
71 const std::string& containerKey ) const;
73 bool isPassing( size_t index ) const;
74
76 static uint32_t hash( const std::string& key );
77
79
82
84 uint32_t size() const;
86 void setSize( uint32_t value );
87
89 const std::vector< uint32_t >& passBits() const;
91 void setPassBits( const std::vector< uint32_t >& value );
92
97
102
104
105 private:
107 const void* m_container;
108
109 }; // class TrigPassBits_v1
110
112 template< class CONT >
113 std::unique_ptr< TrigPassBits_v1 >
114 makeTrigPassBits( const CONT* container, uint32_t containerKey =
116
118 template< class CONT >
119 std::unique_ptr< TrigPassBits_v1 >
120 makeTrigPassBits( const CONT* container, const std::string& containerKey );
121
122} // namespace xAOD
123
124// Include the template implementation:
125#include "TrigPassBits_v1.icc"
126
127#endif // XAODTRIGGER_VERSIONS_TRIGPASSBITS_V1_H
Base class for elements of a container that can have aux data.
bool passed(DecisionID id, const DecisionIDContainer &)
checks if required decision ID is in the set of IDs in the container
Base class for elements of a container that can have aux data.
Definition AuxElement.h:483
const SG::AuxVectorData * container() const
Return the container holding this element.
uint32_t size() const
The size of the target container.
void reset(const CONT *container, uint32_t containerKey=0xffff)
Function configuring and resetting the object for a new target.
void setContainerKey(uint32_t value)
Set the hashed SG key of the target container.
uint32_t containerKey() const
Hashed SG key of the target container.
void setPassBits(const std::vector< uint32_t > &value)
Set the internal bitmap directly (not recommended)
const std::vector< uint32_t > & passBits() const
The internal bitmap created with the hypo decisions.
static const uint32_t DEFAULT_KEY
Default hashed container key, in case no explicit value was specified.
uint32_t containerClid() const
CLID of the target container.
bool isPassing(const OBJ *obj, const CONT *container, uint32_t containerKey) const
Check if an element of a container is passing/failing.
void setSize(uint32_t value)
Set the size of the target container.
static uint32_t hash(const std::string &key)
Function calculating a "hash" out of a string.
bool isPassing(const OBJ *obj, const CONT *container, const std::string &containerKey) const
Check if an element of a container is passing/failing.
bool isPassing(const OBJ *obj, const CONT *container) const
Check if an element of a container is passing/failing.
void markPassing(const OBJ *obj, const CONT *container, bool passed=true)
Mark one of the elements of the target container as passing/failing.
const void * m_container
Transient pointer to the target container.
TrigPassBits_v1()
Default constructor.
void setContainerClid(uint32_t value)
Set the CLID of the target container.
Definition index.py:1
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
std::unique_ptr< TrigPassBits_v1 > makeTrigPassBits(const CONT *container, uint32_t containerKey=xAOD::TrigPassBits_v1::DEFAULT_KEY)
Helper function creating a new object to describe a target container.
setEventNumber uint32_t