Loading [MathJax]/jax/output/SVG/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
GlobalSim::HypoTestBenchAlg Class Reference

#include <HypoTestBenchAlg.h>

Inheritance diagram for GlobalSim::HypoTestBenchAlg:
Collaboration diagram for GlobalSim::HypoTestBenchAlg:

Public Member Functions

 HypoTestBenchAlg (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual StatusCode initialize () override
 
virtual StatusCode execute () override
 
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 init_manual ()
 
StatusCode init_from_file ()
 
StatusCode init_tests_from_file ()
 
StatusCode init_expected_mults_from_file ()
 
StatusCode init_expected_tobs_from_file ()
 
StatusCode init_expected_from_file (std::vector< std::string > &, const std::string &)
 
StatusCode hexTOB2bitsetTOB (std::string, std::bitset< 72 > &) 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...
 

Private Attributes

SG::WriteHandleKey< GepAlgoHypothesisFIFOm_hypothesisFIFO_WriteKey
 
SG::WriteHandleKey< eEmSortSelectCountExpectationsm_eEmSortSelectCountExpectations_WriteKey
 
Gaudi::Property< std::string > m_testsFileName
 
Gaudi::Property< std::string > m_expectedMults_FileName
 
Gaudi::Property< std::vector< std::string > > m_testVecs_in
 
Gaudi::Property< std::string > m_expectedTobs_FileName
 
Gaudi::Property< std::string > m_expMults_in
 
Gaudi::Property< std::string > m_expTobs_in
 
Gaudi::Property< int > m_testRepeat
 
std::vector< std::string > m_testVecs {}
 
std::vector< std::unique_ptr< GepAlgoHypothesisFIFO > > m_fifos
 
std::size_t m_fifo_ptr {0}
 
std::vector< std::string > m_expected_mults {}
 
std::vector< std::string > m_expected_tobs {}
 
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 29 of file HypoTestBenchAlg.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

◆ HypoTestBenchAlg()

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

Definition at line 33 of file HypoTestBenchAlg.cxx.

34  :
35  AthAlgorithm(name, pSvcLocator) {
36  }

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 GlobalSim::HypoTestBenchAlg::execute ( )
overridevirtual

Definition at line 64 of file HypoTestBenchAlg.cxx.

64  {
65  ATH_MSG_DEBUG("executing");
66 
67  // Write out a FIFO, one per event. Running more events
68  // than FIFOs is an error.
69 
70  if (m_fifo_ptr == m_fifos.size()) {
71  ATH_MSG_ERROR("Attempting to read from an exhausted FIFO vector");
72  return StatusCode::FAILURE;
73  }
74 
75  auto h_write =
77 
78  CHECK(h_write.record(std::move(m_fifos[m_fifo_ptr])));
79 
80  auto expectations = std::make_unique<eEmSortSelectCountExpectations>(
83 
84  auto h_write_exp =
86 
87  CHECK(h_write_exp.record(std::move(expectations)));
88 
89  ++m_fifo_ptr;
90 
91  return StatusCode::SUCCESS;
92  }

◆ 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 }

◆ hexTOB2bitsetTOB()

StatusCode GlobalSim::HypoTestBenchAlg::hexTOB2bitsetTOB ( std::string  s,
std::bitset< 72 > &  bit_tob 
) const
private

Definition at line 11 of file HypoTestBenchAlg.cxx.

12  {
13 
14  auto bs = std::bitset<4>();
15 
16  std::size_t ind{s.size()*4};
17 
18  // ensure s is lower case
19  std::transform(s.begin(), s.end(), s.begin(),
20  [](unsigned char c){return std::tolower(c);});
21 
22  for(const char& c : s) {
23  bs = (c >= 'a') ? (c - 'a' + 10) : (c-'0');
24  for (int j = 3; j != -1; --j) {
25  bit_tob[--ind] = bs[j];
26  }
27  if (ind == 0) {break;}
28  }
29 
30  return StatusCode::SUCCESS;
31  }

◆ init_expected_from_file()

StatusCode GlobalSim::HypoTestBenchAlg::init_expected_from_file ( std::vector< std::string > &  dest,
const std::string &  fn 
)
private

Definition at line 245 of file HypoTestBenchAlg.cxx.

246  {
247 
248 
249  std::ifstream in_stream(fn);
250  if(!in_stream) {
251  std::stringstream ss;
252  ATH_MSG_FATAL("Failure to open expected file " << fn);
253  return StatusCode::FAILURE;
254  }
255 
256  auto padded_line = std::string();
257 
258  while (std::getline(in_stream, padded_line)) {
259  auto line = trim(padded_line);
260  dest.push_back(line);
261  }
262 
263  return StatusCode::SUCCESS;
264  }

◆ init_expected_mults_from_file()

StatusCode GlobalSim::HypoTestBenchAlg::init_expected_mults_from_file ( )
private

Definition at line 228 of file HypoTestBenchAlg.cxx.

228  {
229 
232  return StatusCode::SUCCESS;
233  }

◆ init_expected_tobs_from_file()

StatusCode GlobalSim::HypoTestBenchAlg::init_expected_tobs_from_file ( )
private

Definition at line 236 of file HypoTestBenchAlg.cxx.

236  {
237 
240  return StatusCode::SUCCESS;
241  }

◆ init_from_file()

StatusCode GlobalSim::HypoTestBenchAlg::init_from_file ( )
private

Definition at line 149 of file HypoTestBenchAlg.cxx.

149  {
153 
154  if (m_fifos.empty()) {
155  ATH_MSG_ERROR("no fifo data read in");
156  return StatusCode::FAILURE;
157  }
158 
159 
160  if (m_fifos.size() != m_expected_mults.size()) {
161  ATH_MSG_ERROR("no fifo data objs read in "
162  << m_fifos.size()
163  << " != no of expected mults "
164  << m_expected_mults.size());
165  return StatusCode::FAILURE;
166  }
167 
168 
169  if (m_fifos.size() != m_expected_mults.size()) {
170  ATH_MSG_ERROR("no fifo data objs read in "
171  << m_fifos.size()
172  << " != no of expected tobs "
173  << m_expected_tobs.size());
174 
175  return StatusCode::FAILURE;
176  }
177 
178 
179  return StatusCode::SUCCESS;
180  }

◆ init_manual()

StatusCode GlobalSim::HypoTestBenchAlg::init_manual ( )
private

Definition at line 95 of file HypoTestBenchAlg.cxx.

95  {
96 
97 
98  // build a single GepAlgoHypothesisFIFO that contains
99  // GepAlgoHypothesisPortsIn objects. The PortsIn objects contain
100  // data only for eEmTobs.
101 
102  if (m_testRepeat < 1) {
103  ATH_MSG_ERROR("Invalid repeat of input data requested: " << m_testRepeat);
104  return StatusCode::FAILURE;
105  }
106 
107  for(int i = 0; i != m_testRepeat; ++i) {
109  std::cbegin(m_testVecs_in),
110  std::cend(m_testVecs_in));
111  }
112 
113  auto fifo = std::make_unique<GepAlgoHypothesisFIFO>();
114  for (const auto& tv : m_testVecs) {
115  auto ports_in = GepAlgoHypothesisPortsIn();
116  CHECK(hexTOB2bitsetTOB(tv, *(ports_in.m_I_eEmTobs)));
117  fifo->push_back(ports_in);
118  }
119  m_fifos.push_back(std::move(fifo));
120 
121  m_expected_mults.push_back(m_expMults_in);
122  m_expected_tobs.push_back(m_expTobs_in);
123 
124  return StatusCode::SUCCESS;
125  }

◆ init_tests_from_file()

StatusCode GlobalSim::HypoTestBenchAlg::init_tests_from_file ( )
private

Definition at line 183 of file HypoTestBenchAlg.cxx.

183  {
184 
185 
186  std::ifstream tob_stream(m_testsFileName);
187  if(!tob_stream) {
188  std::stringstream ss;
189  ATH_MSG_FATAL("Failure to open tob file " << m_testsFileName);
190  return StatusCode::FAILURE;
191  }
192 
193  auto padded_line = std::string();
194  auto fifo = std::make_unique<GepAlgoHypothesisFIFO>();
195 
196  while (std::getline(tob_stream, padded_line)) {
197  auto line = trim(padded_line);
198  // filter out entries with only '0' entries.nThis are used
199  // in VHDL to handle special conditions
200  if (std::all_of(std::cbegin(line),
201  std::cend(line),
202  [](const auto& c) {return c == '0';})){
203  continue;
204  }
205 
206  auto ports_in = GepAlgoHypothesisPortsIn();
207  CHECK(hexTOB2bitsetTOB(line, *(ports_in.m_I_eEmTobs)));
208 
209 
210  fifo->push_back(ports_in);
211 
212  // the end of the fifo data is signaled by having the top bit
213  // set on an input tob
214 
215  auto top_ind = (ports_in.m_I_eEmTobs)->size()-1;
216  if ((ports_in.m_I_eEmTobs)->test(top_ind)) {
217  m_fifos.push_back(std::move(fifo));
218  fifo = std::make_unique<GepAlgoHypothesisFIFO>();
219  }
220 
221  }
222 
223  return StatusCode::SUCCESS;
224  }

◆ initialize()

StatusCode GlobalSim::HypoTestBenchAlg::initialize ( )
overridevirtual

Definition at line 38 of file HypoTestBenchAlg.cxx.

38  {
39  ATH_MSG_DEBUG("initialising");
42 
43  // initialisation is either from a file of test vectors
44  // or by filling in values by hand in this Algorithm
45 
46  if (m_testsFileName.empty()){
47  ATH_MSG_INFO("Initialisation is manual");
48  CHECK(init_manual());
49  } else {
50  ATH_MSG_INFO("Initialisation is from file " << m_testsFileName);
52  }
53 
54  ATH_MSG_INFO("Number of fifos " << m_fifos.size());
55  for(const auto& fifo : m_fifos) {
56  ATH_MSG_INFO("Fifo size " <<
57  fifo->size());
58  }
59 
60  return StatusCode::SUCCESS;
61  }

◆ 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_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_eEmSortSelectCountExpectations_WriteKey

SG::WriteHandleKey<eEmSortSelectCountExpectations> GlobalSim::HypoTestBenchAlg::m_eEmSortSelectCountExpectations_WriteKey
private
Initial value:
{
this,
"eEmSortSelectCountExpectationsWriteKey",
"eEmSortSelectCountExpectations",
"key to write out expectations for eEmSortSelecCount regression tests"
}

Definition at line 48 of file HypoTestBenchAlg.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_expected_mults

std::vector<std::string> GlobalSim::HypoTestBenchAlg::m_expected_mults {}
private

Definition at line 113 of file HypoTestBenchAlg.h.

◆ m_expected_tobs

std::vector<std::string> GlobalSim::HypoTestBenchAlg::m_expected_tobs {}
private

Definition at line 114 of file HypoTestBenchAlg.h.

◆ m_expectedMults_FileName

Gaudi::Property<std::string> GlobalSim::HypoTestBenchAlg::m_expectedMults_FileName
private
Initial value:
{this,
"expectedMultsFileName",
{},
"name of file with the expected multiplicity values from HW Sim"}

Definition at line 63 of file HypoTestBenchAlg.h.

◆ m_expectedTobs_FileName

Gaudi::Property<std::string> GlobalSim::HypoTestBenchAlg::m_expectedTobs_FileName
private
Initial value:
{this,
"expectedTobsFileName",
{},
"name of file with the expected Generic TOB values from HW Sim"}

Definition at line 76 of file HypoTestBenchAlg.h.

◆ m_expMults_in

Gaudi::Property<std::string> GlobalSim::HypoTestBenchAlg::m_expMults_in
private
Initial value:
{
this,
"expMults",
{},
"expected counts for manual tests. Hex"}

Definition at line 82 of file HypoTestBenchAlg.h.

◆ m_expTobs_in

Gaudi::Property<std::string> GlobalSim::HypoTestBenchAlg::m_expTobs_in
private
Initial value:
{
this,
"expTobs",
{},
"expected output generic TOBs for manual tests. Hex"}

Definition at line 90 of file HypoTestBenchAlg.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_fifo_ptr

std::size_t GlobalSim::HypoTestBenchAlg::m_fifo_ptr {0}
private

Definition at line 110 of file HypoTestBenchAlg.h.

◆ m_fifos

std::vector<std::unique_ptr<GepAlgoHypothesisFIFO> > GlobalSim::HypoTestBenchAlg::m_fifos
private

Definition at line 109 of file HypoTestBenchAlg.h.

◆ m_hypothesisFIFO_WriteKey

SG::WriteHandleKey<GepAlgoHypothesisFIFO> GlobalSim::HypoTestBenchAlg::m_hypothesisFIFO_WriteKey
private
Initial value:
{
this,
"hypothesisFIFOWriteKey",
"hypoFIFO",
"key to write out Fifo containing ports data"}

Definition at line 41 of file HypoTestBenchAlg.h.

◆ m_testRepeat

Gaudi::Property<int> GlobalSim::HypoTestBenchAlg::m_testRepeat
private
Initial value:
{
this,
"testRepeat",
{1},
"number of times to repeat manual test values"}

Definition at line 99 of file HypoTestBenchAlg.h.

◆ m_testsFileName

Gaudi::Property<std::string> GlobalSim::HypoTestBenchAlg::m_testsFileName
private
Initial value:
{this,
"testsFileName",
{},
"name of file with APP FIFO data"}

Definition at line 56 of file HypoTestBenchAlg.h.

◆ m_testVecs

std::vector<std::string> GlobalSim::HypoTestBenchAlg::m_testVecs {}
private

Definition at line 106 of file HypoTestBenchAlg.h.

◆ m_testVecs_in

Gaudi::Property<std::vector<std::string> > GlobalSim::HypoTestBenchAlg::m_testVecs_in
private
Initial value:
{
this,
"test_vecs",
{},
"test vectors for manual tests. Hex"}

Definition at line 69 of file HypoTestBenchAlg.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.


The documentation for this class was generated from the following files:
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
GlobalSim::HypoTestBenchAlg::init_expected_mults_from_file
StatusCode init_expected_mults_from_file()
Definition: HypoTestBenchAlg.cxx:228
collListGuids.line
string line
Definition: collListGuids.py:77
python.ext.silence.fifo
def fifo()
Definition: silence.py:37
GlobalSim::HypoTestBenchAlg::m_expectedMults_FileName
Gaudi::Property< std::string > m_expectedMults_FileName
Definition: HypoTestBenchAlg.h:63
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
GlobalSim::HypoTestBenchAlg::init_expected_from_file
StatusCode init_expected_from_file(std::vector< std::string > &, const std::string &)
Definition: HypoTestBenchAlg.cxx:245
GlobalSim::HypoTestBenchAlg::m_testVecs_in
Gaudi::Property< std::vector< std::string > > m_testVecs_in
Definition: HypoTestBenchAlg.h:69
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
perfmonmt-printer.dest
dest
Definition: perfmonmt-printer.py:189
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
GlobalSim::HypoTestBenchAlg::m_fifos
std::vector< std::unique_ptr< GepAlgoHypothesisFIFO > > m_fifos
Definition: HypoTestBenchAlg.h:109
GlobalSim::HypoTestBenchAlg::m_expTobs_in
Gaudi::Property< std::string > m_expTobs_in
Definition: HypoTestBenchAlg.h:90
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
GlobalSim::HypoTestBenchAlg::init_expected_tobs_from_file
StatusCode init_expected_tobs_from_file()
Definition: HypoTestBenchAlg.cxx:236
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
python.getCurrentFolderTag.fn
fn
Definition: getCurrentFolderTag.py:65
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
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
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
GlobalSim::HypoTestBenchAlg::m_testRepeat
Gaudi::Property< int > m_testRepeat
Definition: HypoTestBenchAlg.h:99
GlobalSim::trim
std::string trim(std::string s)
Definition: HypoTestBenchAlg.cxx:129
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
AthCommonDataStore< AthCommonMsg< Algorithm > >::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
GlobalSim::HypoTestBenchAlg::init_tests_from_file
StatusCode init_tests_from_file()
Definition: HypoTestBenchAlg.cxx:183
GlobalSim::HypoTestBenchAlg::m_expected_tobs
std::vector< std::string > m_expected_tobs
Definition: HypoTestBenchAlg.h:114
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
GlobalSim::HypoTestBenchAlg::m_hypothesisFIFO_WriteKey
SG::WriteHandleKey< GepAlgoHypothesisFIFO > m_hypothesisFIFO_WriteKey
Definition: HypoTestBenchAlg.h:41
GlobalSim::HypoTestBenchAlg::m_fifo_ptr
std::size_t m_fifo_ptr
Definition: HypoTestBenchAlg.h:110
GlobalSim::HypoTestBenchAlg::m_testsFileName
Gaudi::Property< std::string > m_testsFileName
Definition: HypoTestBenchAlg.h:56
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
GlobalSim::HypoTestBenchAlg::m_testVecs
std::vector< std::string > m_testVecs
Definition: HypoTestBenchAlg.h:106
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:73
GlobalSim::HypoTestBenchAlg::m_eEmSortSelectCountExpectations_WriteKey
SG::WriteHandleKey< eEmSortSelectCountExpectations > m_eEmSortSelectCountExpectations_WriteKey
Definition: HypoTestBenchAlg.h:48
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
a
TList * a
Definition: liststreamerinfos.cxx:10
h
GlobalSim::HypoTestBenchAlg::m_expected_mults
std::vector< std::string > m_expected_mults
Definition: HypoTestBenchAlg.h:113
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
GlobalSim::HypoTestBenchAlg::init_from_file
StatusCode init_from_file()
Definition: HypoTestBenchAlg.cxx:149
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
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
GlobalSim::HypoTestBenchAlg::m_expectedTobs_FileName
Gaudi::Property< std::string > m_expectedTobs_FileName
Definition: HypoTestBenchAlg.h:76
GlobalSim::HypoTestBenchAlg::hexTOB2bitsetTOB
StatusCode hexTOB2bitsetTOB(std::string, std::bitset< 72 > &) const
Definition: HypoTestBenchAlg.cxx:11
python.compressB64.c
def c
Definition: compressB64.py:93
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
GlobalSim::HypoTestBenchAlg::m_expMults_in
Gaudi::Property< std::string > m_expMults_in
Definition: HypoTestBenchAlg.h:82
GlobalSim::HypoTestBenchAlg::init_manual
StatusCode init_manual()
Definition: HypoTestBenchAlg.cxx:95
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >