|
ATLAS Offline Software
|
Go to the documentation of this file.
8 #ifndef TRIGOBJECTMATCHING_TRIGMATCHTOOLCORE_H
9 #define TRIGOBJECTMATCHING_TRIGMATCHTOOLCORE_H
11 #define TRIG_OBJECT_MATCHING_VERSION_1
15 #include <unordered_map>
31 class FeatureContainer;
61 template<
typename trigType >
62 std::vector< const trigType* >
64 bool onlyPassedFeatures )
const;
75 template<
typename trigType,
typename baseType >
76 std::vector< const trigType* >
80 bool onlyPassedFeatures,
85 template<
typename trigType,
typename baseType >
86 std::vector< const trigType* >
89 float maxDistance = 0.1,
90 bool onlyPassedFeatures =
false )
const;
97 template<
typename trigType,
typename baseType >
102 bool onlyPassedFeatures,
107 template<
typename trigType,
typename baseType >
111 float maxDistance = 0.1,
112 bool onlyPassedFeatures =
false )
const;
117 template<
typename trigType,
typename baseType >
123 this->
warning(
"You have called matchToTriggerObject incorrectly.");
124 this->
warning(
"Note that the correct use is: object to match to, "
125 "chainName, maxDistance, onlyPassedFeatures");
126 this->
warning(
"Your current call is of the form: object to match "
127 "to, chainName, onlyPassedFeatures");
140 template<
typename trigType,
typename baseType >
141 std::vector< const trigType* >
146 bool onlyPassedFeatures,
151 template<
typename trigType,
typename baseType >
152 std::vector< const trigType* >
155 float maxDistance = 0.1,
156 bool onlyBestMatch =
true,
157 bool onlyPassedFeatures =
false )
const;
160 template<
typename trigType,
typename baseType >
161 std::vector< const trigType* >
166 bool onlyPassedFeatures,
169 template<
typename trigType,
typename baseType >
170 std::vector< const trigType* >
173 float maxDistance = 0.1,
174 bool onlyBestMatch =
true,
175 bool onlyPassedFeatures =
false )
const;
185 template<
typename trigType,
typename baseType >
186 std::vector< const trigType* >
191 bool onlyPassedFeatures,
196 template<
typename trigType,
typename baseType >
197 std::vector< const trigType* >
200 float maxDistance = 0.1,
201 bool onlyBestMatch =
true,
202 bool onlyPassedFeatures =
false )
const;
205 template<
typename trigType,
typename baseType >
206 std::vector< const trigType* >
211 bool onlyPassedFeatures,
214 template<
typename trigType,
typename baseType >
215 std::vector< const trigType* >
218 float maxDistance = 0.1,
219 bool onlyBestMatch =
true,
220 bool onlyPassedFeatures =
false )
const;
236 template<
typename trigType,
typename baseType >
245 template<
typename trigType,
typename baseType >
249 float maxDistance = 0.1 )
const;
261 template<
typename trigType,
typename baseType >
262 std::vector< std::string >
269 template<
typename trigType,
typename baseType >
270 std::vector< std::string >
272 float maxDistance = 0.1 )
const;
286 template<
typename trigType,
typename baseType >
287 std::vector< const baseType* >
290 bool onlyPassedFeatures,
296 template<
typename trigType,
typename baseType >
297 std::vector< const baseType* >
300 bool onlyPassedFeatures =
false,
301 float maxDistance = 0.1 )
const;
308 template<
typename trigType,
typename baseType >
309 std::map< const trigType*, std::vector< std::string > >
312 bool onlyPassedFeatures,
317 template<
typename trigType,
typename baseType >
318 std::map< const trigType*, std::vector< std::string > >
320 float maxDistance = 0.1,
321 bool onlyPassedFeatures =
false )
const;
344 std::unique_lock<SlotCache::mutex_t> lock (slotCache.
m_mutex);
361 std::unique_lock<std::recursive_mutex>&& lock)
364 m_lock( std::move (lock) )
382 std::unique_lock<std::recursive_mutex>
m_lock;
444 virtual void warning(
const std::string&
w )
const = 0;
466 template<
typename trait >
483 template<
typename trigType >
486 bool onlyPassedFeatures )
const;
488 template<
typename trigType >
491 bool onlyPassedFeatures )
const;
495 template<
typename trigType >
497 std::vector< const trigType* >&
objects,
499 bool onlyPassedFeatures,
504 template<
typename trigType,
typename contType >
506 std::vector< const trigType* >&
objects,
508 bool onlyPassedFeatures,
509 const contType* )
const;
512 template<
typename trigType>
514 std::vector< const trigType* >&
objects,
516 bool onlyPassedFeatures,
524 template<
typename trigType >
525 std::vector< const trigType* >
527 bool onlyPassedFeatures )
const;
534 template<
typename trigType,
typename baseType >
535 std::vector< const trigType* >
539 bool onlyPassedFeatures,
542 template<
typename trigType,
typename baseType >
556 template<
typename trigType>
566 for (
int i = 0;
i < 2;
i++) {
571 bool get (
size_t chainIndex,
572 bool onlyPassedFeatures,
573 std::vector< const trigType* >&
objects)
576 if (chainIndex <
v.size() &&
v[chainIndex].valid) {
584 void add(
size_t chainIndex,
585 bool onlyPassedFeatures,
586 const std::vector< const trigType* >&
data)
589 if (chainIndex >=
v.size()) {
590 size_t&
sz =
m_size[onlyPassedFeatures];
591 if (chainIndex >=
sz)
595 v[chainIndex].valid =
true;
596 v[chainIndex].data =
data;
602 std::vector<const trigType*>
data;
607 std::vector<const trigType*>().swap (
data);
622 int key (
const std::type_info* tid);
628 typedef std::unordered_map<const std::type_info*, int>
typeMap_t;
644 for (
const cacheMap_t::value_type&
p :
m_cacheMap) {
654 for (
const cacheMap_t::value_type&
p :
m_cacheMap) {
682 typedef std::unordered_map<std::string, cacheVec_t>
cacheMap_t;
695 template <
typename trigType>
714 #endif // TRIGOBJECTMATCHING_TRIGMATCHTOOLCORE_H
char data[hepevt_bytes_allocation_ATLAS]
The common trigger namespace for trigger analysis tools.
ObjectMatching is a base class that performs generic matching of objects using the distance functor f...
Maintain a set of objects, one per slot.
Maintain a set of objects, one per slot.
Define macros for attributes used to control the static checker.