ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
DerivationFramework::DeltaRTool Class Reference

#include <DeltaRTool.h>

Inheritance diagram for DerivationFramework::DeltaRTool:
Collaboration diagram for DerivationFramework::DeltaRTool:

Public Member Functions

 DeltaRTool (const std::string &t, const std::string &n, const IInterface *p)
 
StatusCode initialize ()
 
StatusCode finalize ()
 
virtual StatusCode addBranches () const
 Pass the thinning service
More...
 
StatusCode initializeParser (const ExpressionParsing::SelectionArg< NUM_PARSER > &selection_string)
 
StatusCode finalizeParser ()
 
virtual bool updateDataNeeds (const std::vector< const DataObjID * > &input_data_in, const std::vector< const DataObjID * > &output_data_in, std::vector< Gaudi::DataHandle * > &new_input_handles, std::vector< Gaudi::DataHandle * > &new_output_handles) override
 Inform a dynamic data consumer about all consumed or produced data. More...
 
virtual bool renounceInput (const DataObjID &output_data_id) override
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 AlgTool interface methods. More...
 

Protected Member Functions

StatusCode _initializeParser (const ExpressionParsing::SelectionArg< NUM_PARSER > &selection_string, ExpressionParsing::AppendLoaderFunc pre_xaod_loader=ExpressionParsing::NoLoaderFunc, ExpressionParsing::AppendLoaderFunc post_xaod_loader=ExpressionParsing::NoLoaderFunc)
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Protected Attributes

ExpressionParsing::SGxAODProxyLoaderm_xAODProxyLoader
 The expression parser. More...
 
std::unique_ptr< ExpressionParsing::IProxyLoaderm_proxyLoaders
 
std::conditional< NUM_PARSER==1, std::unique_ptr< ExpressionParsing::ExpressionParser >, std::array< std::unique_ptr< ExpressionParsing::ExpressionParser >, NUM_PARSER > >::type m_parser
 
std::vector< std::string > m_renounce
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode getDeltaRs (std::vector< float > *) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Static Private Member Functions

static float calculateDeltaR (float, float, float, float)
 

Private Attributes

std::string m_expression
 
std::string m_2ndExpression
 
SG::WriteHandleKey< std::vector< float > > m_sgName {this,"StoreGateEntryName","","SG key of output object"}
 
SG::ReadHandleKey< xAOD::IParticleContainerm_containerName {this,"ContainerName","","SG key of first container"}
 
SG::ReadHandleKey< xAOD::IParticleContainerm_containerName2 {this,"SecondContainerName","","SG key of first container"}
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 26 of file DeltaRTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ DeltaRTool()

DerivationFramework::DeltaRTool::DeltaRTool ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 18 of file DeltaRTool.cxx.

20  :
22  m_expression(""),
23  m_2ndExpression("")
24  {
25  declareInterface<DerivationFramework::IAugmentationTool>(this);
26  declareProperty("ObjectRequirements", m_expression);
27  declareProperty("SecondObjectRequirements", m_2ndExpression);
28  }

Member Function Documentation

◆ _initializeParser()

StatusCode ExpressionParserUserBase< AthAlgTool , NUM_PARSER >::_initializeParser ( const ExpressionParsing::SelectionArg< NUM_PARSER > &  selection_string,
ExpressionParsing::AppendLoaderFunc  pre_xaod_loader = ExpressionParsing::NoLoaderFunc,
ExpressionParsing::AppendLoaderFunc  post_xaod_loader = ExpressionParsing::NoLoaderFunc 
)
protectedinherited

◆ addBranches()

StatusCode DerivationFramework::DeltaRTool::addBranches ( ) const
virtual

Pass the thinning service

Implements DerivationFramework::IAugmentationTool.

Definition at line 53 of file DeltaRTool.cxx.

54  {
55  // Write deltaRs to SG for access by downstream algs
56  if (evtStore()->contains<std::vector<float> >(m_sgName.key())) {
57  ATH_MSG_ERROR("Tool is attempting to write a StoreGate key " << m_sgName << " which already exists. Please use a different key");
58  return StatusCode::FAILURE;
59  }
60  std::unique_ptr<std::vector<float> > deltaRs(new std::vector<float>());
61  ATH_CHECK(getDeltaRs(deltaRs.get()));
62 
64  ATH_CHECK(writeHandle.record(std::move(deltaRs)));
65 
66  return StatusCode::SUCCESS;
67  }

◆ calculateDeltaR()

float DerivationFramework::DeltaRTool::calculateDeltaR ( float  phi1,
float  phi2,
float  eta1,
float  eta2 
)
staticprivate

Definition at line 163 of file DeltaRTool.cxx.

164  {
165  float deltaPhi = fabs(phi1-phi2);
166  if (deltaPhi>TMath::Pi()) deltaPhi = 2.0*TMath::Pi() - deltaPhi;
167  float deltaPhiSq = deltaPhi*deltaPhi;
168  float deltaEtaSq = (eta1-eta2)*(eta1-eta2);
169  float deltaR = sqrt(deltaPhiSq+deltaEtaSq);
170  return deltaR;
171  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode DerivationFramework::DeltaRTool::finalize ( )

Definition at line 47 of file DeltaRTool.cxx.

48  {
50  return StatusCode::SUCCESS;
51  }

◆ finalizeParser()

StatusCode ExpressionParserUserBase< AthAlgTool , NUM_PARSER >::finalizeParser
inherited

◆ getDeltaRs()

StatusCode DerivationFramework::DeltaRTool::getDeltaRs ( std::vector< float > *  deltaRs) const
private

Definition at line 69 of file DeltaRTool.cxx.

70  {
71 
72  // check the relevant information is available
73  if (m_containerName.key().empty()) {
74  ATH_MSG_WARNING("Input container missing - returning zero");
75  deltaRs->push_back(0.0);
76  return StatusCode::FAILURE;
77  }
78  bool secondContainer(false);
79  if (!m_containerName2.key().empty()) secondContainer=true;
80 
81  // get the relevant branches
83 
84  const xAOD::IParticleContainer* secondParticles(nullptr);
85  if (secondContainer) {
87  secondParticles=particleHdl2.cptr();
88  }
89 
90  // get the positions of the elements which pass the requirement
91  std::vector<int> entries, entries2;
92  if (!m_expression.empty()) {entries = m_parser[kDeltaRToolParser1]->evaluateAsVector();}
93  else {entries.assign(particles->size(),1);} // default: include all elements
94  unsigned int nEntries = entries.size();
95  // check the sizes are compatible
96  if (particles->size() != nEntries ) {
97  ATH_MSG_FATAL("Branch sizes incompatible");
98  return StatusCode::FAILURE;
99  }
100  unsigned int nEntries2(0);
101  if (secondContainer) {
102  if (!m_2ndExpression.empty()) {entries2 = m_parser[kDeltaRToolParser2]->evaluateAsVector();}
103  else {entries2.assign(secondParticles->size(),1);} // default: include all elements
104  nEntries2 = entries2.size();
105  // check the sizes are compatible
106  if (secondParticles->size() != nEntries2 ) {
107  ATH_MSG_FATAL("Branch sizes incompatible - returning zero");
108  return StatusCode::FAILURE;
109  }
110  }
111 
112  // Double loop to get the pairs for which the mass should be calculated
113  std::vector<std::vector<int> > pairs;
114  if (!secondContainer) {
115  unsigned int outerIt, innerIt;
116  for (outerIt=0; outerIt<nEntries; ++outerIt) {
117  for (innerIt=outerIt+1; innerIt<nEntries; ++innerIt) {
118  std::vector<int> tmpPair;
119  if (entries[outerIt]==1 && entries[innerIt]==1) {
120  tmpPair.push_back(outerIt); tmpPair.push_back(innerIt);
121  pairs.push_back(tmpPair);
122  }
123  }
124  }
125  }
126 
127  if (secondContainer) {
128  unsigned int coll1It, coll2It;
129  for (coll1It=0; coll1It<nEntries; ++coll1It) {
130  for (coll2It=0; coll2It<nEntries2; ++coll2It) {
131  std::vector<int> tmpPair;
132  if (entries[coll1It]==1 && entries2[coll2It]==1) {
133  tmpPair.push_back(coll1It); tmpPair.push_back(coll2It);
134  pairs.push_back(tmpPair);
135  }
136  }
137  }
138  }
139 
140  // Loop over the pairs; calculate the mass; put into vector and return
141  std::vector<std::vector<int> >::iterator pairIt;
142  for (pairIt=pairs.begin(); pairIt!=pairs.end(); ++pairIt) {
143  unsigned int first = (*pairIt)[0];
144  unsigned int second = (*pairIt)[1];
145  if (!secondContainer) {
146  float phi1f = ((*particles)[first])->p4().Phi(); float phi2f = ((*particles)[second])->p4().Phi();
147  float eta1f = ((*particles)[first])->p4().Eta(); float eta2f = ((*particles)[second])->p4().Eta();
148  float deltaR = calculateDeltaR(phi1f,phi2f,eta1f,eta2f);
149  deltaRs->push_back(deltaR);
150  }
151  if (secondContainer) {
152  float phi1f = ((*particles)[first])->p4().Phi(); float phi2f = ((*secondParticles)[second])->p4().Phi();
153  float eta1f = ((*particles)[first])->p4().Eta(); float eta2f = ((*secondParticles)[second])->p4().Eta();
154  float deltaR = calculateDeltaR(phi1f,phi2f,eta1f,eta2f);
155  deltaRs->push_back(deltaR);
156  }
157  }
158 
159  return StatusCode::SUCCESS;
160 
161  }

◆ initialize()

StatusCode DerivationFramework::DeltaRTool::initialize ( )

Definition at line 30 of file DeltaRTool.cxx.

31  {
32  if (m_sgName.key().empty()) {
33  ATH_MSG_ERROR("No SG name provided for the output of invariant mass tool!");
34  return StatusCode::FAILURE;
35  }
37  ATH_CHECK(m_containerName.initialize());
38 
39  if (!m_containerName2.key().empty()) {
40  ATH_CHECK(m_containerName2.initialize());
41  }
42 
44  return StatusCode::SUCCESS;
45  }

◆ initializeParser()

StatusCode ExpressionParserUser< AthAlgTool , NUM_PARSER >::initializeParser ( const ExpressionParsing::SelectionArg< NUM_PARSER > &  selection_string)
inherited

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

static const InterfaceID& DerivationFramework::IAugmentationTool::interfaceID ( )
inlinestaticinherited

AlgTool interface methods.

Definition at line 31 of file IAugmentationTool.h.

31 { return IID_IAugmentationTool; }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ renounceInput()

virtual bool ExpressionParserUserBase< AthAlgTool , NUM_PARSER >::renounceInput ( const DataObjID &  output_data_id)
overridevirtualinherited

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateDataNeeds()

virtual bool ExpressionParserUserBase< AthAlgTool , NUM_PARSER >::updateDataNeeds ( const std::vector< const DataObjID * > &  input_data_in,
const std::vector< const DataObjID * > &  output_data_in,
std::vector< Gaudi::DataHandle * > &  new_input_handles,
std::vector< Gaudi::DataHandle * > &  new_output_handles 
)
overridevirtualinherited

Inform a dynamic data consumer about all consumed or produced data.

Parameters
input_data_inthe input data object IDs of all algorithms and tools
output_data_inthe output data object IDs of all algorithms and tools
new_input_handlesthe new input data handles added by this call
new_output_handlesthe new output data handles added by this call
Returns
true if the consumer did update its handles, false otherwise

Implements IDynamicDataConsumer.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_2ndExpression

std::string DerivationFramework::DeltaRTool::m_2ndExpression
private

Definition at line 36 of file DeltaRTool.h.

◆ m_containerName

SG::ReadHandleKey<xAOD::IParticleContainer> DerivationFramework::DeltaRTool::m_containerName {this,"ContainerName","","SG key of first container"}
private

Definition at line 38 of file DeltaRTool.h.

◆ m_containerName2

SG::ReadHandleKey<xAOD::IParticleContainer> DerivationFramework::DeltaRTool::m_containerName2 {this,"SecondContainerName","","SG key of first container"}
private

Definition at line 39 of file DeltaRTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_expression

std::string DerivationFramework::DeltaRTool::m_expression
private

Definition at line 35 of file DeltaRTool.h.

◆ m_parser

std::conditional< NUM_PARSER == 1, std::unique_ptr<ExpressionParsing::ExpressionParser>, std::array< std::unique_ptr<ExpressionParsing::ExpressionParser>, NUM_PARSER> >::type ExpressionParserUserBase< AthAlgTool , NUM_PARSER >::m_parser
protectedinherited

Definition at line 100 of file ExpressionParserUser.h.

◆ m_proxyLoaders

std::unique_ptr<ExpressionParsing::IProxyLoader> ExpressionParserUserBase< AthAlgTool , NUM_PARSER >::m_proxyLoaders
protectedinherited

Definition at line 97 of file ExpressionParserUser.h.

◆ m_renounce

std::vector<std::string> ExpressionParserUserBase< AthAlgTool , NUM_PARSER >::m_renounce
protectedinherited

Definition at line 102 of file ExpressionParserUser.h.

◆ m_sgName

SG::WriteHandleKey<std::vector<float> > DerivationFramework::DeltaRTool::m_sgName {this,"StoreGateEntryName","","SG key of output object"}
private

Definition at line 37 of file DeltaRTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_xAODProxyLoader

ExpressionParsing::SGxAODProxyLoader* ExpressionParserUserBase< AthAlgTool , NUM_PARSER >::m_xAODProxyLoader
protectedinherited

The expression parser.

Definition at line 96 of file ExpressionParserUser.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
DerivationFramework::kDeltaRToolParser1
@ kDeltaRToolParser1
Definition: DeltaRTool.h:25
ExpressionParserUserBase< AthAlgTool, NUM_PARSER >::finalizeParser
StatusCode finalizeParser()
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
P4Helpers::deltaEtaSq
double deltaEtaSq(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Definition: P4Helpers.h:98
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DerivationFramework::DeltaRTool::m_containerName
SG::ReadHandleKey< xAOD::IParticleContainer > m_containerName
Definition: DeltaRTool.h:38
DerivationFramework::DeltaRTool::m_2ndExpression
std::string m_2ndExpression
Definition: DeltaRTool.h:36
ParticleGun_SamplingFraction.eta2
eta2
Definition: ParticleGun_SamplingFraction.py:96
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:160
DerivationFramework::DeltaRTool::m_containerName2
SG::ReadHandleKey< xAOD::IParticleContainer > m_containerName2
Definition: DeltaRTool.h:39
ExpressionParserUserBase< AthAlgTool, NUM_PARSER >::m_parser
std::conditional< NUM_PARSER==1, std::unique_ptr< ExpressionParsing::ExpressionParser >, std::array< std::unique_ptr< ExpressionParsing::ExpressionParser >, NUM_PARSER > >::type m_parser
Definition: ExpressionParserUser.h:100
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
xAOD::eta1
setEt setPhi setE277 setWeta2 eta1
Definition: TrigEMCluster_v1.cxx:41
DerivationFramework::DeltaRTool::m_expression
std::string m_expression
Definition: DeltaRTool.h:35
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
python.CreateTierZeroArgdict.pairs
pairs
Definition: CreateTierZeroArgdict.py:201
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
DerivationFramework::DeltaRTool::calculateDeltaR
static float calculateDeltaR(float, float, float, float)
Definition: DeltaRTool.cxx:163
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
beamspotman.n
n
Definition: beamspotman.py:731
contains
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition: hcg.cxx:111
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
ExpressionParserUser< AthAlgTool, kDeltaRToolParserNum >::initializeParser
StatusCode initializeParser(const ExpressionParsing::SelectionArg< NUM_PARSER > &selection_string)
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
ExpressionParserUser< AthAlgTool, kDeltaRToolParserNum >
P4Helpers::deltaPhiSq
double deltaPhiSq(const I4Momentum &pA, const I4Momentum &pB)
delta Phi squared in range ([-pi,pi[)^2 from two I4momentum references
Definition: P4Helpers.h:185
DerivationFramework::kDeltaRToolParser2
@ kDeltaRToolParser2
Definition: DeltaRTool.h:25
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
DerivationFramework::DeltaRTool::m_sgName
SG::WriteHandleKey< std::vector< float > > m_sgName
Definition: DeltaRTool.h:37
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DeMoScan.first
bool first
Definition: DeMoScan.py:536
LArG4FSStartPointFilter.particles
list particles
Definition: LArG4FSStartPointFilter.py:84
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
entries
double entries
Definition: listroot.cxx:49
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
dqBeamSpot.nEntries
int nEntries
Definition: dqBeamSpot.py:73
makeComparison.deltaR
float deltaR
Definition: makeComparison.py:36
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
DerivationFramework::DeltaRTool::getDeltaRs
StatusCode getDeltaRs(std::vector< float > *) const
Definition: DeltaRTool.cxx:69
fitman.k
k
Definition: fitman.py:528