|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
    5 #ifndef XAOD_ANALYSIS // Full Athena only 
    8 #ifndef TRIGGER_DECISION_TOOL_FeatureCollectAthena_H 
    9 #define TRIGGER_DECISION_TOOL_FeatureCollectAthena_H 
   25 #include <type_traits> 
   69   namespace FeatureAccessImpl {
 
   82       struct false_type { 
char dummy[2]; };
 
   88       static const bool value=
sizeof(trait_test_helper<T>(0))==
sizeof(
true_type); 
 
  112         for(
const typename T::base_value_type *
obj : *
source) {
 
  114             destination->push_back(
obj);
 
  116         return destination->asDataVector();
 
  136     template<
class T, 
class STORED,
class LINK>
 
  141     const T* possibly_reduced_possibly_container = use_or_construct<T>(
source, te, 
label, 
condition, navigation);
 
  142     destination.push_back(
Trig::Feature<T>(possibly_reduced_possibly_container, te, 
label, possibly_reduced_possibly_container != 
source,lnk)); 
 
  148     template<
class T, 
class CONT, 
class LINK>
 
  173       typedef const typename LINK::value_type* ptr_type;
 
  174       static ptr_type get_ptr(
const LINK& link){
return link.cptr();}
 
  175       static void do_it(
const LINK& link, 
bool ){
 
  177     for(
unsigned int j=0;j<link.cptr()->
size();++j){
 
  184     template<
class LINK> 
struct print_features<LINK,false>{
 
  186       static ptr_type get_ptr(
const LINK& link){
return *link;}
 
  187       static void do_it(
const LINK& ,
bool ){
 
  195     template <
bool retrieve> 
struct get_type;
 
  196     template <> 
struct get_type<true>{
typedef true_type 
type;};
 
  197     template <> 
struct get_type<false>{
typedef false_type 
type;};
 
  199     template<
class REQUESTED,
class EDMLIST>
 
  218       template<
class FEATURE>
 
  233       template<
class FEATURE,
bool do_flatten>
 
  236       template<
class FEATURE,
bool do_flatten>
 
  240     std::string sourceLabel;
 
  267       std::vector<Trig::Feature<REQUESTED> >* 
m_data;
 
  290       std::string sourceLabel;
 
  306     if ( bif_tes.size() <= 1 ) {
 
  347       if(orig_cont->size() != orig_tpf->
size()) {
 
  352       unsigned int currentPos=0;
 
  353       for(
const typename CONT::base_value_type* 
obj : *cont) {
 
  354     typename CONT::const_iterator orig_obj = 
std::find(orig_cont->begin(),orig_cont->end(),
obj);
 
  356     if(orig_obj == orig_cont->end()) {
 
  359       size_t idx = orig_obj-orig_cont->begin();
 
  360       tpf.setFlag(currentPos, orig_tpf->
getFlag(
idx));
 
  384       if(orig_cont->size() != orig_tpf->
size()) {
 
  391       typename STORED::const_iterator orig_obj = 
std::find(orig_cont->begin(),orig_cont->end(), 
obj);
 
  393       if(orig_obj == orig_cont->end()) {
 
  396     size_t idx = orig_obj-orig_cont->begin();
 
  406     template<
class T, 
class STORED, 
bool same> 
struct getFlagsHelper;
 
  409     template<
class T, 
class STORED> 
struct getFlagsHelper<
T, STORED, true> {
 
  417     template<
class T, 
class STORED> 
struct getFlagsHelper<
T, STORED, false> {
 
  432       const STORED* orig(0);
 
  434       std::string sourceLabel(
"");
 
  455 #endif //XAOD_ANALYSIS 
  
std::string getTEName(const HLT::TriggerElement &te)
converts TEid to TE name (this may not always work, it depends on the availability of config)
char data[hepevt_bytes_allocation_ATLAS]
bool getRecentFeatureDataOrElementLink(const TriggerElement *te, LinkType &link, const std::string &label="", const TriggerElement *&source=::HLT::TrigNavStructure::m_unspecifiedTE, std::string &sourcelabel=::HLT::TrigNavStructure::m_unspecifiedLabel) const
void _do_it(false_type dummy=false_type())
def do_build(gen_config, integration_jobs)
std::string find(const std::string &s)
return a remapped string
The common trigger namespace for trigger analysis tools.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
const TrigPassBits * getBits(size_t sz, const HLT::TriggerElement *te, const std::string &, const HLT::NavigationCore *navigation)
DataVector adapter that acts like it holds const pointers.
const std::string m_label
unsigned int size() const
gets size of the container object vector
std::vector< Trig::Feature< REQUESTED > > * m_data
bool getActiveState() const
get state of the TriggerElement
typename ColumnTypeTraits< CT, CM >::ColumnType ElementType
static true_type trait_test_helper(typename U::ElementProxy *)
void collect< Muon_ROI >(const HLT::TriggerElement *te, std::vector< Trig::Feature< Muon_ROI > > &data, const std::string &, unsigned int condition, const std::string &, const HLT::TrigNavStructure *navigation)
void collect< EmTau_ROI >(const HLT::TriggerElement *te, std::vector< Trig::Feature< EmTau_ROI > > &data, const std::string &, unsigned int condition, const std::string &, const HLT::TrigNavStructure *navigation)
const TrigPassFlags * getFlags(size_t size, const HLT::TriggerElement *te, const std::string &label, const HLT::NavigationCore *navigation)
const HLT::NavigationCore * m_navigation
void setFlag(const unsigned int position, const std::vector< bool > &flag, const void *cont=0)
Set the flag at index position.
The NavigationCore class, adds on top of the TrigNavStructure the EDM read-only handling.
static const std::vector< TriggerElement * > & getDirectPredecessors(const TriggerElement *te)
returns list of direct predecessors (nodes seeding me)
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
const std::enable_if<!isDataVector< T >::value, T >::type * use_or_construct(const T *source, const HLT::TriggerElement *, const std::string &, unsigned int, const HLT::NavigationCore *)
bool isPassing(const TrigPassBits *bits, const T *obj, const CONTAINER *container)
Check the bit for the object in the associated bits object.
unsigned int flagSize() const
gets size of the flag vector for the object at index
const HLT::TriggerElement * m_te
ElementLink implementation for ROOT usage.
bool getRecentFeature(const TriggerElement *te, const T *&feature, const std::string &label="", const TriggerElement *&source=::HLT::TrigNavStructure::m_unspecifiedTE, std::string &sourcelabel=::HLT::TrigNavStructure::m_unspecifiedLabel) const
TrigPassFlags build_flags(const typename std::enable_if< isDataVector< CONT >::value, CONT >::type *orig_cont, const CONT *cont, const TrigPassFlags *orig_tpf)
lnk_helper< CONTAINER, isCont >::type type
const HLT::TriggerElement ** m_sourceTE
void collect< Jet_ROI >(const HLT::TriggerElement *te, std::vector< Trig::Feature< Jet_ROI > > &data, const std::string &, unsigned int condition, const std::string &, const HLT::TrigNavStructure *navigation)
A Flag is an ordered collection of bits (vector<bool>) that can hold additional (boolean) information...
void collect(const HLT::TriggerElement *te, std::vector< Trig::Feature< T > > &data, const std::string &label, unsigned int condition, const std::string &teName, const HLT::TrigNavStructure *navstructure)
actual feature acceess implementation It has (thanks to the ClassTraits) functionality to flatten con...
master_search< typename EDMLIST::map, HLT::TypeInformation::get_objt, OBJECT >::result::search_result::list_of_features type
const std::vector< bool > & getFlag(const unsigned int position) const
Returns the flag (vector<bool>) at index position.
TrigPassFlags build_flags2(const STORED *orig_cont, const T *obj, const TrigPassFlags *orig_tpf)
master_search< typename EDMLIST::map, HLT::TypeInformation::get_feat, FEATURE >::result::search_result::object type
master_search< typename EDMLIST::map, HLT::TypeInformation::get_feat, FEATURE >::result::search_result::container type