|
ATLAS Offline Software
|
Base class for tools used by MTCalibPebHypoAlg.
More...
#include <MTCalibPebHypoTool.h>
|
| 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 |
|
Base class for tools used by MTCalibPebHypoAlg.
Definition at line 23 of file MTCalibPebHypoTool.h.
◆ StoreGateSvc_t
◆ MTCalibPebHypoTool()
MTCalibPebHypoTool::MTCalibPebHypoTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~MTCalibPebHypoTool()
MTCalibPebHypoTool::~MTCalibPebHypoTool |
( |
| ) |
|
|
virtual |
◆ decide()
StatusCode MTCalibPebHypoTool::decide |
( |
const Input & |
input | ) |
const |
Decides whether to accept the event.
Definition at line 177 of file MTCalibPebHypoTool.cxx.
180 const seed_t
seed = eventSeed(
input.eventContext.eventID(),
name());
181 ATH_MSG_DEBUG(
"Using seed " << seed <<
" for event " <<
input.eventContext.eventID());
182 threadLocalGenerator().seed(seed);
190 ATH_MSG_ERROR(
"Timeout reached in CPU time burning cycle # " << iCycle+1);
196 ATH_MSG_VERBOSE(
"CPU time burning cycle # " << iCycle+1 <<
", burn time [ms] = " << burnTime);
198 else std::this_thread::sleep_for(std::chrono::milliseconds(burnTime));
212 ATH_MSG_DEBUG(
"Processing instruction " << instr.toString());
213 std::vector<uint32_t>
robs;
214 if (instr.isRandom && instr.nRandom < robVec.size()) {
216 std::back_inserter(
robs),
218 threadLocalGenerator());
224 if (instr.type ==
ReqType::ADD || instr.type == ReqType::ADDGET) {
229 if (instr.type ==
ReqType::GET || instr.type == ReqType::ADDGET) {
235 ATH_MSG_DEBUG(
"Number of ROBs retrieved: " << robFragments.size());
236 if (!robFragments.empty()) {
242 if (!rob->check_rob() || !rob->check_rod()) {
247 ATH_MSG_ERROR(
"Data consistency check failed: " << ex.what());
249 ATH_MSG_DEBUG(
"Data consistency check passed for ROB 0x" << std::hex << rob->rob_source_id() << std::dec);
253 if (instr.type == ReqType::COL) {
260 ATH_MSG_ERROR(
"Invalid ROB request instruction " << instr.toString());
261 return StatusCode::FAILURE;
276 std::unique_ptr<DataCont>
data = std::make_unique<DataCont>();
277 std::unique_ptr<AuxCont> aux = std::make_unique<AuxCont>();
278 data->setStore(aux.get());
282 ATH_MSG_DEBUG(
"Recorded TrigCompositeContainer " << handleKey.key() <<
" in event store");
285 fillRandomData(*handle,maxElements);
295 return StatusCode::SUCCESS;
302 ATH_MSG_VERBOSE(
"Not configured to write any PEBInfo, nothing will be attached to the decision");
310 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
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 |
◆ initialize()
StatusCode MTCalibPebHypoTool::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 131 of file MTCalibPebHypoTool.cxx.
140 [](
const auto&
p){return p.first;});
145 m_robAccessDict.emplace_back(ROBRequestInstruction(instrString),robVec);
148 return StatusCode::FAILURE;
153 ATH_MSG_DEBUG(
name() <<
" will execute the following ROB request instructions:");
163 return StatusCode::SUCCESS;
◆ inputHandles()
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]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ 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 |
◆ 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
◆ m_detStore
◆ 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
◆ 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
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
◆ 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
◆ m_vhka
The documentation for this class was generated from the following files:
char data[hepevt_bytes_allocation_ATLAS]
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StatusCode accept(const xAOD::Muon *mu)
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
TrigCompositeAuxContainer_v2 TrigCompositeAuxContainer
Declare the latest version of the container.
#define ATH_MSG_VERBOSE(x)
virtual void setOwner(IDataHandleHolder *o)=0
static HLT::Identifier fromToolName(const std::string &tname)
Property holding a SG store/key/clid from which a WriteHandle is made.
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
std::vector< const ROBF * > VROBFRAG
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
static Timeout & instance()
Get reference to Timeout singleton.
bool reached() const
Check if the timeout was reached.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
TrigCompositeContainer_v1 TrigCompositeContainer
Declare the latest version of the container.
@ TIMEOUT
Timeout during event processing.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>