 |
ATLAS Offline Software
|
#include <HypoTestBenchAlg.h>
|
| | 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, V, H > &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 |
| |
|
| 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, V, H > &hndl, const SG::VarHandleKeyType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| | specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
| |
Definition at line 29 of file HypoTestBenchAlg.h.
◆ StoreGateSvc_t
◆ HypoTestBenchAlg()
| GlobalSim::HypoTestBenchAlg::HypoTestBenchAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ 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]
◆ execute()
| StatusCode GlobalSim::HypoTestBenchAlg::execute |
( |
| ) |
|
|
overridevirtual |
Definition at line 66 of file HypoTestBenchAlg.cxx.
73 ATH_MSG_ERROR(
"Attempting to read from an exhausted FIFO vector");
74 return StatusCode::FAILURE;
82 auto expectations = std::make_unique<eEmSortSelectCountExpectations>(
89 CHECK(h_write_exp.record(std::move(expectations)));
93 return StatusCode::SUCCESS;
◆ 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
◆ 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.
57 return Algorithm::extraOutputDeps();
◆ hexTOB2bitsetTOB()
| StatusCode GlobalSim::HypoTestBenchAlg::hexTOB2bitsetTOB |
( |
std::string |
s, |
|
|
std::bitset< 72 > & |
bit_tob |
|
) |
| const |
|
private |
Definition at line 12 of file HypoTestBenchAlg.cxx.
15 auto bs = std::bitset<4>();
17 std::size_t ind{
s.size()*4};
21 [](
unsigned char c){return std::tolower(c);});
23 for(
const char&
c :
s) {
24 bs = (
c >=
'a') ? (
c -
'a' + 10) : (
c-
'0');
25 for (
int j = 3; j != -1; --j) {
26 bit_tob[--ind] = bs[j];
28 if (ind == 0) {
break;}
31 return StatusCode::SUCCESS;
◆ init_expected_from_file()
| StatusCode GlobalSim::HypoTestBenchAlg::init_expected_from_file |
( |
std::vector< std::string > & |
dest, |
|
|
const std::string & |
fn |
|
) |
| |
|
private |
Definition at line 226 of file HypoTestBenchAlg.cxx.
230 std::ifstream in_stream(
fn);
232 std::stringstream
ss;
234 return StatusCode::FAILURE;
237 auto padded_line = std::string();
239 while (std::getline(in_stream, padded_line)) {
244 return StatusCode::SUCCESS;
◆ init_expected_mults_from_file()
| StatusCode GlobalSim::HypoTestBenchAlg::init_expected_mults_from_file |
( |
| ) |
|
|
private |
◆ init_expected_tobs_from_file()
| StatusCode GlobalSim::HypoTestBenchAlg::init_expected_tobs_from_file |
( |
| ) |
|
|
private |
◆ init_from_file()
| StatusCode GlobalSim::HypoTestBenchAlg::init_from_file |
( |
| ) |
|
|
private |
Definition at line 130 of file HypoTestBenchAlg.cxx.
137 return StatusCode::FAILURE;
144 <<
" != no of expected mults "
146 return StatusCode::FAILURE;
153 <<
" != no of expected tobs "
156 return StatusCode::FAILURE;
160 return StatusCode::SUCCESS;
◆ init_manual()
| StatusCode GlobalSim::HypoTestBenchAlg::init_manual |
( |
| ) |
|
|
private |
Definition at line 97 of file HypoTestBenchAlg.cxx.
106 return StatusCode::FAILURE;
115 auto fifo = std::make_unique<GepAlgoHypothesisFIFO>();
117 auto ports_in = GepAlgoHypothesisPortsIn();
119 fifo->push_back(ports_in);
126 return StatusCode::SUCCESS;
◆ init_tests_from_file()
| StatusCode GlobalSim::HypoTestBenchAlg::init_tests_from_file |
( |
| ) |
|
|
private |
Definition at line 164 of file HypoTestBenchAlg.cxx.
169 std::stringstream
ss;
171 return StatusCode::FAILURE;
174 auto padded_line = std::string();
175 auto fifo = std::make_unique<GepAlgoHypothesisFIFO>();
177 while (std::getline(tob_stream, padded_line)) {
181 if (std::all_of(std::cbegin(
line),
183 [](
const auto&
c) {
return c ==
'0';})){
187 auto ports_in = GepAlgoHypothesisPortsIn();
191 fifo->push_back(ports_in);
196 auto top_ind = (ports_in.m_I_eEmTobs)->
size()-1;
197 if ((ports_in.m_I_eEmTobs)->test(top_ind)) {
199 fifo = std::make_unique<GepAlgoHypothesisFIFO>();
204 return StatusCode::SUCCESS;
◆ initialize()
| StatusCode GlobalSim::HypoTestBenchAlg::initialize |
( |
| ) |
|
|
overridevirtual |
◆ 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()
| StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ 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_detStore
◆ m_eEmSortSelectCountExpectations_WriteKey
Initial value:{
this,
"eEmSortSelectCountExpectationsWriteKey",
"eEmSortSelectCountExpectations",
"key to write out expectations for eEmSortSelecCount regression tests"
}
Definition at line 48 of file HypoTestBenchAlg.h.
◆ m_evtStore
◆ m_expected_mults
| std::vector<std::string> GlobalSim::HypoTestBenchAlg::m_expected_mults {} |
|
private |
◆ m_expected_tobs
| std::vector<std::string> GlobalSim::HypoTestBenchAlg::m_expected_tobs {} |
|
private |
◆ 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 |
◆ m_fifo_ptr
| std::size_t GlobalSim::HypoTestBenchAlg::m_fifo_ptr {0} |
|
private |
◆ m_fifos
◆ m_hypothesisFIFO_WriteKey
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 |
◆ 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
◆ m_vhka
The documentation for this class was generated from the following files:
StatusCode init_expected_mults_from_file()
Gaudi::Property< std::string > m_expectedMults_FileName
StatusCode init_expected_from_file(std::vector< std::string > &, const std::string &)
Gaudi::Property< std::vector< std::string > > m_testVecs_in
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
std::vector< std::unique_ptr< GepAlgoHypothesisFIFO > > m_fifos
Gaudi::Property< std::string > m_expTobs_in
virtual void setOwner(IDataHandleHolder *o)=0
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
StatusCode init_expected_tobs_from_file()
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Gaudi::Property< int > m_testRepeat
std::string trim(std::string s)
#define CHECK(...)
Evaluate an expression and check for errors.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
StatusCode init_tests_from_file()
std::vector< std::string > m_expected_tobs
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
SG::WriteHandleKey< GepAlgoHypothesisFIFO > m_hypothesisFIFO_WriteKey
Gaudi::Property< std::string > m_testsFileName
std::vector< std::string > m_testVecs
SG::WriteHandleKey< eEmSortSelectCountExpectations > m_eEmSortSelectCountExpectations_WriteKey
DataObjIDColl m_extendedExtraObjects
std::vector< std::string > m_expected_mults
#define ATH_MSG_WARNING(x)
StatusCode init_from_file()
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
AthAlgorithm()
Default constructor:
Gaudi::Property< std::string > m_expectedTobs_FileName
StatusCode hexTOB2bitsetTOB(std::string, std::bitset< 72 > &) const
Gaudi::Property< std::string > m_expMults_in