Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
MTCalibPebHypoTool Class Reference

Base class for tools used by MTCalibPebHypoAlg. More...

#include <MTCalibPebHypoTool.h>

Inheritance diagram for MTCalibPebHypoTool:
Collaboration diagram for MTCalibPebHypoTool:

Classes

struct  Input
 
struct  ROBRequestInstruction
 ROB request instruction description. More...
 

Public Member Functions

 MTCalibPebHypoTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard constructor. More...
 
virtual ~MTCalibPebHypoTool ()
 Standard destructor. More...
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
StatusCode decide (const Input &input) const
 Decides whether to accept the event. 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 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
 

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

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

Gaudi::Property< bool > m_useRandomSeed
 
Gaudi::Property< double > m_acceptRate
 
Gaudi::Property< unsigned int > m_burnTimePerCycleMillisec
 
Gaudi::Property< unsigned int > m_numBurnCycles
 
Gaudi::Property< bool > m_burnTimeRandomly
 
Gaudi::Property< bool > m_doCrunch
 
Gaudi::Property< bool > m_checkDataConsistency
 
Gaudi::Property< std::map< std::string, std::vector< uint32_t > > > m_robAccessDictProp
 
Gaudi::Property< unsigned int > m_timeBetweenRobReqMillisec
 
Gaudi::Property< std::set< uint32_t > > m_pebRobList
 
Gaudi::Property< std::set< uint32_t > > m_pebSubDetList
 
Gaudi::Property< std::map< std::string, unsigned int > > m_createRandomData
 
ServiceHandle< IROBDataProviderSvcm_robDataProviderSvc {this, "ROBDataProviderSvc", "ROBDataProviderSvc", "Name of the ROB data provider"}
 
ServiceHandle< ICPUCrunchSvc > m_cpuCrunchSvc {this, "CPUCrunchSvc", "CPUCrunchSvc", "Name of the CPU cruncher"}
 
HLT::Identifier m_decisionId
 The decision id of the tool instance. More...
 
SG::WriteHandleKeyArray< xAOD::TrigCompositeContainerm_randomDataWHK
 WriteHandleKey array for collections specified in the CreateRandomData property. More...
 
std::vector< std::pair< ROBRequestInstruction, std::vector< uint32_t > > > m_robAccessDict
 Ordered map of ROB request instructions filled from ROBAccessDict property at initialisation. More...
 
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

Base class for tools used by MTCalibPebHypoAlg.

Definition at line 23 of file MTCalibPebHypoTool.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

◆ MTCalibPebHypoTool()

MTCalibPebHypoTool::MTCalibPebHypoTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Standard constructor.

Definition at line 118 of file MTCalibPebHypoTool.cxx.

◆ ~MTCalibPebHypoTool()

MTCalibPebHypoTool::~MTCalibPebHypoTool ( )
virtual

Standard destructor.

Definition at line 125 of file MTCalibPebHypoTool.cxx.

125 {}

Member Function Documentation

◆ decide()

StatusCode MTCalibPebHypoTool::decide ( const Input input) const

Decides whether to accept the event.

Definition at line 175 of file MTCalibPebHypoTool.cxx.

175  {
176  // Re-seed the static thread-local RNG
177  if (not m_useRandomSeed.value()) {
178  const seed_t seed = eventSeed(input.eventContext.eventID(), name());
179  ATH_MSG_DEBUG("Using seed " << seed << " for event " << input.eventContext.eventID());
180  threadLocalGenerator().seed(seed);
181  }
182 
183  // ---------------------------------------------------------------------------
184  // Burn CPU time
185  // ---------------------------------------------------------------------------
186  for (unsigned int iCycle = 0; iCycle < m_numBurnCycles; ++iCycle) {
187  if (Athena::Timeout::instance(input.eventContext).reached()) {
188  ATH_MSG_ERROR("Timeout reached in CPU time burning cycle # " << iCycle+1);
190  }
191  unsigned int burnTime = m_burnTimeRandomly
192  ? randomInteger<unsigned int>(0, m_burnTimePerCycleMillisec)
194  ATH_MSG_VERBOSE("CPU time burning cycle # " << iCycle+1 << ", burn time [ms] = " << burnTime);
195  if (m_doCrunch) m_cpuCrunchSvc->crunch_for(std::chrono::milliseconds(burnTime));
196  else std::this_thread::sleep_for(std::chrono::milliseconds(burnTime));
197  }
198 
199  // ---------------------------------------------------------------------------
200  // Prefetch or retrieve ROBs
201  // ---------------------------------------------------------------------------
202  for (const auto& [instr,robVec] : m_robAccessDict) {
203  // Check for timeout
204  if (Athena::Timeout::instance(input.eventContext).reached()) {
205  ATH_MSG_ERROR("Timeout reached in ROB retrieval loop");
207  }
208 
209  // Select a random sample of ROBs from the list, if needed
210  ATH_MSG_DEBUG("Processing instruction " << instr.toString());
211  std::vector<uint32_t> robs;
212  if (instr.isRandom && instr.nRandom < robVec.size()) {
213  std::sample(robVec.begin(),robVec.end(),
214  std::back_inserter(robs),
215  instr.nRandom,
216  threadLocalGenerator());
217  }
218  else robs = robVec;
219 
220  // Execute the ROB requests
221  using ReqType = ROBRequestInstruction::Type;
222  if (instr.type == ReqType::ADD || instr.type == ReqType::ADDGET) {
223  // Prefetch ROBs
224  ATH_MSG_DEBUG("Preloading ROBs: " << idsToString(robs));
225  m_robDataProviderSvc->addROBData(input.eventContext, robs, name()+"-ADD");
226  }
227  if (instr.type == ReqType::GET || instr.type == ReqType::ADDGET) {
228  // Retrieve ROBs
229  ATH_MSG_DEBUG("Retrieving ROBs: " << idsToString(robs));
230  // VROBFRAG is a typedef for std::vector<const eformat::ROBFragment<const uint32_t*>*>
231  IROBDataProviderSvc::VROBFRAG robFragments;
232  m_robDataProviderSvc->getROBData(input.eventContext, robs, robFragments, name()+"-GET");
233  ATH_MSG_DEBUG("Number of ROBs retrieved: " << robFragments.size());
234  if (!robFragments.empty()) {
235  ATH_MSG_DEBUG("List of ROBs found: " << std::endl << format(robFragments));
236  }
237  if (m_checkDataConsistency.value()) {
238  for (const IROBDataProviderSvc::ROBF* rob : robFragments) {
239  try {
240  if (!rob->check_rob() || !rob->check_rod()) {
241  ATH_MSG_ERROR("Data consistency check failed");
242  }
243  }
244  catch (const std::exception& ex) {
245  ATH_MSG_ERROR("Data consistency check failed: " << ex.what());
246  }
247  ATH_MSG_DEBUG("Data consistency check passed for ROB 0x" << std::hex << rob->rob_source_id() << std::dec);
248  }
249  }
250  }
251  if (instr.type == ReqType::COL) {
252  // Event building
253  ATH_MSG_DEBUG("Requesting full event ROBs");
254  int nrobs = m_robDataProviderSvc->collectCompleteEventData(input.eventContext, name()+"-COL");
255  ATH_MSG_DEBUG("Number of ROBs retrieved: " << nrobs);
256  }
257  if (instr.type == ReqType::INVALID) {
258  ATH_MSG_ERROR("Invalid ROB request instruction " << instr.toString());
259  return StatusCode::FAILURE;
260  }
261 
262  // Sleep between ROB requests
263  std::this_thread::sleep_for(std::chrono::milliseconds(m_timeBetweenRobReqMillisec));
264  }
265 
266  // ---------------------------------------------------------------------------
267  // Produce random data
268  // ---------------------------------------------------------------------------
269  {
270  using DataCont = xAOD::TrigCompositeContainer;
271  using AuxCont = xAOD::TrigCompositeAuxContainer;
272  for (const SG::WriteHandleKey<DataCont>& handleKey : m_randomDataWHK) {
273  // Create data and aux container
274  std::unique_ptr<DataCont> data = std::make_unique<DataCont>();
275  std::unique_ptr<AuxCont> aux = std::make_unique<AuxCont>();
276  data->setStore(aux.get());
277  // Record the container in event store
278  SG::WriteHandle<DataCont> handle(handleKey,input.eventContext);
279  ATH_CHECK( handle.record(std::move(data),std::move(aux)) );
280  ATH_MSG_DEBUG("Recorded TrigCompositeContainer " << handleKey.key() << " in event store");
281  // Fill the container with random data
282  unsigned int maxElements = m_createRandomData.value().at(handleKey.key());
283  fillRandomData(*handle,maxElements);
284  }
285  }
286 
287  // ---------------------------------------------------------------------------
288  // Random accept decision with PEB information
289  // ---------------------------------------------------------------------------
290  bool accept = randomAccept(m_acceptRate);
291  if(!accept) {
292  ATH_MSG_DEBUG("Decision " << m_decisionId << " is reject");
293  return StatusCode::SUCCESS;
294  }
295 
296  ATH_MSG_DEBUG("Decision " << m_decisionId << " is accept");
298 
299  if (m_pebRobList.empty() && m_pebSubDetList.empty()) {
300  ATH_MSG_VERBOSE("Not configured to write any PEBInfo, nothing will be attached to the decision");
301  }
302  else {
303  ATH_MSG_DEBUG("Attaching ROBs=[" << idsToString(m_pebRobList) << "] and SubDets=["
304  << idsToString(m_pebSubDetList) << "] to the decision object");
305  ATH_CHECK(appendPEBInfo(input.decision,m_pebRobList,m_pebSubDetList));
306  }
307 
308  return StatusCode::SUCCESS;
309 }

◆ 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 MTCalibPebHypoTool::finalize ( )
overridevirtual

Definition at line 167 of file MTCalibPebHypoTool.cxx.

167  {
168  ATH_MSG_INFO("Finalising " << name());
169  ATH_CHECK(m_robDataProviderSvc.release());
170  ATH_CHECK(m_randomDataWHK.initialize());
171  return StatusCode::SUCCESS;
172 }

◆ initialize()

StatusCode MTCalibPebHypoTool::initialize ( )
overridevirtual

Definition at line 130 of file MTCalibPebHypoTool.cxx.

130  {
131  ATH_MSG_INFO("Initialising " << name());
132  ATH_CHECK(m_robDataProviderSvc.retrieve());
133  if (m_doCrunch) ATH_CHECK(m_cpuCrunchSvc.retrieve());
134 
135  // Copy keys from map<string,uint> to WriteHandleKeyArray
136  for (const auto& [name, number] : m_createRandomData) {
137  m_randomDataWHK.push_back(name);
138  }
139  ATH_CHECK(m_randomDataWHK.initialize());
140 
141  // Parse and print the ROB request dictionary
142  for (const auto& [instrString,robVec] : m_robAccessDictProp.value()) {
143  m_robAccessDict.emplace_back(ROBRequestInstruction(instrString),robVec);
144  if (m_robAccessDict.back().first.type==ROBRequestInstruction::Type::INVALID) {
145  ATH_MSG_ERROR("Invalid instruction " << instrString);
146  return StatusCode::FAILURE;
147  }
148  }
149  if (msgLvl(MSG::DEBUG)) {
150  if (!m_robAccessDict.empty()) {
151  ATH_MSG_DEBUG(name() << " will execute the following ROB request instructions:");
152  for (const auto& [instr,robVec] : m_robAccessDict) {
153  ATH_MSG_DEBUG("---> Instruction : " << instr.toString());
154  ATH_MSG_DEBUG(" ROB list : " << idsToString(robVec));
155  }
156  }
157  ATH_MSG_DEBUG(name() << " PEBROBList = [" << idsToString(m_pebRobList) << "]");
158  ATH_MSG_DEBUG(name() << " PEBSubDetList = [" << idsToString(m_pebSubDetList) << "]");
159  }
160 
161  return StatusCode::SUCCESS;
162 }

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

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

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

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

Gaudi::Property<double> MTCalibPebHypoTool::m_acceptRate
private
Initial value:
{
this, "RandomAcceptRate", -1,
"Rate of random accepts, <=0 is never, >=1 is always"
}

Definition at line 67 of file MTCalibPebHypoTool.h.

◆ m_burnTimePerCycleMillisec

Gaudi::Property<unsigned int> MTCalibPebHypoTool::m_burnTimePerCycleMillisec
private
Initial value:
{
this, "BurnTimePerCycleMillisec", 0,
"Burn time per cycle in milliseconds"
}

Definition at line 71 of file MTCalibPebHypoTool.h.

◆ m_burnTimeRandomly

Gaudi::Property<bool> MTCalibPebHypoTool::m_burnTimeRandomly
private
Initial value:
{
this, "BurnTimeRandomly", true,
"If true, burn time per cycle is a random value from uniform distribution between 0 and the given value"
}

Definition at line 79 of file MTCalibPebHypoTool.h.

◆ m_checkDataConsistency

Gaudi::Property<bool> MTCalibPebHypoTool::m_checkDataConsistency
private
Initial value:
{
this, "CheckDataConsistency", false,
"Perform consistency checks for all retrieved ROB data"
}

Definition at line 87 of file MTCalibPebHypoTool.h.

◆ m_cpuCrunchSvc

ServiceHandle<ICPUCrunchSvc> MTCalibPebHypoTool::m_cpuCrunchSvc {this, "CPUCrunchSvc", "CPUCrunchSvc", "Name of the CPU cruncher"}
private

Definition at line 121 of file MTCalibPebHypoTool.h.

◆ m_createRandomData

Gaudi::Property<std::map<std::string,unsigned int> > MTCalibPebHypoTool::m_createRandomData
private
Initial value:
{
this, "CreateRandomData", {},
"Create random data which can be serialised and saved to output. The property value should be a dictionary in the "
"form {name: number} where name is the collection name and number is the maximum number of elements and "
"their decorations"
}

Definition at line 112 of file MTCalibPebHypoTool.h.

◆ m_decisionId

HLT::Identifier MTCalibPebHypoTool::m_decisionId
private

The decision id of the tool instance.

Definition at line 125 of file MTCalibPebHypoTool.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_doCrunch

Gaudi::Property<bool> MTCalibPebHypoTool::m_doCrunch
private
Initial value:
{
this, "Crunch", false,
"Crunch CPU instead of sleeping"
}

Definition at line 83 of file MTCalibPebHypoTool.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_numBurnCycles

Gaudi::Property<unsigned int> MTCalibPebHypoTool::m_numBurnCycles
private
Initial value:
{
this, "NumBurnCycles", 0,
"Number of time burning cycles"
}

Definition at line 75 of file MTCalibPebHypoTool.h.

◆ m_pebRobList

Gaudi::Property<std::set<uint32_t> > MTCalibPebHypoTool::m_pebRobList
private
Initial value:
{
this, "PEBROBList", {},
"The list of ROBs to add for partial event building in each passed event"
}

Definition at line 104 of file MTCalibPebHypoTool.h.

◆ m_pebSubDetList

Gaudi::Property<std::set<uint32_t> > MTCalibPebHypoTool::m_pebSubDetList
private
Initial value:
{
this, "PEBSubDetList", {},
"The list of SubDets to add for partial event building in each passed event"
}

Definition at line 108 of file MTCalibPebHypoTool.h.

◆ m_randomDataWHK

SG::WriteHandleKeyArray<xAOD::TrigCompositeContainer> MTCalibPebHypoTool::m_randomDataWHK
private

WriteHandleKey array for collections specified in the CreateRandomData property.

Definition at line 127 of file MTCalibPebHypoTool.h.

◆ m_robAccessDict

std::vector<std::pair<ROBRequestInstruction,std::vector<uint32_t> > > MTCalibPebHypoTool::m_robAccessDict
private

Ordered map of ROB request instructions filled from ROBAccessDict property at initialisation.

Definition at line 129 of file MTCalibPebHypoTool.h.

◆ m_robAccessDictProp

Gaudi::Property<std::map<std::string,std::vector<uint32_t> > > MTCalibPebHypoTool::m_robAccessDictProp
private
Initial value:
{
this, "ROBAccessDict", {},
"Dictionary of prefetch/retrieve operations with given ROB IDs. The value is a vector of ROB IDs. "
"The string key has to contain :ADD: (prefetch), :GET: (retrieve), :ADDGET: (prefetch+retrieve) or :COL: (full "
"event building). :ADD:, :GET: and :ADDGET: may be also appended with :RNDX: where X is an integer. In this case, "
"random X ROBs will be prefetched/retrieved from the provided list, e.g. :GET:RND10: retrieves 10 random ROBs from "
"the list. Otherwise the full list is used. Note std::map is sorted by std::less<std::string>, so starting the key "
"with a number may be needed to enforce ordering, e.g. '01 :ADD:RND10:'."
}

Definition at line 91 of file MTCalibPebHypoTool.h.

◆ m_robDataProviderSvc

ServiceHandle<IROBDataProviderSvc> MTCalibPebHypoTool::m_robDataProviderSvc {this, "ROBDataProviderSvc", "ROBDataProviderSvc", "Name of the ROB data provider"}
private

Definition at line 120 of file MTCalibPebHypoTool.h.

◆ m_timeBetweenRobReqMillisec

Gaudi::Property<unsigned int> MTCalibPebHypoTool::m_timeBetweenRobReqMillisec
private
Initial value:
{
this, "TimeBetweenROBReqMillisec", 0,
"Delay in milliseconds between subsequent ROB request operations from ROBAccessDict"
}

Definition at line 100 of file MTCalibPebHypoTool.h.

◆ m_useRandomSeed

Gaudi::Property<bool> MTCalibPebHypoTool::m_useRandomSeed
private
Initial value:
{
this, "UseRandomSeed", false,
"If true, use random seed for the internal RNG. If false, use a seed based on run/event number and tool name."
}

Definition at line 63 of file MTCalibPebHypoTool.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.


The documentation for this class was generated from the following files:
MTCalibPebHypoTool::m_pebSubDetList
Gaudi::Property< std::set< uint32_t > > m_pebSubDetList
Definition: MTCalibPebHypoTool.h:108
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
vtune_athena.format
format
Definition: vtune_athena.py:14
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
MTCalibPebHypoTool::m_acceptRate
Gaudi::Property< double > m_acceptRate
Definition: MTCalibPebHypoTool.h:67
MTCalibPebHypoTool::m_decisionId
HLT::Identifier m_decisionId
The decision id of the tool instance.
Definition: MTCalibPebHypoTool.h:125
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CutsMETMaker::accept
StatusCode accept(const xAOD::Muon *mu)
Definition: CutsMETMaker.cxx:18
TrigCompositeUtils::addDecisionID
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
Definition: TrigCompositeUtilsRoot.cxx:61
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
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
athena.value
value
Definition: athena.py:124
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
xAOD::TrigCompositeAuxContainer
TrigCompositeAuxContainer_v2 TrigCompositeAuxContainer
Declare the latest version of the container.
Definition: TrigCompositeAuxContainer.h:16
MTCalibPebHypoTool::m_useRandomSeed
Gaudi::Property< bool > m_useRandomSeed
Definition: MTCalibPebHypoTool.h:63
MTCalibPebHypoTool::m_doCrunch
Gaudi::Property< bool > m_doCrunch
Definition: MTCalibPebHypoTool.h:83
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
CxxUtils::INVALID
@ INVALID
Definition: CachedValue.h:28
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
MTCalibPebHypoTool::m_checkDataConsistency
Gaudi::Property< bool > m_checkDataConsistency
Definition: MTCalibPebHypoTool.h:87
MTCalibPebHypoTool::m_randomDataWHK
SG::WriteHandleKeyArray< xAOD::TrigCompositeContainer > m_randomDataWHK
WriteHandleKey array for collections specified in the CreateRandomData property.
Definition: MTCalibPebHypoTool.h:127
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
MTCalibPebHypoTool::m_burnTimePerCycleMillisec
Gaudi::Property< unsigned int > m_burnTimePerCycleMillisec
Definition: MTCalibPebHypoTool.h:71
HLT::Identifier::fromToolName
static HLT::Identifier fromToolName(const std::string &tname)
Definition: HLTIdentifier.cxx:31
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
Generate_dsid_ranseed.seed
seed
Definition: Generate_dsid_ranseed.py:10
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:116
eformat::ROBFragment
Definition: L1CaloBsDecoderUtil.h:12
MTCalibPebHypoTool::m_robDataProviderSvc
ServiceHandle< IROBDataProviderSvc > m_robDataProviderSvc
Definition: MTCalibPebHypoTool.h:120
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
GET
#define GET(n)
Definition: MD5.cxx:153
python.HLT.CommonSequences.EventBuildingSequences.robs
robs
Definition: EventBuildingSequences.py:401
MTCalibPebHypoTool::m_timeBetweenRobReqMillisec
Gaudi::Property< unsigned int > m_timeBetweenRobReqMillisec
Definition: MTCalibPebHypoTool.h:100
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
calibdata.exception
exception
Definition: calibdata.py:496
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
IROBDataProviderSvc::VROBFRAG
std::vector< const ROBF * > VROBFRAG
Definition: IROBDataProviderSvc.h:27
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
MTCalibPebHypoTool::m_pebRobList
Gaudi::Property< std::set< uint32_t > > m_pebRobList
Definition: MTCalibPebHypoTool.h:104
Athena::Timeout::instance
static Timeout & instance()
Get reference to Timeout singleton.
Definition: Timeout.h:64
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
Athena::Timeout::reached
bool reached() const
Check if the timeout was reached.
Definition: Timeout.h:45
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
MTCalibPebHypoTool::m_burnTimeRandomly
Gaudi::Property< bool > m_burnTimeRandomly
Definition: MTCalibPebHypoTool.h:79
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
MTCalibPebHypoTool::m_robAccessDictProp
Gaudi::Property< std::map< std::string, std::vector< uint32_t > > > m_robAccessDictProp
Definition: MTCalibPebHypoTool.h:91
python.selection.number
number
Definition: selection.py:20
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
xAOD::TrigCompositeContainer
TrigCompositeContainer_v1 TrigCompositeContainer
Declare the latest version of the container.
Definition: Event/xAOD/xAODTrigger/xAODTrigger/TrigCompositeContainer.h:17
Athena::Status::TIMEOUT
@ TIMEOUT
Timeout during event processing.
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:73
MTCalibPebHypoTool::ROBRequestInstruction::Type
Type
Type of instruction.
Definition: MTCalibPebHypoTool.h:55
MTCalibPebHypoTool::m_numBurnCycles
Gaudi::Property< unsigned int > m_numBurnCycles
Definition: MTCalibPebHypoTool.h:75
a
TList * a
Definition: liststreamerinfos.cxx:10
h
MTCalibPebHypoTool::m_createRandomData
Gaudi::Property< std::map< std::string, unsigned int > > m_createRandomData
Definition: MTCalibPebHypoTool.h:112
MTCalibPebHypoTool::m_robAccessDict
std::vector< std::pair< ROBRequestInstruction, std::vector< uint32_t > > > m_robAccessDict
Ordered map of ROB request instructions filled from ROBAccessDict property at initialisation.
Definition: MTCalibPebHypoTool.h:129
DEBUG
#define DEBUG
Definition: page_access.h:11
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
MTCalibPebHypoTool::m_cpuCrunchSvc
ServiceHandle< ICPUCrunchSvc > m_cpuCrunchSvc
Definition: MTCalibPebHypoTool.h:121
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
ADD
#define ADD(NAME)
fitman.k
k
Definition: fitman.py:528