|
ATLAS Offline Software
|
#include <SolenoidTest.h>
|
| SolenoidTest (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual StatusCode | initialize () override final |
|
virtual StatusCode | execute () override final |
|
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 |
|
|
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > | m_fieldCacheKey |
|
ServiceHandle< ITHistSvc > | m_thistSvc |
| Histogram Service. More...
|
|
double | m_xyzt [4] {} |
| Variable to write out. More...
|
|
double | m_field [3] {} |
| stores the field components More...
|
|
double | m_fieldZR [3] {} |
| stores the 2d field components More...
|
|
double | m_deriv [9] {} |
| stores derivatives More...
|
|
double | m_derivZR [9] {} |
| stores derivatives More...
|
|
TTree * | m_tree {nullptr} |
| the ROOT tree containing the output More...
|
|
Gaudi::Property< std::string > | m_histStream |
|
Gaudi::Property< std::string > | m_treeName |
|
Gaudi::Property< double > | m_minR {this, "MinimumR", 0, "minimum R"} |
|
Gaudi::Property< double > | m_maxR {this, "MaximumR", 1075., "maximum R"} |
|
Gaudi::Property< double > | m_minZ {this, "MinimumZ", -2820, "minimum Z"} |
|
Gaudi::Property< double > | m_maxZ {this, "MaximumZ", 2820., "maximum Z"} |
|
Gaudi::Property< int > | m_stepsR |
|
Gaudi::Property< int > | m_stepsZ |
|
Gaudi::Property< int > | m_stepsPhi |
|
Gaudi::Property< int > | m_event |
|
std::atomic< long int > | m_eventsSeen {0} |
| event counter More...
|
|
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 |
|
Definition at line 31 of file SolenoidTest.h.
◆ StoreGateSvc_t
◆ SolenoidTest()
MagField::SolenoidTest::SolenoidTest |
( |
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 MagField::SolenoidTest::execute |
( |
| ) |
|
|
finaloverridevirtual |
Definition at line 63 of file SolenoidTest.cxx.
65 Gaudi::Hive::currentContext()};
67 if (fieldCondObj ==
nullptr) {
68 ATH_MSG_ERROR(
"Failed to retrieve AtlasFieldCacheCondObj with key "
70 return StatusCode::FAILURE;
74 fieldCondObj->getInitializedCache(fieldCache);
94 <<
" with xyz: " <<
m_xyzt[0] <<
", "
96 <<
" with value " <<
m_field[0] <<
", "
105 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();
◆ initialize()
StatusCode MagField::SolenoidTest::initialize |
( |
| ) |
|
|
finaloverridevirtual |
Definition at line 32 of file SolenoidTest.cxx.
37 return StatusCode::FAILURE;
44 m_tree =
new TTree(
treeName.c_str(),
"Magnetic field in the solenoid");
48 "dBxdx/D:dBxdy/D:dBxdz/D:dBydx/D:dBydy/D:dBydz/"
49 "D:dBzdx/D:dBzdy/D:dBzdz/D");
52 "dBxdx2/D:dBxdy2/D:dBxdz2/D:dBydx2/D:dBydy2/D:dBydz2/"
53 "D:dBzdx2/D:dBzdy2/D:dBzdz2/D");
57 return StatusCode::FAILURE;
60 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()
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_deriv
double MagField::SolenoidTest::m_deriv[9] {} |
|
private |
◆ m_derivZR
double MagField::SolenoidTest::m_derivZR[9] {} |
|
private |
◆ m_detStore
◆ m_event
Gaudi::Property<int> MagField::SolenoidTest::m_event |
|
private |
Initial value:{this, "eventTodump", 0,
"Event to dump the magnetic field for"}
Definition at line 71 of file SolenoidTest.h.
◆ m_eventsSeen
std::atomic<long int> MagField::SolenoidTest::m_eventsSeen {0} |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_field
double MagField::SolenoidTest::m_field[3] {} |
|
private |
◆ m_fieldCacheKey
Initial value:{
this, "AtlasFieldCacheCondObj", "fieldCondObj",
"Magnetic Field conditions object key"}
Definition at line 40 of file SolenoidTest.h.
◆ m_fieldZR
double MagField::SolenoidTest::m_fieldZR[3] {} |
|
private |
◆ m_histStream
Gaudi::Property<std::string> MagField::SolenoidTest::m_histStream |
|
private |
Initial value:{
this, "HistStreamName", "SolenoidTest",
"Name of the THistSvc output stream"}
Definition at line 55 of file SolenoidTest.h.
◆ m_maxR
Gaudi::Property<double> MagField::SolenoidTest::m_maxR {this, "MaximumR", 1075., "maximum R"} |
|
private |
◆ m_maxZ
Gaudi::Property<double> MagField::SolenoidTest::m_maxZ {this, "MaximumZ", 2820., "maximum Z"} |
|
private |
◆ m_minR
Gaudi::Property<double> MagField::SolenoidTest::m_minR {this, "MinimumR", 0, "minimum R"} |
|
private |
◆ m_minZ
Gaudi::Property<double> MagField::SolenoidTest::m_minZ {this, "MinimumZ", -2820, "minimum Z"} |
|
private |
◆ m_stepsPhi
Gaudi::Property<int> MagField::SolenoidTest::m_stepsPhi |
|
private |
Initial value:{this, "StepsPhi", 200,
"Number of steps along phi (granularity)"}
Definition at line 69 of file SolenoidTest.h.
◆ m_stepsR
Gaudi::Property<int> MagField::SolenoidTest::m_stepsR |
|
private |
Initial value:{this, "StepsR", 200,
"Number of steps along radius (granularity)"}
Definition at line 65 of file SolenoidTest.h.
◆ m_stepsZ
Gaudi::Property<int> MagField::SolenoidTest::m_stepsZ |
|
private |
Initial value:{this, "StepsZ", 200,
"Number of steps along z (granularity)"}
Definition at line 67 of file SolenoidTest.h.
◆ m_thistSvc
◆ m_tree
TTree* MagField::SolenoidTest::m_tree {nullptr} |
|
private |
◆ m_treeName
Gaudi::Property<std::string> MagField::SolenoidTest::m_treeName |
|
private |
Initial value:{
this, "ROOTTreeName", "field",
"Name of the TTree object in the output file."}
Definition at line 58 of file SolenoidTest.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_xyzt
double MagField::SolenoidTest::m_xyzt[4] {} |
|
private |
The documentation for this class was generated from the following files:
Gaudi::Property< std::string > m_treeName
Gaudi::Property< int > m_stepsPhi
ServiceHandle< ITHistSvc > m_thistSvc
Histogram Service.
void getFieldZR(const double *ATH_RESTRICT xyz, double *ATH_RESTRICT bxyz, double *ATH_RESTRICT deriv=nullptr)
get B field valaue on the z-r plane at given position works only inside the solenoid.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Gaudi::Property< double > m_minR
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
double m_derivZR[9]
stores derivatives
const std::string & key() const
Return the StoreGate ID for the referenced object.
Gaudi::Property< int > m_stepsR
double m_deriv[9]
stores derivatives
TTree * m_tree
the ROOT tree containing the output
virtual void setOwner(IDataHandleHolder *o)=0
virtual StatusCode sysInitialize() override
Override sysInitialize.
std::atomic< long int > m_eventsSeen
event counter
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< double > m_maxZ
Gaudi::Property< int > m_stepsZ
double m_fieldZR[3]
stores the 2d field components
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
StatusCode initialize(bool used=true)
DataObjIDColl m_extendedExtraObjects
Gaudi::Property< double > m_minZ
#define ATH_MSG_WARNING(x)
Gaudi::Property< double > m_maxR
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheKey
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
double m_field[3]
stores the field components
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
void getField(const double *ATH_RESTRICT xyz, double *ATH_RESTRICT bxyz, double *ATH_RESTRICT deriv=nullptr)
get B field value at given position xyz[3] is in mm, bxyz[3] is in kT if deriv[9] is given,...
Gaudi::Property< int > m_event
AthAlgorithm()
Default constructor:
double m_xyzt[4]
Variable to write out.
Gaudi::Property< std::string > m_histStream
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>