Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Algorithm to test the validity of the MDT cabling.
More...
#include <MdtCablingTestAlg.h>
|
| MdtCablingTestAlg (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~MdtCablingTestAlg ()=default |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute () override |
|
virtual unsigned int | cardinality () const 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 |
|
|
ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
|
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > | m_DetectorManagerKey |
|
SG::ReadCondHandleKey< MuonMDT_CablingMap > | m_cablingKey {this, "WriteKey", "MuonMDT_CablingMap", "Key of input MDT cabling map"} |
|
SG::ReadCondHandleKey< MdtCondDbData > | m_deadChanKey {this, "ReadKey", "MdtCondDbData", "Key of MdtCondDbData"} |
|
Gaudi::Property< std::string > | m_dumpFile {this, "DumpMap", "" , "Text file to which every cabling channel is dumped"} |
|
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 |
|
Algorithm to test the validity of the MDT cabling.
Definition at line 21 of file MdtCablingTestAlg.h.
◆ CablingData
◆ StoreGateSvc_t
◆ MdtCablingTestAlg()
MdtCablingTestAlg::MdtCablingTestAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~MdtCablingTestAlg()
virtual MdtCablingTestAlg::~MdtCablingTestAlg |
( |
| ) |
|
|
virtualdefault |
◆ cardinality()
virtual unsigned int MdtCablingTestAlg::cardinality |
( |
| ) |
const |
|
inlinefinaloverridevirtual |
◆ 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 MdtCablingTestAlg::execute |
( |
| ) |
|
|
overridevirtual |
Test the online -> offline conversion
Test the shift by n channels
Create the cabling object
Test if the online channel can be found
Test if the online channel can be transformed back
Reset the offline cabling
Reset the offline cabling again
Test whether the online module can be decoded successfully
There might be channels sitting on the same CSM but on differnt stations
Definition at line 23 of file MdtCablingTestAlg.cxx.
24 const EventContext& ctx = Gaudi::Hive::currentContext();
25 std::unique_ptr<std::fstream> f_dump = !
m_dumpFile.value().empty() ?
32 for (
unsigned i = 0 ;
i < staggering.size(); ++
i){
33 staggering[
i] = (staggering.size() -1) -
i;
35 for (
unsigned i = 0 ;
i < staggering.size() ;
i+=2){
38 for (
unsigned nLay : {3,4}){
40 if (!testCard.checkConsistency(msgStream()))
return StatusCode::FAILURE;
43 for (
unsigned ch = 0 ;
ch < staggering.size() ; ++
ch) {
44 OffChnl off = testCard.offlineTube(
ch, msgStream());
47 return StatusCode::FAILURE;
49 unsigned back_ch = testCard.tdcChannel(off.layer, off.tube +1 , msgStream());
52 <<
static_cast<int>(off.layer)<<
","
53 <<
static_cast<int>(off.tube +1)<<
" and then back to "
55 return StatusCode::FAILURE;
59 for (
unsigned lay = 1 ; lay <= nLay ; ++lay) {
60 for (
unsigned int tube = 1 ;
tube <= testCard.numTubesPerLayer() ; ++
tube) {
61 const unsigned ch1 = testCard.tdcChannel(lay,
tube,msgStream());
62 const unsigned ch2 = testCard.tdcChannel(lay,
tube + testCard.numTubesPerLayer(),msgStream());
66 <<
" leads to 2 different answers "<<ch1<<
" vs. "<<ch2);
67 return StatusCode::FAILURE;
75 if (!detectorMgr.isValid()){
77 return StatusCode::FAILURE;
83 return StatusCode::FAILURE;
89 if (!deadChanHandle.isValid()) {
91 return StatusCode::FAILURE;
93 deadChan = deadChanHandle.cptr();
98 unsigned int n_elements{0}, n_success{0};
108 if (deadChan && !deadChan->isGoodChamber(readEle->
identify())) {
115 bool is_valid{
false};
121 if (deadChan && !deadChan->isGood(
tube_id)) {
171 if (!
cabling->getOnlineId(mrod_module,msgStream())){
184 ATH_MSG_INFO( n_success<<
" out of "<<n_elements<<
" channels were successfully validated.");
185 return failure ? StatusCode::FAILURE: 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 MdtCablingTestAlg::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_cablingKey
◆ m_deadChanKey
◆ m_DetectorManagerKey
Initial value:{this, "DetectorManagerKey", "MuonDetectorManager",
"Key of input MuonDetectorManager condition data"}
Definition at line 34 of file MdtCablingTestAlg.h.
◆ m_detStore
◆ m_dumpFile
Gaudi::Property<std::string> MdtCablingTestAlg::m_dumpFile {this, "DumpMap", "" , "Text file to which every cabling channel is dumped"} |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_idHelperSvc
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
int getNLayers() const
Returns the number of tube layers inside the multilayer.
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
const_id_iterator detectorElement_begin() const
Iterators over full set of ids.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::array< uint8_t, 24 > Mapping
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
const_id_iterator detectorElement_end() const
#define ATH_MSG_VERBOSE(x)
bool empty() const
Test if the key is blank.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
virtual void setOwner(IDataHandleHolder *o)=0
MdtMezzanineCard - Helper struct to represent the structure of a mezzanine card in a consistent way E...
SG::ReadCondHandleKey< MuonMDT_CablingMap > m_cablingKey
virtual StatusCode sysInitialize() override
Override sysInitialize.
Split the offline part of the cabling apart to use it later for sorting.
Helper struct to pipe the result from the tdc -> offline channel translation.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
#define ATH_MSG_ALWAYS(x)
int getMultilayer() const
Returns the multilayer represented by the readout element.
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
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int tubeLayer, int tube) const
StatusCode initialize(bool used=true)
DataObjIDColl m_extendedExtraObjects
Identifier elementID(int stationName, int stationEta, int stationPhi) const
#define ATH_MSG_WARNING(x)
SG::ReadCondHandleKey< MdtCondDbData > m_deadChanKey
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
AthAlgorithm()
Default constructor:
Gaudi::Property< std::string > m_dumpFile
int getNtubesperlayer() const
Returns the number of tubes in each tube layer.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>