|
ATLAS Offline Software
|
#include <NswCalibDbAlg.h>
|
virtual | ~NswCalibDbAlg ()=default |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute (const EventContext &) const override |
|
virtual bool | isReEntrant () const override |
|
| AthReentrantAlgorithm (const std::string &name, ISvcLocator *pSvcLocator) |
| Constructor with parameters: More...
|
|
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 |
|
|
StatusCode | processTdoPdoData (const EventContext &ctx) const |
|
StatusCode | processThrData (const EventContext &ctx) const |
|
StatusCode | processNSWT0Data (const EventContext &ctx) const |
|
StatusCode | loadTimeChargeData (const EventContext &ctx, const readKey_t &readKey, const TimeChargeTech, const TimeChargeType type, writeHandleTdoPdo_t &writeHandle, NswCalibDbTimeChargeData *writeCdo) const |
|
StatusCode | loadThresholdData (const EventContext &, const readKey_t &, const ThresholdTech, writeHandleThr_t &, NswCalibDbThresholdData *) const |
|
StatusCode | loadT0ToTree (const EventContext &ctx, const readKey_t &readKey, writeHandleT0_t &writeHandle, std::unique_ptr< TTree > &tree) const |
|
StatusCode | loadT0Data (const std::unique_ptr< TTree > &tree, NswT0Data *writeCdo, const T0Tech tech) const |
|
bool | buildChannelId (Identifier &channelId, unsigned int elinkId, unsigned int vmm, unsigned int channel) const |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
|
Gaudi::Property< bool > | m_isData {this, "isData" , true , "Processing data"} |
|
ServiceHandle< ICondSvc > | m_condSvc {this, "CondSvc", "CondSvc"} |
|
ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
|
writeKeyTdoPdo_t | m_writeKey_tdopdo {this, "WriteKey_TdoPdo", "NswCalibDbTimeChargeData", "Key of output calibration data (TDOs and PDOs)" } |
|
writeKeyThr_t | m_writeKey_thr {this, "WriteKey_Thr" , "NswCalibDbThresholdData" , "Key of output calibration data (VMM thresholds)"} |
|
writeKeyMmT0_t | m_writeKey_nswT0 {this, "WriteKey_NswT0" , "NswT0Data" , "Key of output calibration data (NSW T0s)"} |
|
readKey_t | m_readKey_mm_sidea_tdo {this, "ReadKey_MM_SIDEA_TDO" , "/MDT/MM/TIME/SIDEA" , "Key of input MM condition data for side A data TDO"} |
|
readKey_t | m_readKey_mm_sidec_tdo {this, "ReadKey_MM_SIDEC_TDO" , "/MDT/MM/TIME/SIDEC" , "Key of input MM condition data for side C data TDO"} |
|
readKey_t | m_readKey_mm_sidea_pdo {this, "ReadKey_MM_SIDEA_PDO" , "/MDT/MM/CHARGE/SIDEA" , "Key of input MM condition data for side A data PDO"} |
|
readKey_t | m_readKey_mm_sidec_pdo {this, "ReadKey_MM_SIDEC_PDO" , "/MDT/MM/CHARGE/SIDEC" , "Key of input MM condition data for side C data PDO"} |
|
readKey_t | m_readKey_mm_sidea_thr {this, "ReadKey_MM_SIDEA_THR" , "/MDT/MM/THR/SIDEA" , "Key of input MM condition data for side A data THR"} |
|
readKey_t | m_readKey_mm_sidec_thr {this, "ReadKey_MM_SIDEC_THR" , "/MDT/MM/THR/SIDEC" , "Key of input MM condition data for side C data THR"} |
|
readKey_t | m_readKey_stgc_sidea_tdo {this, "ReadKey_STGC_SIDEA_TDO", "/TGC/NSW/TIME/SIDEA" , "Key of input sTGC condition data for side A data TDO"} |
|
readKey_t | m_readKey_stgc_sidec_tdo {this, "ReadKey_STGC_SIDEC_TDO", "/TGC/NSW/TIME/SIDEC" , "Key of input sTGC condition data for side C data TDO"} |
|
readKey_t | m_readKey_stgc_sidea_pdo {this, "ReadKey_STGC_SIDEA_PDO", "/TGC/NSW/CHARGE/SIDEA", "Key of input sTGC condition data for side A data PDO"} |
|
readKey_t | m_readKey_stgc_sidec_pdo {this, "ReadKey_STGC_SIDEC_PDO", "/TGC/NSW/CHARGE/SIDEC", "Key of input sTGC condition data for side C data PDO"} |
|
readKey_t | m_readKey_stgc_sidea_thr {this, "ReadKey_STGC_SIDEA_THR", "/TGC/NSW/THR/SIDEA" , "Key of input sTGC condition data for side A data THR"} |
|
readKey_t | m_readKey_stgc_sidec_thr {this, "ReadKey_STGC_SIDEC_THR", "/TGC/NSW/THR/SIDEC" , "Key of input sTGC condition data for side C data THR"} |
|
Gaudi::Property< bool > | m_loadMmT0Data {this, "loadMmT0Data", false, "Enable loading the sTgc T0Data"} |
|
Gaudi::Property< bool > | m_loadsTgcT0Data {this, "loadsTgcT0Data", false, "Enable loading the sTgcT0Data"} |
|
readKey_t | m_readKey_mm_t0 {this, "ReadKey_MM_T0", "" , "Key of input MM condition data for side A data T0"} |
|
readKey_t | m_readKey_stgc_t0 {this, "ReadKey_STGC_T0", "" , "Key of input sTGC condition data for side C data T0"} |
|
Gaudi::Property< std::string > | m_mmT0FilePath {this, "MmT0FileName", "", "Path to a file containing the MM T0 data, this will override the data from the conditions db"} |
|
Gaudi::Property< std::string > | m_stgcT0FilePath {this, "sTgcT0FileName", "", "Path to a file containing the sTGC T0 data, this will override the data from the conditions db"} |
|
DataObjIDColl | m_extendedExtraObjects |
| Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
|
|
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 35 of file NswCalibDbAlg.h.
◆ readKey_t
◆ StoreGateSvc_t
◆ T0Tech
◆ ThresholdTech
◆ TimeChargeTech
◆ TimeChargeType
◆ writeHandleT0_t
◆ writeHandleTdoPdo_t
◆ writeHandleThr_t
◆ writeKeyMmT0_t
◆ writeKeyTdoPdo_t
◆ writeKeyThr_t
◆ ~NswCalibDbAlg()
virtual NswCalibDbAlg::~NswCalibDbAlg |
( |
| ) |
|
|
virtualdefault |
◆ AthReentrantAlgorithm()
AthReentrantAlgorithm::AthReentrantAlgorithm |
Constructor with parameters:
Definition at line 90 of file AthReentrantAlgorithm.cxx.
30 std::make_unique<AthenaBaseComps::AthAlgorithmDHUpdate>
32 std::move (m_updateDataHandles));
◆ buildChannelId()
bool NswCalibDbAlg::buildChannelId |
( |
Identifier & |
channelId, |
|
|
unsigned int |
elinkId, |
|
|
unsigned int |
vmm, |
|
|
unsigned int |
channel |
|
) |
| const |
|
private |
Definition at line 493 of file NswCalibDbAlg.cxx.
502 std::unique_ptr<Muon::nsw::NSWResourceId> resId = std::make_unique<Muon::nsw::NSWResourceId>((
uint32_t) elinkId);
506 if(resId->
detId() == eformat::MUON_MMEGA_ENDCAP_A_SIDE || resId->
detId() == eformat::MUON_MMEGA_ENDCAP_C_SIDE) {
508 }
else if(resId->
detId() == eformat::MUON_STGC_ENDCAP_A_SIDE || resId->
detId() == eformat::MUON_STGC_ENDCAP_C_SIDE) {
511 ATH_MSG_ERROR(
"NSWResource Id "<< elinkId <<
" does not yield detID that is either sTGC or MMG");
512 THROW_EXCEPTION(
"NSWCalibDbAlg buildChannelId called with detID that is neither sTGC or MMG");
524 <<
" Station eta=" <<
static_cast <int> (
stationEta)
525 <<
" Station phi=" <<
static_cast <unsigned int> (
stationPhi)
526 <<
" Multilayer=" <<
static_cast <unsigned int> (
multiLayer)
527 <<
" Gas gap=" <<
static_cast <unsigned int> (
gasGap)
528 <<
" Channel type=" <<
static_cast <unsigned int> (channelType)
529 <<
" Channel Number=" << channelNumber );
533 if(resId->
detId() == eformat::MUON_MMEGA_ENDCAP_A_SIDE || resId->
detId() == eformat::MUON_MMEGA_ENDCAP_C_SIDE){
537 ATH_MSG_DEBUG(
"Could not extract valid channelId for MM elink "<<elinkId);
543 else if(resId->
detId() == eformat::MUON_STGC_ENDCAP_A_SIDE || resId->
detId() == eformat::MUON_STGC_ENDCAP_C_SIDE){
547 ATH_MSG_DEBUG(
"Could not extract valid channelId for STGC elink "<<elinkId);
◆ cardinality()
unsigned int AthReentrantAlgorithm::cardinality |
( |
| ) |
const |
|
overridevirtualinherited |
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 55 of file AthReentrantAlgorithm.cxx.
◆ 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 NswCalibDbAlg::execute |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtual |
◆ 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 & AthReentrantAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 79 of file AthReentrantAlgorithm.cxx.
86 return Algorithm::extraOutputDeps();
◆ filterPassed()
virtual bool AthReentrantAlgorithm::filterPassed |
( |
const EventContext & |
ctx | ) |
const |
|
inlinevirtualinherited |
◆ initialize()
StatusCode NswCalibDbAlg::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.
◆ isClonable()
bool AthReentrantAlgorithm::isClonable |
( |
| ) |
const |
|
overridevirtualinherited |
Specify if the algorithm is clonable.
Reentrant algorithms are clonable.
Reimplemented in Simulation::BeamEffectsAlg, InDet::SiTrackerSpacePointFinder, InDet::SCT_Clusterization, InDet::SiSPSeededTrackFinder, SCTRawDataProvider, InDet::GNNSeedingTrackMaker, SCT_PrepDataToxAOD, RoIBResultToxAOD, InDet::SiSPGNNTrackMaker, SCT_CablingCondAlgFromCoraCool, SCT_ReadCalibDataTestAlg, SCT_CablingCondAlgFromText, SCT_ReadCalibChipDataTestAlg, SCT_TestCablingAlg, SCT_ConfigurationConditionsTestAlg, ITkPixelCablingAlg, ITkStripCablingAlg, SCTEventFlagWriter, SCT_ConditionsSummaryTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_TdaqEnabledTestAlg, SCT_SiliconConditionsTestAlg, SCTSiLorentzAngleTestAlg, SCT_ByteStreamErrorsTestAlg, SCT_ConditionsParameterTestAlg, SCT_FlaggedConditionTestAlg, SCT_StripVetoTestAlg, SCT_RawDataToxAOD, and SCTSiPropertiesTestAlg.
Definition at line 44 of file AthReentrantAlgorithm.cxx.
◆ isReEntrant()
virtual bool NswCalibDbAlg::isReEntrant |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ loadT0Data()
StatusCode NswCalibDbAlg::loadT0Data |
( |
const std::unique_ptr< TTree > & |
tree, |
|
|
NswT0Data * |
writeCdo, |
|
|
const T0Tech |
tech |
|
) |
| const |
|
private |
Definition at line 281 of file NswCalibDbAlg.cxx.
284 tree->SetBranchAddress(
"sector" , §or );
285 tree->SetBranchAddress(
"layer" , &
layer );
287 tree->SetBranchAddress(
"mean" , &
time );
289 tree->SetBranchAddress(
"channel_type", &channelType);
296 for(
uint i_channel=0; i_channel<
tree->GetEntries(); i_channel++){
297 tree->GetEntry(i_channel);
306 std::string
stationName = (sector%2==1 ?
"MML" :
"MMS");
318 return StatusCode::FAILURE;
321 std::string
stationName = (sector%2==1 ?
"STL" :
"STS");
332 return StatusCode::FAILURE;
338 return StatusCode::SUCCESS;
◆ loadT0ToTree()
Definition at line 250 of file NswCalibDbAlg.cxx.
256 return StatusCode::FAILURE;
258 writeHandle.addDependency(readHandle);
259 ATH_MSG_DEBUG(
"Size of CondAttrListCollection " << readHandle.fullKey() <<
" readCdo->size()= " << readCdo->size());
260 ATH_MSG_DEBUG(
"Range of input is " << readHandle.getRange() <<
", range of output is " << writeHandle.getRange());
264 for(itr = readCdo->begin(); itr != readCdo->end(); ++itr) {
270 return StatusCode::FAILURE;
275 return StatusCode::FAILURE;
278 return StatusCode::SUCCESS;
◆ loadThresholdData()
Definition at line 345 of file NswCalibDbAlg.cxx.
352 return StatusCode::FAILURE;
354 writeHandle.addDependency(readHandle);
355 ATH_MSG_DEBUG(
"Size of CondAttrListCollection " << readHandle.fullKey() <<
" readCdo->size()= " << readCdo->size());
356 ATH_MSG_DEBUG(
"Range of input is " << readHandle.getRange() <<
", range of output is " << writeHandle.getRange());
360 unsigned int nObjs = 0;
361 for(itr = readCdo->begin(); itr != readCdo->end(); ++itr) {
367 return StatusCode::FAILURE;
370 std::unique_ptr<TTree>
tree;
373 return StatusCode::FAILURE;
377 unsigned int elinkId{0}, vmm{0},
channel{0};
379 tree->SetBranchAddress(
"vmm" , &vmm );
381 tree->SetBranchAddress(
"elinkId" , &elinkId );
385 unsigned int nChns = 0;
386 for(
unsigned int iEvt=0; iEvt<
tree->GetEntries(); ++iEvt){
387 tree->GetEntry(iEvt);
390 ATH_MSG_DEBUG(
"Could not find valid channelId for elink "<<elinkId<<
" This is either caused by calibration data of a channel that is known to be not connected to the detector or might point to some issues in the identifier used for the calibration constants");
406 return StatusCode::SUCCESS;
◆ loadTimeChargeData()
Definition at line 413 of file NswCalibDbAlg.cxx.
420 return StatusCode::FAILURE;
422 writeHandle.addDependency(readHandle);
423 ATH_MSG_DEBUG(
"Size of CondAttrListCollection " << readHandle.fullKey() <<
" readCdo->size()= " << readCdo->size());
424 ATH_MSG_DEBUG(
"Range of input is " << readHandle.getRange() <<
", range of output is " << writeHandle.getRange());
428 unsigned int nObjs = 0;
429 for(itr = readCdo->begin(); itr != readCdo->end(); ++itr) {
435 return StatusCode::FAILURE;
438 std::unique_ptr<TTree>
tree;
441 return StatusCode::FAILURE;
444 unsigned int elinkId{0}, vmm{0},
channel{0};
445 float slope{0}, intercept{0};
448 tree->SetBranchAddress(
"vmm" , &vmm );
450 tree->SetBranchAddress(
"elinkId" , &elinkId );
451 tree->SetBranchAddress(
"slope" , &slope );
453 tree->SetBranchAddress(
"intercept" , &intercept );
458 unsigned int nChns = 0;
459 for(
unsigned int iEvt=0; iEvt<
tree->GetEntries(); ++iEvt){
460 tree->GetEntry(iEvt);
463 ATH_MSG_DEBUG(
"Could not find valid channelId for elink "<<elinkId<<
" This is either caused by calibration data of a channel that is known to be not connected to the detector or might point to some issues in the identifier used for the calibration constants");
468 calib_data.
slope = slope;
470 calib_data.intercept = intercept;
487 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.
◆ processNSWT0Data()
StatusCode NswCalibDbAlg::processNSWT0Data |
( |
const EventContext & |
ctx | ) |
const |
|
private |
Definition at line 177 of file NswCalibDbAlg.cxx.
180 if (wrHdl.isValid()) {
181 ATH_MSG_DEBUG(
"CondHandle " << wrHdl.fullKey() <<
" is already valid."
182 <<
" In theory this should not be called, but may happen"
183 <<
" if multiple concurrent events are being processed out of order.");
184 return StatusCode::SUCCESS;
186 ATH_MSG_DEBUG(
"Range of MmT0 output is " << wrHdl.getRange());
187 std::unique_ptr<NswT0Data> wrCdo{std::make_unique<NswT0Data>(
m_idHelperSvc.get())};
195 return StatusCode::FAILURE;
197 std::unique_ptr<TTree>
tree{(TTree*)
file->Get(
"tree_ch")};
199 ATH_MSG_FATAL(
"Failed to load tree containing the NswT0Data.");
200 return StatusCode::FAILURE;
206 std::unique_ptr<TTree>
tree;
211 ATH_MSG_ERROR(
"Neither a database folder nor a file have been provided to read the MM T0 constants");
212 return StatusCode::FAILURE;
222 return StatusCode::FAILURE;
224 std::unique_ptr<TTree>
tree{(TTree*)
file->Get(
"tree_ch")};
226 ATH_MSG_FATAL(
"Failed to load tree containing the NswT0Data.");
227 return StatusCode::FAILURE;
233 std::unique_ptr<TTree>
tree;
238 ATH_MSG_ERROR(
"Neither a database folder nor a file have been provided to read the sTGC T0 constants");
239 return StatusCode::FAILURE;
244 ATH_CHECK(wrHdl.record(std::move(wrCdo)));
245 ATH_MSG_DEBUG(
"Recorded new " << wrHdl.key() <<
" with range " << wrHdl.getRange() <<
" into Conditions Store");
247 return StatusCode::SUCCESS;
◆ processTdoPdoData()
StatusCode NswCalibDbAlg::processTdoPdoData |
( |
const EventContext & |
ctx | ) |
const |
|
private |
Definition at line 78 of file NswCalibDbAlg.cxx.
82 if (wrHdl.isValid()) {
83 ATH_MSG_DEBUG(
"CondHandle " << wrHdl.fullKey() <<
" is already valid."
84 <<
" In theory this should not be called, but may happen"
85 <<
" if multiple concurrent events are being processed out of order.");
86 return StatusCode::SUCCESS;
88 ATH_MSG_DEBUG(
"Range of time/charge output is " << wrHdl.getRange());
89 std::unique_ptr<NswCalibDbTimeChargeData> wrCdo{std::make_unique<NswCalibDbTimeChargeData>(
m_idHelperSvc.get())};
120 if (wrHdl.record(std::move(wrCdo)).isFailure()) {
122 <<
" with EventRange " << wrHdl.getRange()
123 <<
" into Conditions Store");
124 return StatusCode::FAILURE;
126 ATH_MSG_DEBUG(
"Recorded new " << wrHdl.key() <<
" with range " << wrHdl.getRange() <<
" into Conditions Store");
128 return StatusCode::SUCCESS;
◆ processThrData()
StatusCode NswCalibDbAlg::processThrData |
( |
const EventContext & |
ctx | ) |
const |
|
private |
Definition at line 135 of file NswCalibDbAlg.cxx.
137 if(
m_isData)
return StatusCode::SUCCESS;
141 if (wrHdl.isValid()) {
142 ATH_MSG_DEBUG(
"CondHandle " << wrHdl.fullKey() <<
" is already valid."
143 <<
" In theory this should not be called, but may happen"
144 <<
" if multiple concurrent events are being processed out of order.");
145 return StatusCode::SUCCESS;
147 ATH_MSG_DEBUG(
"Range of threshold output is " << wrHdl.getRange());
148 std::unique_ptr<NswCalibDbThresholdData> wrCdo{std::make_unique<NswCalibDbThresholdData>(
m_idHelperSvc.get())};
164 if (wrHdl.record(std::move(wrCdo)).isFailure()) {
166 <<
" with EventRange " << wrHdl.getRange()
167 <<
" into Conditions Store");
168 return StatusCode::FAILURE;
170 ATH_MSG_DEBUG(
"Recorded new " << wrHdl.key() <<
" with range " << wrHdl.getRange() <<
" into Conditions Store");
172 return StatusCode::SUCCESS;
◆ renounce()
◆ renounceArray()
◆ setFilterPassed()
virtual void AthReentrantAlgorithm::setFilterPassed |
( |
bool |
state, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
inlinevirtualinherited |
◆ sysExecute()
StatusCode AthReentrantAlgorithm::sysExecute |
( |
const EventContext & |
ctx | ) |
|
|
overridevirtualinherited |
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 67 of file AthReentrantAlgorithm.cxx.
69 return Gaudi::Algorithm::sysExecute (ctx);
◆ sysInitialize()
StatusCode AthReentrantAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
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 96 of file AthReentrantAlgorithm.cxx.
107 if ( cs.retrieve().isFailure() ) {
109 return StatusCode::SUCCESS;
111 if (cs->regHandle(
this,*
h).isFailure()) {
112 sc = StatusCode::FAILURE;
113 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_condSvc
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects |
|
privateinherited |
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 153 of file AthReentrantAlgorithm.h.
◆ m_idHelperSvc
◆ m_isData
Gaudi::Property<bool> NswCalibDbAlg::m_isData {this, "isData" , true , "Processing data"} |
|
private |
◆ m_loadMmT0Data
Gaudi::Property<bool> NswCalibDbAlg::m_loadMmT0Data {this, "loadMmT0Data", false, "Enable loading the sTgc T0Data"} |
|
private |
◆ m_loadsTgcT0Data
Gaudi::Property<bool> NswCalibDbAlg::m_loadsTgcT0Data {this, "loadsTgcT0Data", false, "Enable loading the sTgcT0Data"} |
|
private |
◆ m_mmT0FilePath
Gaudi::Property<std::string> NswCalibDbAlg::m_mmT0FilePath {this, "MmT0FileName", "", "Path to a file containing the MM T0 data, this will override the data from the conditions db"} |
|
private |
◆ m_readKey_mm_sidea_pdo
readKey_t NswCalibDbAlg::m_readKey_mm_sidea_pdo {this, "ReadKey_MM_SIDEA_PDO" , "/MDT/MM/CHARGE/SIDEA" , "Key of input MM condition data for side A data PDO"} |
|
private |
◆ m_readKey_mm_sidea_tdo
readKey_t NswCalibDbAlg::m_readKey_mm_sidea_tdo {this, "ReadKey_MM_SIDEA_TDO" , "/MDT/MM/TIME/SIDEA" , "Key of input MM condition data for side A data TDO"} |
|
private |
◆ m_readKey_mm_sidea_thr
readKey_t NswCalibDbAlg::m_readKey_mm_sidea_thr {this, "ReadKey_MM_SIDEA_THR" , "/MDT/MM/THR/SIDEA" , "Key of input MM condition data for side A data THR"} |
|
private |
◆ m_readKey_mm_sidec_pdo
readKey_t NswCalibDbAlg::m_readKey_mm_sidec_pdo {this, "ReadKey_MM_SIDEC_PDO" , "/MDT/MM/CHARGE/SIDEC" , "Key of input MM condition data for side C data PDO"} |
|
private |
◆ m_readKey_mm_sidec_tdo
readKey_t NswCalibDbAlg::m_readKey_mm_sidec_tdo {this, "ReadKey_MM_SIDEC_TDO" , "/MDT/MM/TIME/SIDEC" , "Key of input MM condition data for side C data TDO"} |
|
private |
◆ m_readKey_mm_sidec_thr
readKey_t NswCalibDbAlg::m_readKey_mm_sidec_thr {this, "ReadKey_MM_SIDEC_THR" , "/MDT/MM/THR/SIDEC" , "Key of input MM condition data for side C data THR"} |
|
private |
◆ m_readKey_mm_t0
readKey_t NswCalibDbAlg::m_readKey_mm_t0 {this, "ReadKey_MM_T0", "" , "Key of input MM condition data for side A data T0"} |
|
private |
◆ m_readKey_stgc_sidea_pdo
readKey_t NswCalibDbAlg::m_readKey_stgc_sidea_pdo {this, "ReadKey_STGC_SIDEA_PDO", "/TGC/NSW/CHARGE/SIDEA", "Key of input sTGC condition data for side A data PDO"} |
|
private |
◆ m_readKey_stgc_sidea_tdo
readKey_t NswCalibDbAlg::m_readKey_stgc_sidea_tdo {this, "ReadKey_STGC_SIDEA_TDO", "/TGC/NSW/TIME/SIDEA" , "Key of input sTGC condition data for side A data TDO"} |
|
private |
◆ m_readKey_stgc_sidea_thr
readKey_t NswCalibDbAlg::m_readKey_stgc_sidea_thr {this, "ReadKey_STGC_SIDEA_THR", "/TGC/NSW/THR/SIDEA" , "Key of input sTGC condition data for side A data THR"} |
|
private |
◆ m_readKey_stgc_sidec_pdo
readKey_t NswCalibDbAlg::m_readKey_stgc_sidec_pdo {this, "ReadKey_STGC_SIDEC_PDO", "/TGC/NSW/CHARGE/SIDEC", "Key of input sTGC condition data for side C data PDO"} |
|
private |
◆ m_readKey_stgc_sidec_tdo
readKey_t NswCalibDbAlg::m_readKey_stgc_sidec_tdo {this, "ReadKey_STGC_SIDEC_TDO", "/TGC/NSW/TIME/SIDEC" , "Key of input sTGC condition data for side C data TDO"} |
|
private |
◆ m_readKey_stgc_sidec_thr
readKey_t NswCalibDbAlg::m_readKey_stgc_sidec_thr {this, "ReadKey_STGC_SIDEC_THR", "/TGC/NSW/THR/SIDEC" , "Key of input sTGC condition data for side C data THR"} |
|
private |
◆ m_readKey_stgc_t0
readKey_t NswCalibDbAlg::m_readKey_stgc_t0 {this, "ReadKey_STGC_T0", "" , "Key of input sTGC condition data for side C data T0"} |
|
private |
◆ m_stgcT0FilePath
Gaudi::Property<std::string> NswCalibDbAlg::m_stgcT0FilePath {this, "sTgcT0FileName", "", "Path to a file containing the sTGC T0 data, this will override the data from the conditions db"} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_writeKey_nswT0
◆ m_writeKey_tdopdo
◆ m_writeKey_thr
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
void setData(CalibDataType type, const Identifier &chnlId, CalibConstants constants)
constexpr uint8_t stationPhi
station Phi 1 to 8
StatusCode loadThresholdData(const EventContext &, const readKey_t &, const ThresholdTech, writeHandleThr_t &, NswCalibDbThresholdData *) const
Helper struct to cache all calibration constants in a common place of the memory.
uint8_t multi_layer() const
readKey_t m_readKey_stgc_sidea_tdo
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
virtual StatusCode initialize() override
StatusCode processTdoPdoData(const EventContext &ctx) const
readKey_t m_readKey_stgc_sidea_pdo
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)
Gaudi::Property< std::string > m_stgcT0FilePath
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
readKey_t m_readKey_mm_sidec_tdo
Gaudi::Property< bool > m_loadsTgcT0Data
int8_t station_eta() const
#define ATH_MSG_VERBOSE(x)
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
#define THROW_EXCEPTION(MSG)
bool empty() const
Test if the key is blank.
This class is a collection of AttributeLists where each one is associated with a channel number....
bool buildChannelId(Identifier &channelId, unsigned int elinkId, unsigned int vmm, unsigned int channel) const
virtual void setOwner(IDataHandleHolder *o)=0
void setZero(CalibDataType type, MuonCond::CalibTechType tech, CalibConstants constants)
readKey_t m_readKey_stgc_t0
writeKeyMmT0_t m_writeKey_nswT0
void setData(const Identifier &, const float)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
StatusCode loadT0ToTree(const EventContext &ctx, const readKey_t &readKey, writeHandleT0_t &writeHandle, std::unique_ptr< TTree > &tree) const
writeKeyThr_t m_writeKey_thr
::StatusCode StatusCode
StatusCode definition for legacy code.
bool is_large_station() const
uint8_t station_phi() const
readKey_t m_readKey_stgc_sidec_tdo
SG::WriteCondHandle< NswT0Data > writeHandleT0_t
readKey_t m_readKey_mm_sidea_tdo
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
readKey_t m_readKey_mm_sidec_thr
bool readBlobAsTTree(const coral::Blob &, std::unique_ptr< TTree > &)
readKey_t m_readKey_stgc_sidec_pdo
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Gaudi::Property< bool > m_isData
StatusCode loadTimeChargeData(const EventContext &ctx, const readKey_t &readKey, const TimeChargeTech, const TimeChargeType type, writeHandleTdoPdo_t &writeHandle, NswCalibDbTimeChargeData *writeCdo) const
Gaudi::Property< bool > m_loadMmT0Data
virtual StatusCode sysInitialize() override
Override sysInitialize.
StatusCode initialize(bool used=true)
Gaudi::Property< std::string > m_mmT0FilePath
readKey_t m_readKey_mm_t0
readKey_t m_readKey_mm_sidea_pdo
def time(flags, cells_name, *args, **kw)
writeKeyTdoPdo_t m_writeKey_tdopdo
readKey_t m_readKey_stgc_sidec_thr
#define ATH_MSG_WARNING(x)
ChanAttrListMap::const_iterator const_iterator
void setData(const Identifier &channelId, const float channelT0)
void setZero(ThrsldTechType, const float)
StatusCode processNSWT0Data(const EventContext &ctx) const
readKey_t m_readKey_stgc_sidea_thr
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
StatusCode processThrData(const EventContext &ctx) const
static EventIDRange infiniteTime()
Produces an EventIDRange that is inifinite in Time and invalid in RunLumi.
constexpr uint8_t stationEta
1 to 3
readKey_t m_readKey_mm_sidea_thr
ServiceHandle< ICondSvc > m_condSvc
StatusCode loadT0Data(const std::unique_ptr< TTree > &tree, NswT0Data *writeCdo, const T0Tech tech) const
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
readKey_t m_readKey_mm_sidec_pdo