ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
JetHypoExerciserCompareAlg Class Reference

#include <JetHypoExerciserCompareAlg.h>

Inheritance diagram for JetHypoExerciserCompareAlg:
Collaboration diagram for JetHypoExerciserCompareAlg:

Public Member Functions

 JetHypoExerciserCompareAlg (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~JetHypoExerciserCompareAlg ()
 
StatusCode initialize ()
 
StatusCode execute ()
 
StatusCode finalize ()
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
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 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
 

Protected Member Functions

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...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode initialize_ (const ToolHandle< ITrigJetHypoToolHelper > &, const std::string &)
 
StatusCode execute_ (ToolHandle< ITrigJetHypoToolHelper > &, HypoJetVector &, const std::string &collectorName, xAODJetCollector &jetCollector, const std::string &logname, bool &pass)
 
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...
 

Private Attributes

ToolHandle< ITrigJetHypoToolHelperm_helper0
 
ToolHandle< ITrigJetHypoToolHelperm_helper1
 
ToolHandle< IHypoJetVectorGeneratorm_generator
 
Gaudi::Property< bool > m_visitDebug {this, "visit_debug", false, "debug flag"}
 
Gaudi::Property< std::string > m_logname {this, "logname", "JetHypoExerciser.log", "debug info output fn"}
 
std::size_t m_ncall {0}
 
std::size_t m_agree_true {0}
 
std::size_t m_agree_false {0}
 
std::size_t m_differ {0}
 
std::size_t m_agree_jets {0}
 
std::size_t m_differ_jets {0}
 
DataObjIDColl m_extendedExtraObjects
 
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 17 of file JetHypoExerciserCompareAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ JetHypoExerciserCompareAlg()

JetHypoExerciserCompareAlg::JetHypoExerciserCompareAlg ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 18 of file JetHypoExerciserCompareAlg.cxx.

19  :
20  AthAlgorithm(name, pSvcLocator){
21 }

◆ ~JetHypoExerciserCompareAlg()

JetHypoExerciserCompareAlg::~JetHypoExerciserCompareAlg ( )
virtual

Definition at line 23 of file JetHypoExerciserCompareAlg.cxx.

23 {}

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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; }

◆ execute()

StatusCode JetHypoExerciserCompareAlg::execute ( )

Definition at line 136 of file JetHypoExerciserCompareAlg.cxx.

136  {
137 
138  // Part 1: print where you are
139  ATH_MSG_INFO ("execute()");
140  ++m_ncall;
141 
142  // make a HypoJet, add to vector and send to helper tool
143 
144  HypoJetVector jv = m_generator->get();
145 
146  auto timer = JetTrigTimer();
147  std::string collectorName = name() + "debugInfoCollector0";
148  std::string logname = m_logname + "_ev_" + std::to_string(m_ncall) + "tool0";
149  bool pass0{false};
150 
151  xAODJetCollector jetCollector0;
152 
153  timer.start();
154  ATH_CHECK (execute_(m_helper0, jv, collectorName, jetCollector0, logname, pass0));
155  timer.update();
156 
157  if(!m_visitDebug){
158  std::stringstream ss;
159  ss << timer.elapsed_to_update()
160  << " tool0 " << std::boolalpha << pass0 << '\n';
161  timer.reset();
162  std::ofstream outfile;
163  outfile.open(logname);
164  outfile << ss.str();
165  outfile.close();
166  }
167 
168  collectorName = name() + "debugInfoCollector1";
169  logname = m_logname + "_ev_" + std::to_string(m_ncall) + "tool1";
170  bool pass1{false};
171  xAODJetCollector jetCollector1;
172 
173 
174  timer.start();
175 
176  ATH_CHECK (execute_(m_helper1, jv, collectorName, jetCollector1, logname, pass1));
177  timer.update();
178 
179  if(!m_visitDebug){
180  std::stringstream ss;
181  ss << timer.elapsed_to_update()
182  << " tool1 "<< std::boolalpha << pass1 << '\n';
183  timer.reset();
184  std::ofstream outfile;
185  outfile.open(logname);
186  outfile << ss.str();
187  outfile.close();
188  }
189 
190 
191  std::string spass0 = (pass0 ? "True": "False");
192  std::string spass1 = (pass1 ? "True": "False");
193  if (pass0 != pass1){
194  ++m_differ;
195  ATH_MSG_INFO ("hypo helper tools DISAGREE: "
196  << "pass 0 "<< spass0 << " pass 1 " << spass1);
197  } else {
198  if(pass0){
199 
200  ++m_agree_true;
201  } else {
202  ++m_agree_false;
203  }
204  ATH_MSG_INFO ("hypo helper tools agree on result which is: " << spass0);
205  }
206 
207  HypoJetVector collected0 = jetCollector0.hypoJets();
208  HypoJetVector collected1 = jetCollector1.hypoJets();
209  std::size_t njets = collected0.size();
210 
211  if (njets == collected1.size()) {
212  std::sort(collected0.begin(), collected0.end());
213  std::sort(collected1.begin(), collected1.end());
214 
215  bool jagree{true};
216  for (std::size_t i = 0; i < njets; i++) {
217  ATH_MSG_INFO(" jet 0 : " << static_cast<const void*>(collected0.at(i).get()) <<
218  " jet 1 : " << static_cast<const void*>(collected1.at(i).get()));
219 
220  if (collected0.at(i) != collected1.at(i)) {
221  ATH_MSG_INFO(" jets above differ ");
222  jagree = false;
223  break;
224  }
225  }
226  if (jagree) {
227  ++m_agree_jets;
228  } else {
229  ++m_differ_jets;
230  }
231  } else {
232  ++m_differ_jets;
233  ATH_MSG_INFO(" no of jets 0 : " << collected0.size() << " "
234  " no of jets 1 : " << collected1.size() << " "
235  " no of jets differ ");
236 
237  }
238 
239  return StatusCode::SUCCESS;
240 }

◆ execute_()

StatusCode JetHypoExerciserCompareAlg::execute_ ( ToolHandle< ITrigJetHypoToolHelper > &  helper,
HypoJetVector jv,
const std::string &  collectorName,
xAODJetCollector jetCollector,
const std::string &  logname,
bool &  pass 
)
private

Definition at line 78 of file JetHypoExerciserCompareAlg.cxx.

83  {
84 
85  // make a HypoJet, add to vector and send to helper tool
86 
87  std::unique_ptr<ITrigJetHypoInfoCollector> debugInfoCollector(nullptr);
88  if(m_visitDebug){
89  debugInfoCollector.reset(new DebugInfoCollector(collectorName));
90  }
91 
92  if (debugInfoCollector){
93  std::stringstream ss0;
94  ss0 << "n jets " << jv.size() << '\n';
95  debugInfoCollector-> collect("JetHypoExerciserCompareAlg", ss0.str());
96 
97 
98  std::stringstream ss1;
99  ss1 <<'\n';
100  for(const auto& j : jv){
101  ss1 << "e: " << j->e() << " et " << j->et() << " eta " << j->eta()
102  << '\n';
103  }
104  debugInfoCollector-> collect("JetHypoExerciserCompareAlg", ss1.str());
105  }
106 
107 
108  pass = helper->pass(jv, jetCollector, debugInfoCollector);
109 
110  std::stringstream ss;
111  ss << "========= ncall: "<<m_ncall << "==========\n";
112  if(debugInfoCollector){
113  std::stringstream ss1;
114  ss1 <<'\n';
115  for(const auto& j : jetCollector.hypoJets()){
116  ss1 << "e: " << j->e() << " et " << j->et() << " eta " << j->eta()
117  << '\n';
118  }
119  debugInfoCollector-> collect("JetHypoExerciserCompareAlg", ss1.str());
120  debugInfoCollector-> collect("JetHypoExerciserCompareAlg collectedJets",
121  ss1.str());
122 
123  ss << debugInfoCollector->toString() + '\n';
124  }
125  auto s = ss.str();
126  std::ofstream outfile;
127  // outfile.open(logname, std::ios_base::app);
128  outfile.open(logname);
129  outfile << s;
130  outfile.close();
131  return StatusCode::SUCCESS;
132 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ finalize()

StatusCode JetHypoExerciserCompareAlg::finalize ( )

Definition at line 244 of file JetHypoExerciserCompareAlg.cxx.

244  {
245 
246  // Part 1: print where you are
247  ATH_MSG_INFO ("finalize()");
248  ATH_MSG_INFO ("agree and false: " << m_agree_false <<
249  " agree and true: " << m_agree_true <<
250  " differ: " << m_differ <<
251  " jets agree: " << m_agree_jets <<
252  " jets differ: " << m_differ_jets
253  );
254 
255  return StatusCode::SUCCESS;
256 }

◆ initialize()

StatusCode JetHypoExerciserCompareAlg::initialize ( )

Definition at line 64 of file JetHypoExerciserCompareAlg.cxx.

64  {
65 
66  ATH_MSG_INFO ("initialize()");
67  auto logname = m_logname + "_config0.log";
69  if(!(sc == StatusCode::SUCCESS)){return sc;}
70 
71  logname = m_logname + "_config1.log";
72  return initialize_(m_helper1, logname);
73 }

◆ initialize_()

StatusCode JetHypoExerciserCompareAlg::initialize_ ( const ToolHandle< ITrigJetHypoToolHelper > &  helper,
const std::string &  logname 
)
private

Definition at line 27 of file JetHypoExerciserCompareAlg.cxx.

28  {
29 
30  ATH_MSG_INFO ("initialize_()");
31 
33  (" " << helper.propertyName()
34  << " = " << helper.type());
35 
36  if ( helper.retrieve().isFailure() ) {
38  (helper.propertyName() << ": Failed to retrieve tool "
39  << helper.type());
40  return StatusCode::FAILURE;
41  } else {
43  (helper.propertyName() << ": Retrieved tool "
44  << helper.type());
45  }
46  DebugInfoCollector collector(name());
47  CHECK(helper->getDescription(collector));
48  auto s = collector.toString();
49  s += '\n' + m_generator->toString();
50 
51  for(const auto& l : lineSplitter(s)){
52  ATH_MSG_INFO(l);
53  }
54 
55  if (m_visitDebug){
56  std::ofstream outfile;
57  outfile.open(logname);
58  outfile << s;
59  }
60 
61  return StatusCode::SUCCESS;
62 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::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.

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::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< Algorithm >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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  }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::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.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::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_agree_false

std::size_t JetHypoExerciserCompareAlg::m_agree_false {0}
private

Definition at line 49 of file JetHypoExerciserCompareAlg.h.

◆ m_agree_jets

std::size_t JetHypoExerciserCompareAlg::m_agree_jets {0}
private

Definition at line 51 of file JetHypoExerciserCompareAlg.h.

◆ m_agree_true

std::size_t JetHypoExerciserCompareAlg::m_agree_true {0}
private

Definition at line 48 of file JetHypoExerciserCompareAlg.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_differ

std::size_t JetHypoExerciserCompareAlg::m_differ {0}
private

Definition at line 50 of file JetHypoExerciserCompareAlg.h.

◆ m_differ_jets

std::size_t JetHypoExerciserCompareAlg::m_differ_jets {0}
private

Definition at line 52 of file JetHypoExerciserCompareAlg.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_generator

ToolHandle<IHypoJetVectorGenerator> JetHypoExerciserCompareAlg::m_generator
private
Initial value:
{this, "event_generator",
{}, "Generates test vector"}

Definition at line 36 of file JetHypoExerciserCompareAlg.h.

◆ m_helper0

ToolHandle<ITrigJetHypoToolHelper> JetHypoExerciserCompareAlg::m_helper0
private
Initial value:
{this, "JetHypoHelperTool0",
"Tool0", "private IJetTrigHypoToolHelper0"}

Definition at line 30 of file JetHypoExerciserCompareAlg.h.

◆ m_helper1

ToolHandle<ITrigJetHypoToolHelper> JetHypoExerciserCompareAlg::m_helper1
private
Initial value:
{this, "JetHypoHelperTool1",
"Tool1", "private IJetTrigHypoToolHelper1"}

Definition at line 33 of file JetHypoExerciserCompareAlg.h.

◆ m_logname

Gaudi::Property<std::string> JetHypoExerciserCompareAlg::m_logname {this, "logname", "JetHypoExerciser.log", "debug info output fn"}
private

Definition at line 44 of file JetHypoExerciserCompareAlg.h.

◆ m_ncall

std::size_t JetHypoExerciserCompareAlg::m_ncall {0}
private

Definition at line 46 of file JetHypoExerciserCompareAlg.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_visitDebug

Gaudi::Property<bool> JetHypoExerciserCompareAlg::m_visitDebug {this, "visit_debug", false, "debug flag"}
private

Definition at line 41 of file JetHypoExerciserCompareAlg.h.


The documentation for this class was generated from the following files:
JetHypoExerciserCompareAlg::m_differ
std::size_t m_differ
Definition: JetHypoExerciserCompareAlg.h:50
JetHypoExerciserCompareAlg::initialize_
StatusCode initialize_(const ToolHandle< ITrigJetHypoToolHelper > &, const std::string &)
Definition: JetHypoExerciserCompareAlg.cxx:27
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
xAODJetCollector::hypoJets
HypoJetVector hypoJets() const
Definition: xAODJetCollector.cxx:44
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
JetHypoExerciserCompareAlg::m_agree_true
std::size_t m_agree_true
Definition: JetHypoExerciserCompareAlg.h:48
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
JetHypoExerciserCompareAlg::execute_
StatusCode execute_(ToolHandle< ITrigJetHypoToolHelper > &, HypoJetVector &, const std::string &collectorName, xAODJetCollector &jetCollector, const std::string &logname, bool &pass)
Definition: JetHypoExerciserCompareAlg.cxx:78
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
lineSplitter
std::vector< std::string > lineSplitter(const std::string &s, char delimiter)
Definition: lineSplitter.cxx:8
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
JetHypoExerciserCompareAlg::m_generator
ToolHandle< IHypoJetVectorGenerator > m_generator
Definition: JetHypoExerciserCompareAlg.h:36
JetHypoExerciserCompareAlg::m_differ_jets
std::size_t m_differ_jets
Definition: JetHypoExerciserCompareAlg.h:52
python.utils.AtlRunQueryTimer.timer
def timer(name, disabled=False)
Definition: AtlRunQueryTimer.py:86
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
plotBeamSpotCompare.pass1
bool pass1
Definition: plotBeamSpotCompare.py:231
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
lumiFormat.i
int i
Definition: lumiFormat.py:85
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
JetHypoExerciserCompareAlg::m_visitDebug
Gaudi::Property< bool > m_visitDebug
Definition: JetHypoExerciserCompareAlg.h:41
DebugInfoCollector
Definition: DebugInfoCollector.h:13
JetHypoExerciserCompareAlg::m_agree_jets
std::size_t m_agree_jets
Definition: JetHypoExerciserCompareAlg.h:51
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
JetHypoExerciserCompareAlg::m_ncall
std::size_t m_ncall
Definition: JetHypoExerciserCompareAlg.h:46
HypoJetVector
std::vector< pHypoJet > HypoJetVector
Definition: HypoJetDefs.h:27
JetHypoExerciserCompareAlg::m_logname
Gaudi::Property< std::string > m_logname
Definition: JetHypoExerciserCompareAlg.h:44
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
JetHypoExerciserCompareAlg::m_helper0
ToolHandle< ITrigJetHypoToolHelper > m_helper0
Definition: JetHypoExerciserCompareAlg.h:30
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
JetTrigTimer
Definition: JetTrigTimer.h:13
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
xAODJetCollector
Definition: xAODJetCollector.h:20
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
a
TList * a
Definition: liststreamerinfos.cxx:10
h
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Trig::FeatureAccessImpl::collect
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...
Definition: FeatureCollectAthena.h:299
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
PrepareReferenceFile.outfile
outfile
Definition: PrepareReferenceFile.py:42
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
JetHypoExerciserCompareAlg::m_agree_false
std::size_t m_agree_false
Definition: JetHypoExerciserCompareAlg.h:49
MakeSliceSet.logname
logname
Definition: MakeSliceSet.py:34
JetHypoExerciserCompareAlg::m_helper1
ToolHandle< ITrigJetHypoToolHelper > m_helper1
Definition: JetHypoExerciserCompareAlg.h:33
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >