ATLAS Offline Software
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ConvProxy Struct Reference

#include <Run2ToRun3TrigNavConverterV2.h>

Collaboration diagram for ConvProxy:

Public Member Functions

 ConvProxy (const HLT::TriggerElement *te)
 
bool isChild (const ConvProxy *other) const
 
bool isParent (const ConvProxy *other) const
 
bool mergeAllowed (const ConvProxy *other) const
 
void merge (ConvProxy *other)
 
std::string description () const
 

Public Attributes

const HLT::TriggerElementte = nullptr
 
std::vector< HLT::te_id_typeteIDs
 
std::set< ConvProxy * > children
 
std::set< ConvProxy * > parents
 
std::set< HLT::IdentifierrunChains
 
std::set< HLT::IdentifierpassChains
 
uint64_t feaHash = MissingFEA
 
std::vector< HLT::TriggerElement::FeatureAccessHelperfeatures
 
std::vector< HLT::TriggerElement::FeatureAccessHelperrois
 
std::vector< HLT::TriggerElement::FeatureAccessHelpertracks
 
TrigCompositeUtils::Decisionl1Node {nullptr}
 
TrigCompositeUtils::DecisionimNode {nullptr}
 
std::vector< TrigCompositeUtils::Decision * > hNode
 

Static Public Attributes

static const uint64_t MissingFEA = 0
 

Detailed Description

Definition at line 32 of file Run2ToRun3TrigNavConverterV2.h.

Constructor & Destructor Documentation

◆ ConvProxy()

ConvProxy::ConvProxy ( const HLT::TriggerElement te)

Definition at line 21 of file Run2ToRun3TrigNavConverterV2.cxx.

21  : te{t}
22 {
23  teIDs.push_back(te->getId());
24 }

Member Function Documentation

◆ description()

std::string ConvProxy::description ( ) const

Definition at line 129 of file Run2ToRun3TrigNavConverterV2.cxx.

130 {
131  std::string ret;
132  ret += " N parents: " + std::to_string(parents.size());
133  ret += " N children: " + std::to_string(children.size());
134  std::ostringstream os;
135  for ( auto c: children )
136  os << c << " ";
137  ret += " ptrs: " + os.str();
138  ret += " feaHash: " + std::to_string(feaHash);
139  ret += " N run chains: " + std::to_string(runChains.size());
140  return ret;
141 }

◆ isChild()

bool ConvProxy::isChild ( const ConvProxy other) const

Definition at line 27 of file Run2ToRun3TrigNavConverterV2.cxx.

27  {
28  for ( auto c: children ) {
29  if (other == c)
30  return true;
31  if ( c->isChild(other) )
32  return true;
33  }
34  return false;
35 }

◆ isParent()

bool ConvProxy::isParent ( const ConvProxy other) const

Definition at line 37 of file Run2ToRun3TrigNavConverterV2.cxx.

37  {
38  for ( auto c: parents ) {
39  if (other == c)
40  return true;
41  if ( c->isParent(other) )
42  return true;
43  }
44  return false;
45 }

◆ merge()

void ConvProxy::merge ( ConvProxy other)

Definition at line 60 of file Run2ToRun3TrigNavConverterV2.cxx.

61 {
62  if (other == this)
63  {
64  return;
65  }
66  // copy over chains
67  runChains.insert(other->runChains.begin(), other->runChains.end());
68  passChains.insert(other->passChains.begin(), other->passChains.end());
69  teIDs.push_back(other->te->getId());
70  /* the intention of the code below is following.
71  Intial structure like is like this (the line is always bidirectional):
72  P1 P2 P3 <- parents
73  | | /
74  T1 T2 <- "this" and "other"
75  | |
76  C1 C2 <- children
77  1) Lets assume that the first proxies we treat are B1 & B2 ath they are mergable. The resulting structure should look like this:
78  P1 P2 P3
79  |/__/
80  T1 T2
81  |\
82  C1 C2
83 
84  */
85  auto add = [](ConvProxy *toadd, std::set<ConvProxy *> &coll)
86  {
87  if (std::find(coll.begin(), coll.end(), toadd) == coll.end())
88  {
89  coll.insert(toadd);
90  }
91  };
92 
93  auto remove = [](ConvProxy *torem, std::set<ConvProxy *> &coll)
94  {
95  auto place = std::find(coll.begin(), coll.end(), torem);
96  if (place != coll.end())
97  {
98  coll.erase(place);
99  }
100  };
101 
102  // this is T <-> C connection
103  for (auto otherChild : other->children)
104  {
105  add(otherChild, children);
106  add(this, otherChild->parents);
107  }
108  // this is T <-> P connection rewiring
109  for (auto otherParent : other->parents)
110  {
111  add(otherParent, parents);
112  add(this, otherParent->children);
113  }
114 
115  // now need to remove links back to the "other"
116  for (auto otherParent : other->parents)
117  {
118  remove(other, otherParent->children);
119  }
120 
121  for (auto otherChild : other->children)
122  {
123  remove(other, otherChild->parents);
124  }
125  other->children.clear();
126  other->parents.clear();
127 }

◆ mergeAllowed()

bool ConvProxy::mergeAllowed ( const ConvProxy other) const

Definition at line 48 of file Run2ToRun3TrigNavConverterV2.cxx.

49 {
50  if (this == other)
51  return false; // no merging with self
52  // never merge children with parents
53  if ( isChild(other) )
54  return false;
55  if ( isParent(other) )
56  return false;
57  return true;
58 }

Member Data Documentation

◆ children

std::set<ConvProxy *> ConvProxy::children

Definition at line 42 of file Run2ToRun3TrigNavConverterV2.h.

◆ feaHash

uint64_t ConvProxy::feaHash = MissingFEA

Definition at line 47 of file Run2ToRun3TrigNavConverterV2.h.

◆ features

std::vector<HLT::TriggerElement::FeatureAccessHelper> ConvProxy::features

Definition at line 49 of file Run2ToRun3TrigNavConverterV2.h.

◆ hNode

std::vector<TrigCompositeUtils::Decision *> ConvProxy::hNode

Definition at line 55 of file Run2ToRun3TrigNavConverterV2.h.

◆ imNode

TrigCompositeUtils::Decision* ConvProxy::imNode {nullptr}

Definition at line 54 of file Run2ToRun3TrigNavConverterV2.h.

◆ l1Node

TrigCompositeUtils::Decision* ConvProxy::l1Node {nullptr}

Definition at line 53 of file Run2ToRun3TrigNavConverterV2.h.

◆ MissingFEA

const uint64_t ConvProxy::MissingFEA = 0
static

Definition at line 46 of file Run2ToRun3TrigNavConverterV2.h.

◆ parents

std::set<ConvProxy *> ConvProxy::parents

Definition at line 43 of file Run2ToRun3TrigNavConverterV2.h.

◆ passChains

std::set<HLT::Identifier> ConvProxy::passChains

Definition at line 45 of file Run2ToRun3TrigNavConverterV2.h.

◆ rois

std::vector<HLT::TriggerElement::FeatureAccessHelper> ConvProxy::rois

Definition at line 50 of file Run2ToRun3TrigNavConverterV2.h.

◆ runChains

std::set<HLT::Identifier> ConvProxy::runChains

Definition at line 44 of file Run2ToRun3TrigNavConverterV2.h.

◆ te

const HLT::TriggerElement* ConvProxy::te = nullptr

Definition at line 39 of file Run2ToRun3TrigNavConverterV2.h.

◆ teIDs

std::vector<HLT::te_id_type> ConvProxy::teIDs

Definition at line 40 of file Run2ToRun3TrigNavConverterV2.h.

◆ tracks

std::vector<HLT::TriggerElement::FeatureAccessHelper> ConvProxy::tracks

Definition at line 51 of file Run2ToRun3TrigNavConverterV2.h.


The documentation for this struct was generated from the following files:
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
ConvProxy::runChains
std::set< HLT::Identifier > runChains
Definition: Run2ToRun3TrigNavConverterV2.h:44
HLT::TriggerElement::getId
te_id_type getId() const
reset internals.
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:43
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ConvProxy::children
std::set< ConvProxy * > children
Definition: Run2ToRun3TrigNavConverterV2.h:42
PixelModuleFeMask_create_db.remove
string remove
Definition: PixelModuleFeMask_create_db.py:83
ConvProxy::teIDs
std::vector< HLT::te_id_type > teIDs
Definition: Run2ToRun3TrigNavConverterV2.h:40
ret
T ret(T t)
Definition: rootspy.cxx:260
ConvProxy::passChains
std::set< HLT::Identifier > passChains
Definition: Run2ToRun3TrigNavConverterV2.h:45
add
bool add(const std::string &hname, TKey *tobj)
Definition: fastadd.cxx:55
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
ConvProxy::isParent
bool isParent(const ConvProxy *other) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:37
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
ConvProxy
Definition: Run2ToRun3TrigNavConverterV2.h:33
ConvProxy::feaHash
uint64_t feaHash
Definition: Run2ToRun3TrigNavConverterV2.h:47
ConvProxy::te
const HLT::TriggerElement * te
Definition: Run2ToRun3TrigNavConverterV2.h:39
ConvProxy::parents
std::set< ConvProxy * > parents
Definition: Run2ToRun3TrigNavConverterV2.h:43
python.compressB64.c
def c
Definition: compressB64.py:93
ConvProxy::isChild
bool isChild(const ConvProxy *other) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:27