Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
NB: this sTGC class follows the naming convention from the sTGC detector code base hence the non-standard naming convention sTGC rather than STGC etc.
More...
#include <sTGC_RegSelCondAlg.h>
|
| sTGC_RegSelCondAlg (const std::string &name, ISvcLocator *pSvcLocator) |
| sTGC naming convention headers More...
|
|
std::unique_ptr< RegSelSiLUT > | createTable (const EventContext &ctx, EventIDRange &id_range) const override |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute (const EventContext &ctx) const override |
|
virtual bool | isReEntrant () const override final |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual bool | isClonable () const override |
| Specify if the algorithm is clonable. More...
|
|
virtual unsigned int | cardinality () const override |
| Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
|
|
virtual StatusCode | sysExecute (const EventContext &ctx) override |
| Execute an algorithm. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
virtual bool | filterPassed (const EventContext &ctx) const |
|
virtual void | setFilterPassed (bool state, const EventContext &ctx) const |
|
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 |
|
NB: this sTGC class follows the naming convention from the sTGC detector code base hence the non-standard naming convention sTGC rather than STGC etc.
Definition at line 21 of file sTGC_RegSelCondAlg.h.
◆ StoreGateSvc_t
◆ sTGC_RegSelCondAlg()
sTGC_RegSelCondAlg::sTGC_RegSelCondAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ cardinality()
Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
Override this to return 0 for reentrant algorithms.
Override this to return 0 for reentrant algorithms.
Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.
◆ createTable()
std::unique_ptr< RegSelSiLUT > sTGC_RegSelCondAlg::createTable |
( |
const EventContext & |
ctx, |
|
|
EventIDRange & |
id_range |
|
) |
| const |
|
overridevirtual |
we want the module context ...
store the robId
Implements MuonRegSelCondAlg.
Definition at line 45 of file sTGC_RegSelCondAlg.cxx.
49 if( !
manager.range( id_range ) ) {
56 std::vector<Identifier>::const_iterator idfirst =
helper->module_begin();
57 std::vector<Identifier>::const_iterator idlast =
helper->module_end();
67 for ( std::vector<Identifier>::const_iterator
i=idfirst ;
i!=idlast ; ++
i ) {
72 helper->get_hash( Id, hashId, &ModuleContext );
82 int multilayer =
helper->multilayer(Id);
98 double moduleR = std::sqrt( sTgcPos.mag()*sTgcPos.mag() - sTgcPos.z()*sTgcPos.z());
103 double rmin = moduleR-0.5*
length;
104 double rmax = std::sqrt( (moduleR+0.5*
length)*(moduleR+0.5*
length) + lwidth*lwidth/4 );
109 double dphi = ( dphi1 > dphi2 ? dphi1 : dphi2 );
112 double rcutout = moduleR+0.5*
length - ycutout;
113 double dphicutout =
std::atan( (0.5*lwidth)/rcutout );
114 if ( dphi < dphicutout ) dphi = dphicutout;
117 double phimin = sTgcPos.phi()-dphi;
118 double phimax = sTgcPos.phi()+dphi;
120 if ( phimin >
M_PI ) phimin -= 2*
M_PI;
121 if ( phimin < -
M_PI ) phimin += 2*
M_PI;
123 int layerid = multilayer;
124 int detid = (
side ==
'C' ? -1 : 1 );
128 for(
uint32_t robId : robIdHelper.get_ids()){
◆ 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);
◆ 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.
◆ 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.
◆ 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 MuonRegSelCondAlg::execute |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtualinherited |
do stuff here ...
inpractice, this should never be called, although in serial athena,
because the implementation of the conditions behaviour is flawed in
the framework, this routine will be called every event (!) regardless
of whether it should be called or not so we need this check to
prevent unecessary code execution on out our side
create the new lookup table
create the conditions data for storage
leave this commented here since this is where it should really be, but we had to move it up in the code to handle the flawed conditions handling in the serial athena use case SG::WriteCondHandle<IRegSelLUTCondData> lutCondData( m_tableKey, ctx );
Definition at line 46 of file MuonRegSelCondAlg.cxx.
54 if (lutCondData.isValid()) {
60 ATH_MSG_DEBUG(
"CondHandle " << lutCondData.fullKey() <<
" is already valid." );
61 return StatusCode::SUCCESS;
66 EventIDRange id_range;
68 std::unique_ptr<IRegSelLUT> rd =
createTable( ctx, id_range );
70 if ( !rd )
return StatusCode::FAILURE;
77 if (
const auto *
lut =
dynamic_cast<const RegSelSiLUT*
>(rd.get())) {
91 if( lutCondData.record( id_range, rcd ).isFailure() ) {
93 <<
" " << lutCondData.key()
94 <<
" with range " << id_range );
95 return StatusCode::FAILURE;
101 return StatusCode::FAILURE;
107 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()
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.
◆ filterPassed()
◆ initialize()
StatusCode MuonRegSelCondAlg::initialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ 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.
◆ isClonable()
◆ isReEntrant()
virtual bool MuonRegSelCondAlg::isReEntrant |
( |
| ) |
const |
|
inlinefinaloverridevirtualinherited |
◆ 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()
◆ setFilterPassed()
◆ sysExecute()
Execute an algorithm.
We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.
Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.
◆ sysInitialize()
Override sysInitialize.
Override sysInitialize from the base class.
Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc
Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc
Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.
Reimplemented in InputMakerBase, and HypoBase.
Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.
110 if (
sc.isFailure()) {
118 if ( cs.retrieve().isFailure() ) {
120 return StatusCode::SUCCESS;
122 if (cs->regHandle(
this,*
h).isFailure()) {
123 sc = StatusCode::FAILURE;
124 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ 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_detMgrKey
Initial value:{
this, "DetectorManagerKey", "MuonDetectorManager",
"Key of input MuonDetectorManager condition data"}
MuonDetectorManager from the conditions store.
Definition at line 46 of file MuonRegSelCondAlg.h.
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 114 of file AthCommonReentrantAlgorithm.h.
◆ m_mangerName
Gaudi::Property<std::string> MuonRegSelCondAlg::m_mangerName {this, "ManagerName", "", "Property no where used"} |
|
privateinherited |
◆ m_printTable
Gaudi::Property<bool> MuonRegSelCondAlg::m_printTable {this, "PrintTable", false} |
|
privateinherited |
◆ m_tableKey
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
constexpr uint8_t stationPhi
station Phi 1 to 8
@ depth
pointing depth of the shower as calculated in egammaqgcld
virtual const Amg::Vector3D & center() const override
Return the center of the element.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
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)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
double getLongSsize() const
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_detMgrKey
MuonDetectorManager from the conditions store.
constexpr auto lut(Generator &&f)
virtual void setOwner(IDataHandleHolder *o)=0
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
const std::string & getStationName() const
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
An sTgcReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station c...
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
MuonRegSelCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Gaudi::Property< bool > m_printTable
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
SG::WriteCondHandleKey< IRegSelLUTCondData > m_tableKey
Output conditions object.
StatusCode initialize(bool used=true)
Eigen::Matrix< double, 3, 1 > Vector3D
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual StatusCode sysInitialize() override
Override sysInitialize.
const MuonPadDesign * getPadDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
constexpr uint8_t stationEta
1 to 3
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
int getStationPhi() const
int getStationEta() const
virtual std::unique_ptr< RegSelSiLUT > createTable(const EventContext &ctx, EventIDRange &id_range) const =0
RegSelCondData< IRegSelLUT > IRegSelLUTCondData