|
ATLAS Offline Software
|
#include <CreateData.h>
|
| CreateData (const std::string &name, ISvcLocator *pSvcLocator) |
| Constructor with parameters: More...
|
|
virtual | ~CreateData () |
| Destructor: More...
|
|
virtual StatusCode | initialize () |
|
virtual StatusCode | execute () |
|
virtual StatusCode | finalize () |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
algorithm to create dummy 4-momentum-like data classes: AthExParticle
as well as dummy decays (AthExDecay
) made up from 2 AthExParticle
and a more involved class (AthExElephantino
) holding 4 pointers to some elements of the AthExParticles
container.
Definition at line 32 of file CreateData.h.
◆ StoreGateSvc_t
◆ CreateData() [1/2]
CreateData::CreateData |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
Constructor with parameters:
Definition at line 41 of file CreateData.cxx.
52 "Output location of the particles" );
56 "Number of particles to create" );
60 "Output location of a 2-body decay" );
64 "Output location of an Elephantino with 4 legs" );
68 "list of test-names to create data for "
69 "(default: test1,test2,test3)" );
◆ ~CreateData()
CreateData::~CreateData |
( |
| ) |
|
|
virtual |
◆ CreateData() [2/2]
AthExThinning::CreateData::CreateData |
( |
| ) |
|
|
protected |
◆ 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 CreateData::execute |
( |
| ) |
|
|
virtual |
Definition at line 95 of file CreateData.cxx.
99 for ( std::vector<std::string>::const_iterator
104 ATH_MSG_INFO(
"Generating data for [" << *itr <<
"]...");
105 if ( !
makeData(*itr).isSuccess() ) {
106 ATH_MSG_ERROR (
"Could not generate data for [" << *itr <<
"] !!");
107 return StatusCode::FAILURE;
111 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();
◆ finalize()
StatusCode CreateData::finalize |
( |
| ) |
|
|
virtual |
◆ initialize()
StatusCode CreateData::initialize |
( |
| ) |
|
|
virtual |
◆ 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.
◆ makeData()
StatusCode CreateData::makeData |
( |
const std::string & |
testName | ) |
|
|
protected |
make data for a test
Definition at line 114 of file CreateData.cxx.
116 const std::string testName =
"_"+
test;
123 << particlesOutputName <<
"]");
126 return StatusCode::RECOVERABLE;
130 << particlesOutputName <<
"]");
147 if ( !
evtStore()->record(dcy, decayOutputName).isSuccess() ) {
148 ATH_MSG_ERROR(
"Could not store Decay at [" << decayOutputName <<
"] !!");
151 return StatusCode::RECOVERABLE;
153 if ( !
evtStore()->setConst(dcy).isSuccess() ) {
154 ATH_MSG_WARNING(
"Could not setConst Decay at [" << decayOutputName <<
"]");
159 return StatusCode::RECOVERABLE;
177 (
"Created a Decay from :" <<
endmsg
178 <<
" p1: px= " << dcy->
p1()->
px() * igev <<
endmsg
179 <<
" p2: px= " << dcy->
p2()->
px() * igev <<
endmsg
180 <<
" l1: px= " << dcy->
l1()->
px() * igev <<
endmsg
181 <<
" l2: px= " << dcy->
l2()->
px() * igev
188 if ( !
evtStore()->record(eleph, elephantinoOutputName).isSuccess() ) {
190 << elephantinoOutputName <<
"] !!");
193 return StatusCode::RECOVERABLE;
195 if ( !
evtStore()->setConst(eleph).isSuccess() ) {
197 << elephantinoOutputName <<
"]");
203 ATH_MSG_WARNING(
"Could not symlink AthExParticles to AthExIParticles !!");
204 return StatusCode::RECOVERABLE;
211 ATH_MSG_WARNING(
"Could not retrieve the (symlinked) AthExIParticles at ["
212 << particlesOutputName <<
"] !!");
213 return StatusCode::RECOVERABLE;
216 if ( iparticles->
size() < 9 ) {
218 return StatusCode::RECOVERABLE;
223 " iparticles: " << iparticles->
size());
227 <<
" #iparticles: " << iparticles->
size() <<
endmsg
229 <<
" @iparticles: " << iparticles <<
endmsg
231 <<
"=== StoreGate content ===\n"
233 return StatusCode::FAILURE;
244 eleph->
setLegs( ip1, ip2, ip3, ip4 );
251 <<
" leg1: px= " << eleph->
leg1()->
px() * igev <<
endmsg
252 <<
" leg2: px= " << eleph->
leg2()->
px() * igev <<
endmsg
253 <<
" leg3: px= " << eleph->
leg3()->
px() * igev <<
endmsg
254 <<
" leg4: px= " << eleph->
leg4()->
px() * igev <<
endmsg
255 <<
" ear1: px= " << eleph->
ear1()->
px() * igev <<
endmsg
256 <<
" ear2: px= " << eleph->
ear2()->
px() * igev);
258 return StatusCode::SUCCESS;
◆ 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_decayOutputName
StringProperty AthExThinning::CreateData::m_decayOutputName |
|
protected |
Decay object output location.
Definition at line 84 of file CreateData.h.
◆ m_detStore
◆ m_elephantinoOutputName
StringProperty AthExThinning::CreateData::m_elephantinoOutputName |
|
protected |
Elephantino object output location.
Definition at line 87 of file CreateData.h.
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_nbrParticles
UnsignedIntegerProperty AthExThinning::CreateData::m_nbrParticles |
|
protected |
Number of particles to generate.
Definition at line 81 of file CreateData.h.
◆ m_particlesOutputName
StringProperty AthExThinning::CreateData::m_particlesOutputName |
|
protected |
Particles output location.
Definition at line 78 of file CreateData.h.
◆ m_testNames
std::vector<std::string> AthExThinning::CreateData::m_testNames |
|
protected |
list of test-names to create data for (default: test1,test2,test3)
Definition at line 73 of file CreateData.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
StringProperty m_decayOutputName
Decay object output location.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< std::string > m_testNames
list of test-names to create data for (default: test1,test2,test3)
UnsignedIntegerProperty m_nbrParticles
Number of particles to generate.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
StringProperty m_particlesOutputName
Particles output location.
Athena::TPCnvVers::Current AthExParticles
virtual double px() const
Implementation of the AthExIParticle interface.
const AthExIParticle * leg4() const
virtual void setOwner(IDataHandleHolder *o)=0
const AthExIParticle * ear2() const
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const AthExIParticle * ear1() const
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
const AthExIParticle * leg2() const
::StatusCode StatusCode
StatusCode definition for legacy code.
const AthExParticle * l1() const
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
void setDecay(const ElementLink< AthExParticles > &p1, const ElementLink< AthExParticles > &p2, const ElementLink< AthExParticles > &l1, const ElementLink< AthExParticles > &l2)
StringProperty m_elephantinoOutputName
Elephantino object output location.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
void setLegs(const ElementLink< AthExIParticles > &p1, const ElementLink< AthExIParticles > &p2, const ElementLink< AthExIParticles > &p3, const ElementLink< AthExIParticles > &p4)
DataObjIDColl m_extendedExtraObjects
virtual double px() const =0
AthExIParticle interface.
#define ATH_MSG_WARNING(x)
const AthExParticle * p2() const
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
const AthExIParticle * leg1() const
AthAlgorithm()
Default constructor:
const AthExParticle * p1() const
StatusCode makeData(const std::string &testName)
make data for a test
const AthExIParticle * leg3() const
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
const AthExParticle * l2() const
void setEars(const ElementLink< AthExIParticles > &e1, const ElementLink< AthExIParticles > &e4)