ATLAS Offline Software
Loading...
Searching...
No Matches
NswCalibDbAlg Class Reference

#include <NswCalibDbAlg.h>

Inheritance diagram for NswCalibDbAlg:
Collaboration diagram for NswCalibDbAlg:

Public Member Functions

virtual ~NswCalibDbAlg ()=default
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &) const override
virtual bool isReEntrant () const override
 Avoid scheduling algorithm multiple times.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
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.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

using writeKeyTdoPdo_t = SG::WriteCondHandleKey<NswCalibDbTimeChargeData>
using writeKeyThr_t = SG::WriteCondHandleKey<NswCalibDbThresholdData >
using writeKeyMmT0_t = SG::WriteCondHandleKey<NswT0Data>
using readKey_t = SG::ReadCondHandleKey<CondAttrListCollection>
using writeHandleTdoPdo_t = SG::WriteCondHandle<NswCalibDbTimeChargeData>
using writeHandleThr_t = SG::WriteCondHandle<NswCalibDbThresholdData >
using writeHandleT0_t = SG::WriteCondHandle<NswT0Data>
using TimeChargeType = NswCalibDbTimeChargeData::CalibDataType
using TimeChargeTech = MuonCond::CalibTechType
using ThresholdTech = NswCalibDbThresholdData::ThrsldTechType
using T0Tech = MuonCond::CalibTechType
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

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, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

Gaudi::Property< bool > m_isData {this, "isData" , true, "Processing data"}
Gaudi::Property< bool > m_processThresholds {this, "processThresholds", false, "Process threshold data"}
ServiceHandle< ICondSvc > m_condSvc {this, "CondSvc", "CondSvc"}
ServiceHandle< Muon::IMuonIdHelperSvcm_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.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 35 of file NswCalibDbAlg.h.

Member Typedef Documentation

◆ readKey_t

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

◆ T0Tech

Definition at line 67 of file NswCalibDbAlg.h.

◆ ThresholdTech

◆ TimeChargeTech

Definition at line 61 of file NswCalibDbAlg.h.

◆ TimeChargeType

◆ writeHandleT0_t

Definition at line 54 of file NswCalibDbAlg.h.

◆ writeHandleTdoPdo_t

◆ writeHandleThr_t

◆ writeKeyMmT0_t

◆ writeKeyTdoPdo_t

◆ writeKeyThr_t

Constructor & Destructor Documentation

◆ ~NswCalibDbAlg()

virtual NswCalibDbAlg::~NswCalibDbAlg ( )
virtualdefault

Member Function Documentation

◆ 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.

493 {
494
495 // return dummy Identifier
496 if(elinkId==0){
497 channelId = Identifier(0);
498 return true;
499 }
500
501 // build NSWOfflineHelper
502 std::unique_ptr<Muon::nsw::NSWResourceId> resId = std::make_unique<Muon::nsw::NSWResourceId>((uint32_t) elinkId);
503 Muon::nsw::helper::NSWOfflineHelper helper(resId.get(), vmm, channel);
504
505 std::string stationName;
506 if(resId->detId() == eformat::MUON_MMEGA_ENDCAP_A_SIDE || resId->detId() == eformat::MUON_MMEGA_ENDCAP_C_SIDE) {
507 stationName = resId->is_large_station () ? "MML" : "MMS";
508 } else if(resId->detId() == eformat::MUON_STGC_ENDCAP_A_SIDE || resId->detId() == eformat::MUON_STGC_ENDCAP_C_SIDE) {
509 stationName = resId->is_large_station () ? "STL" : "STS";
510 } else {
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");
513 }
514
515 int8_t stationEta = resId->station_eta ();
516 uint8_t stationPhi = resId->station_phi ();
517 uint8_t multiLayer = resId->multi_layer ();
518 uint8_t gasGap = resId->gas_gap ();
519
520 uint8_t channelType = helper.channel_type ();
521 uint16_t channelNumber = helper.channel_number();
522
523 ATH_MSG_VERBOSE("Station name=" << stationName
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 );
530
531
532 // MM
533 if(resId->detId() == eformat::MUON_MMEGA_ENDCAP_A_SIDE || resId->detId() == eformat::MUON_MMEGA_ENDCAP_C_SIDE){
534 bool isValid {false};
535 Identifier chnlId = m_idHelperSvc->mmIdHelper().channelID(stationName, static_cast<int>(stationEta), static_cast<int>(stationPhi), static_cast<int>(multiLayer), static_cast<int>(gasGap), static_cast<int>(channelNumber), isValid);
536 if(!isValid){
537 ATH_MSG_DEBUG("Could not extract valid channelId for MM elink "<<elinkId);
538 return false;
539 }
540 channelId = chnlId;
541 }
542 // sTGC
543 else if(resId->detId() == eformat::MUON_STGC_ENDCAP_A_SIDE || resId->detId() == eformat::MUON_STGC_ENDCAP_C_SIDE){
544 bool isValid {false};
545 Identifier chnlId = m_idHelperSvc->stgcIdHelper().channelID(stationName, static_cast<int>(stationEta), static_cast<int>(stationPhi), static_cast<int>(multiLayer), static_cast<int>(gasGap), static_cast<int>(channelType), static_cast<int>(channelNumber), isValid);
546 if(!isValid){
547 ATH_MSG_DEBUG("Could not extract valid channelId for STGC elink "<<elinkId);
548 return false;
549 }
550 channelId = chnlId;
551 }
552
553 return true;
554}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition AtlasPID.h:878
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
constexpr uint8_t stationPhi
station Phi 1 to 8
setWord1 uint16_t
#define THROW_EXCEPTION(MESSAGE)
Definition throwExcept.h:10

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::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.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode NswCalibDbAlg::execute ( const EventContext & ctx) const
overridevirtual

Definition at line 64 of file NswCalibDbAlg.cxx.

64 {
65
66 ATH_MSG_DEBUG( "execute " << name() );
67
68 if(processTdoPdoData(ctx).isFailure()) return StatusCode::FAILURE;
69 if(processThrData (ctx).isFailure()) return StatusCode::FAILURE;
71
72 return StatusCode::SUCCESS;
73
74}
#define ATH_CHECK
Evaluate an expression and check for errors.
Gaudi::Property< bool > m_loadsTgcT0Data
Gaudi::Property< bool > m_loadMmT0Data
StatusCode processThrData(const EventContext &ctx) const
StatusCode processTdoPdoData(const EventContext &ctx) const
StatusCode processNSWT0Data(const EventContext &ctx) const

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

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 & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

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.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ initialize()

StatusCode NswCalibDbAlg::initialize ( )
overridevirtual

Definition at line 24 of file NswCalibDbAlg.cxx.

24 {
25
26 // retrievals
27 ATH_MSG_DEBUG( "initializing " << name() );
29 ATH_CHECK(m_idHelperSvc.retrieve());
30
31 // initialize read keys
44 m_loadMmT0Data = m_loadMmT0Data && m_idHelperSvc->hasMM() && (!m_mmT0FilePath.empty() || !m_readKey_mm_t0.empty());
45 m_loadsTgcT0Data = m_loadsTgcT0Data && m_idHelperSvc->hasSTGC() && (!m_stgcT0FilePath.empty() || !m_readKey_stgc_t0.empty()) ;
46
49
50 // write key for time/charge data
51 ATH_CHECK(m_writeKey_tdopdo.initialize());
52
53 // write key for threshold data
55
57
58 return StatusCode::SUCCESS;
59}
static const Attributes_t empty
writeKeyTdoPdo_t m_writeKey_tdopdo
readKey_t m_readKey_mm_sidea_pdo
Gaudi::Property< bool > m_processThresholds
readKey_t m_readKey_stgc_sidec_tdo
readKey_t m_readKey_mm_sidec_tdo
Gaudi::Property< std::string > m_mmT0FilePath
virtual StatusCode initialize() override
ServiceHandle< ICondSvc > m_condSvc
readKey_t m_readKey_mm_sidea_thr
readKey_t m_readKey_stgc_sidec_pdo
readKey_t m_readKey_stgc_sidec_thr
readKey_t m_readKey_stgc_sidea_tdo
Gaudi::Property< std::string > m_stgcT0FilePath
readKey_t m_readKey_mm_sidea_tdo
readKey_t m_readKey_mm_sidec_pdo
readKey_t m_readKey_mm_sidec_thr
readKey_t m_readKey_stgc_sidea_thr
readKey_t m_readKey_stgc_t0
readKey_t m_readKey_stgc_sidea_pdo
writeKeyMmT0_t m_writeKey_nswT0
readKey_t m_readKey_mm_t0
Gaudi::Property< bool > m_isData
writeKeyThr_t m_writeKey_thr
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

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 AthCondAlgorithm::isReEntrant ( ) const
inlineoverridevirtualinherited

Avoid scheduling algorithm multiple times.

With multiple concurrent events, conditions objects often expire simultaneously for all slots. To avoid that the scheduler runs the CondAlg in each slot, we declare it as "non-reentrant". This ensures that the conditions objects are only created once.

In case a particular CondAlg should behave differently, it can override this method again and return true.

See also
ATEAM-836

Definition at line 39 of file AthCondAlgorithm.h.

39{ return false; }

◆ 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.

281 {
282 int sector{0}, layer{0}, channel{0}, channelType{0}, stationEta{0};
283 double time{0};
284 tree->SetBranchAddress("sector" , &sector );
285 tree->SetBranchAddress("layer" , &layer );
286 tree->SetBranchAddress("channel", &channel );
287 tree->SetBranchAddress("mean" , &time );
288 tree->SetBranchAddress("stationEta" , &stationEta);
289 tree->SetBranchAddress("channel_type", &channelType);
290 if (msgLvl(MSG::VERBOSE)) {
291 tree->Print();
292 }
293
294 ATH_MSG_DEBUG("NSW t0 calibration tree has "<< tree->GetEntries() <<" entries for tech " << (tech==T0Tech::MM ? "MM" : "sTGC"));
295
296 for(uint i_channel=0; i_channel<tree->GetEntries(); i_channel++){
297 tree->GetEntry(i_channel);
298
299 int stationPhi = ((std::abs(sector)-1)/2)+1;
300 uint multilayer = (layer<4 ? 1:2); // multilayer 1 corresponds to layers 0-3, ML 2 to layers 4-7
301 uint gasGap = layer - (multilayer-1)*4 + 1;
302
303 Identifier id{0};
304
305 if(tech==T0Tech::MM){
306 std::string stationName = (sector%2==1 ? "MML" : "MMS");
307 bool isValid{true};
308 id = m_idHelperSvc->mmIdHelper().channelID(stationName, stationEta, stationPhi,multilayer,gasGap, channel
309 // checking the validity of the identifier in production code is too expensiv, therefore only check it in debug build
310 #ifndef NDEBUG
311 , isValid
312 #endif
313 );
314
315 if(!isValid){
316 ATH_MSG_ERROR("MM sector "<< sector <<" layer " << layer<< " channel "<< channel << " mean "<< time << " stationEta " << stationEta << " stationPhi " << stationPhi <<" stationName "<< stationName << " multilayer " << multilayer << " gas gap "<< gasGap << " channel " << channel);
317 ATH_MSG_ERROR("Failed to build identifier");
318 return StatusCode::FAILURE;
319 }
320 } else {
321 std::string stationName = (sector%2==1 ? "STL" : "STS");
322 bool isValid{true};
323 id = m_idHelperSvc->stgcIdHelper().channelID(stationName, stationEta, stationPhi, multilayer, gasGap, channelType, channel
324 // checking the validity of the identifier in production code is too expensiv, therefore only check it in debug build
325 #ifndef NDEBUG
326 , isValid
327 #endif
328 );
329 if(!isValid){
330 ATH_MSG_ERROR("Failed to build identifier");
331 ATH_MSG_DEBUG("STG sector "<< sector <<" layer " << layer<< " channel "<< channel << " mean "<< time << " stationEta " << stationEta << " stationPhi " << stationPhi <<" stationName "<< stationName << " multilayer " << multilayer << " gas gap "<< gasGap << " channel " << channel << " channel type" << channelType);
332 return StatusCode::FAILURE;
333 }
334 }
335
336 writeCdo->setData(id, time);
337 }
338 return StatusCode::SUCCESS;
339
340}
unsigned int uint
bool msgLvl(const MSG::Level lvl) const
void setData(const Identifier &channelId, const float channelT0)
Definition NswT0Data.cxx:42
time(flags, cells_name, *args, **kw)
@ layer
Definition HitInfo.h:79
TChain * tree

◆ loadT0ToTree()

StatusCode NswCalibDbAlg::loadT0ToTree ( const EventContext & ctx,
const readKey_t & readKey,
writeHandleT0_t & writeHandle,
std::unique_ptr< TTree > & tree ) const
private

Definition at line 250 of file NswCalibDbAlg.cxx.

250 {
251 // set up read handle
252 SG::ReadCondHandle<CondAttrListCollection> readHandle{readKey, ctx};
253 const CondAttrListCollection* readCdo{*readHandle};
254 if(!readCdo){
255 ATH_MSG_ERROR("Null pointer to the read conditions object");
256 return StatusCode::FAILURE;
257 }
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());
261
262 // iterate through data
264 for(itr = readCdo->begin(); itr != readCdo->end(); ++itr) {
265
266 // retrieve blob
267 const coral::AttributeList& atr = itr->second;
268 if(atr["data"].specification().type() != typeid(coral::Blob)) {
269 ATH_MSG_FATAL( "Data column is not of type blob!" );
270 return StatusCode::FAILURE;
271 }
272 coral::Blob blob = atr["data"].data<coral::Blob>();
274 ATH_MSG_FATAL( "Cannot retrieve data from coral blob!" );
275 return StatusCode::FAILURE;
276 }
277 }
278 return StatusCode::SUCCESS;
279}
#define ATH_MSG_FATAL(x)
const_iterator end() const
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
size_type size() const
number of Chan/AttributeList pairs
ChanAttrListMap::const_iterator const_iterator
const DataObjID & fullKey() const
const EventIDRange & getRange()
bool readBlobAsTTree(const coral::Blob &blob, std::unique_ptr< TTree > &tree, const std::string_view name="tree")
Interprets the coral::Blob as a TTree instance.

◆ loadThresholdData()

StatusCode NswCalibDbAlg::loadThresholdData ( const EventContext & ctx,
const readKey_t & readKey,
const ThresholdTech tech,
writeHandleThr_t & writeHandle,
NswCalibDbThresholdData * writeCdo ) const
private

Definition at line 345 of file NswCalibDbAlg.cxx.

345 {
346
347 // set up read handle
348 SG::ReadCondHandle<CondAttrListCollection> readHandle{readKey, ctx};
349 const CondAttrListCollection* readCdo{*readHandle};
350 if(!readCdo){
351 ATH_MSG_ERROR("Null pointer to the read conditions object");
352 return StatusCode::FAILURE;
353 }
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());
357
358 // iterate through data
360 unsigned int nObjs = 0;
361 for(itr = readCdo->begin(); itr != readCdo->end(); ++itr) {
362
363 // retrieve blob
364 const coral::AttributeList& atr = itr->second;
365 if(atr["data"].specification().type() != typeid(coral::Blob)) {
366 ATH_MSG_FATAL( "Data column is not of type blob!" );
367 return StatusCode::FAILURE;
368 }
369 coral::Blob blob = atr["data"].data<coral::Blob>();
370 std::unique_ptr<TTree> tree;
372 ATH_MSG_FATAL( "Cannot retrieve data from coral blob!" );
373 return StatusCode::FAILURE;
374 }
375
376 // parse tree
377 unsigned int elinkId{0}, vmm{0}, channel{0};
378 float threshold{0.};
379 tree->SetBranchAddress("vmm" , &vmm );
380 tree->SetBranchAddress("channel" , &channel );
381 tree->SetBranchAddress("elinkId" , &elinkId );
382 tree->SetBranchAddress("threshold" , &threshold );
383
384 // loop over channels
385 unsigned int nChns = 0;
386 for(unsigned int iEvt=0; iEvt<tree->GetEntries(); ++iEvt){
387 tree->GetEntry(iEvt);
388 Identifier channelId;
389 if(!buildChannelId(channelId, elinkId, vmm, channel)){
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");
391 continue;
392 }
393 if(channelId.get_compact()==0){
394 writeCdo->setZero(tech, threshold);
395 ++nChns;
396 continue;
397 }
398 writeCdo->setData(channelId, threshold);
399 ++nChns;
400 }
401 ATH_MSG_VERBOSE("Retrieved data for "<<nChns<<" channels.");
402 ++nObjs;
403 }
404 ATH_MSG_VERBOSE("Retrieved data for "<<nObjs<<" objects.");
405
406 return StatusCode::SUCCESS;
407}
bool buildChannelId(Identifier &channelId, unsigned int elinkId, unsigned int vmm, unsigned int channel) const
void setData(const Identifier &, const float)
void setZero(ThrsldTechType, const float)

◆ loadTimeChargeData()

StatusCode NswCalibDbAlg::loadTimeChargeData ( const EventContext & ctx,
const readKey_t & readKey,
const TimeChargeTech tech,
const TimeChargeType type,
writeHandleTdoPdo_t & writeHandle,
NswCalibDbTimeChargeData * writeCdo ) const
private

Definition at line 413 of file NswCalibDbAlg.cxx.

413 {
414
415 // set up read handle
416 SG::ReadCondHandle<CondAttrListCollection> readHandle{readKey, ctx};
417 const CondAttrListCollection* readCdo{*readHandle};
418 if(!readCdo){
419 ATH_MSG_ERROR("Null pointer to the read conditions object");
420 return StatusCode::FAILURE;
421 }
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());
425
426 // iterate through data
428 unsigned int nObjs = 0;
429 for(itr = readCdo->begin(); itr != readCdo->end(); ++itr) {
430
431 // retrieve blob
432 const coral::AttributeList& atr = itr->second;
433 if(atr["data"].specification().type() != typeid(coral::Blob)) {
434 ATH_MSG_FATAL( "Data column is not of type blob!" );
435 return StatusCode::FAILURE;
436 }
437 coral::Blob blob = atr["data"].data<coral::Blob>();
438 std::unique_ptr<TTree> tree;
440 ATH_MSG_FATAL( "Cannot retrieve data from coral blob!" );
441 return StatusCode::FAILURE;
442 }
443 // parse tree
444 unsigned int elinkId{0}, vmm{0}, channel{0};
445 float slope{0}, intercept{0};
446 //float slope{0}, slopeError{0}, intercept{0},interceptError{0};
447
448 tree->SetBranchAddress("vmm" , &vmm );
449 tree->SetBranchAddress("channel" , &channel );
450 tree->SetBranchAddress("elinkId" , &elinkId );
451 tree->SetBranchAddress("slope" , &slope );
452 //tree->SetBranchAddress("slopeError" , &slopeError ); // keep for later
453 tree->SetBranchAddress("intercept" , &intercept );
454 //tree->SetBranchAddress("interceptError", &interceptError);
455
456
457 // loop over channels
458 unsigned int nChns = 0;
459 for(unsigned int iEvt=0; iEvt<tree->GetEntries(); ++iEvt){
460 tree->GetEntry(iEvt);
461 Identifier channelId{0};
462 if(!buildChannelId(channelId, elinkId, vmm, channel)){
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");
464 continue;
465 }
466
467 NswCalibDbTimeChargeData::CalibConstants calib_data{};
468 calib_data.slope = slope;
469 //calib_data.slopeError = slopeError; // keep for later
470 calib_data.intercept = intercept;
471 //calib_data.interceptError = interceptError;
472
473 if(!channelId.get_compact()){
474 writeCdo->setZero(type, tech, calib_data);
475 ++nChns;
476 continue;
477 }
478
479 writeCdo->setData(type, channelId, calib_data);
480 ++nChns;
481 }
482 ATH_MSG_VERBOSE("Retrieved data for "<<nChns<<" channels. "<<tree->GetName()<<" "<<tree->GetEntries());
483 ++nObjs;
484 }
485 ATH_MSG_VERBOSE("Retrieved data for "<<nObjs<<" objects.");
486
487 return StatusCode::SUCCESS;
488}
void setZero(CalibDataType type, MuonCond::CalibTechType tech, CalibConstants constants)
void setData(CalibDataType type, const Identifier &chnlId, CalibConstants constants)

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

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.

177 {
178 // set up write handles for MmT0 data
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;
185 }
186 ATH_MSG_DEBUG("Range of MmT0 output is " << wrHdl.getRange());
187 std::unique_ptr<NswT0Data> wrCdo{std::make_unique<NswT0Data>(m_idHelperSvc.get())};
188 if(m_loadMmT0Data){
189 if(!m_mmT0FilePath.empty() ){ // let's read the constants from a file
190 ATH_MSG_INFO("processing MM T0 from file " << m_mmT0FilePath);
191 wrHdl.addDependency(EventIDRange(IOVInfiniteRange::infiniteTime()));
192 std::unique_ptr<TFile> file (TFile::Open(m_mmT0FilePath.value().c_str()));
193 if(!file || file->IsZombie()){
194 ATH_MSG_FATAL("Failed to open file containing the MM T0Data. Filepath: "<<m_mmT0FilePath);
195 return StatusCode::FAILURE;
196 }
197 std::unique_ptr<TTree> tree{(TTree*)file->Get("tree_ch")};
198 if(!tree){
199 ATH_MSG_FATAL("Failed to load tree containing the NswT0Data.");
200 return StatusCode::FAILURE;
201 }
202 ATH_CHECK(loadT0Data(tree, wrCdo.get(), T0Tech::MM));
203
204 } else if(!m_readKey_mm_t0.empty()){
205 ATH_MSG_DEBUG("LOAD NSW MM T0 FROM DB");
206 std::unique_ptr<TTree> tree;
208 ATH_CHECK(loadT0Data(tree, wrCdo.get(), T0Tech::MM));
209
210 } else {
211 ATH_MSG_ERROR("Neither a database folder nor a file have been provided to read the MM T0 constants");
212 return StatusCode::FAILURE;
213 }
214 }
216 if(!m_stgcT0FilePath.empty() ){ // let's read the constants from a file
217 ATH_MSG_INFO("processing sTGC T0 from file " << m_stgcT0FilePath);
218 wrHdl.addDependency(EventIDRange(IOVInfiniteRange::infiniteTime()));
219 std::unique_ptr<TFile> file (TFile::Open(m_stgcT0FilePath.value().c_str()));
220 if(!file || file->IsZombie()){
221 ATH_MSG_FATAL("Failed to open file containing the sTGC T0Data. Filepath: "<<m_stgcT0FilePath);
222 return StatusCode::FAILURE;
223 }
224 std::unique_ptr<TTree> tree{(TTree*)file->Get("tree_ch")};
225 if(!tree){
226 ATH_MSG_FATAL("Failed to load tree containing the NswT0Data.");
227 return StatusCode::FAILURE;
228 }
229 ATH_CHECK(loadT0Data(tree, wrCdo.get(), T0Tech::STGC));
230
231 } else if(!m_readKey_stgc_t0.empty()){
232 ATH_MSG_DEBUG("LOAD NSW sTGC T0 FROM DB");
233 std::unique_ptr<TTree> tree;
235 ATH_CHECK(loadT0Data(tree, wrCdo.get(), T0Tech::STGC));
236
237 } else {
238 ATH_MSG_ERROR("Neither a database folder nor a file have been provided to read the sTGC T0 constants");
239 return StatusCode::FAILURE;
240 }
241 }
242
243 // insert/write data for NswT0Data data
244 ATH_CHECK(wrHdl.record(std::move(wrCdo)));
245 ATH_MSG_DEBUG("Recorded new " << wrHdl.key() << " with range " << wrHdl.getRange() << " into Conditions Store");
246
247 return StatusCode::SUCCESS;
248}
#define ATH_MSG_INFO(x)
static EventIDRange infiniteTime()
Produces an EventIDRange that is inifinite in Time and invalid in RunLumi.
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
SG::WriteCondHandle< NswT0Data > writeHandleT0_t
TFile * file

◆ processTdoPdoData()

StatusCode NswCalibDbAlg::processTdoPdoData ( const EventContext & ctx) const
private

Definition at line 78 of file NswCalibDbAlg.cxx.

78 {
79
80 // set up write handles for time/charge data
81 SG::WriteCondHandle<NswCalibDbTimeChargeData> wrHdl{m_writeKey_tdopdo, ctx};
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;
87 }
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())};
90
91 // MM
92 if(!m_readKey_mm_sidea_tdo.empty()) {
93 ATH_CHECK(loadTimeChargeData(ctx, m_readKey_mm_sidea_tdo , TimeChargeTech::MM , TimeChargeType::TDO, wrHdl, wrCdo.get()));
94 }
95 if(!m_readKey_mm_sidec_tdo.empty()) {
96 ATH_CHECK(loadTimeChargeData(ctx, m_readKey_mm_sidec_tdo , TimeChargeTech::MM , TimeChargeType::TDO, wrHdl, wrCdo.get()));
97 }
98 if(!m_readKey_mm_sidea_pdo.empty()) {
99 ATH_CHECK(loadTimeChargeData(ctx, m_readKey_mm_sidea_pdo , TimeChargeTech::MM , TimeChargeType::PDO, wrHdl, wrCdo.get()));
100 }
101 if(!m_readKey_mm_sidec_pdo.empty()) {
102 ATH_CHECK(loadTimeChargeData(ctx, m_readKey_mm_sidec_pdo , TimeChargeTech::MM , TimeChargeType::PDO, wrHdl, wrCdo.get()));
103 }
104
105 // sTGC
106 if(!m_readKey_stgc_sidea_tdo.empty()) {
107 ATH_CHECK(loadTimeChargeData(ctx, m_readKey_stgc_sidea_tdo, TimeChargeTech::STGC, TimeChargeType::TDO, wrHdl, wrCdo.get()));
108 }
109 if(!m_readKey_stgc_sidec_tdo.empty()) {
110 ATH_CHECK(loadTimeChargeData(ctx, m_readKey_stgc_sidec_tdo, TimeChargeTech::STGC, TimeChargeType::TDO, wrHdl, wrCdo.get()));
111 }
112 if(!m_readKey_stgc_sidea_pdo.empty()) {
113 ATH_CHECK(loadTimeChargeData(ctx, m_readKey_stgc_sidea_pdo, TimeChargeTech::STGC, TimeChargeType::PDO, wrHdl, wrCdo.get()));
114 }
115 if(!m_readKey_stgc_sidec_pdo.empty()) {
116 ATH_CHECK(loadTimeChargeData(ctx, m_readKey_stgc_sidec_pdo, TimeChargeTech::STGC, TimeChargeType::PDO, wrHdl, wrCdo.get()));
117 }
118
119 // insert/write data for time/charge data
120 if (wrHdl.record(std::move(wrCdo)).isFailure()) {
121 ATH_MSG_FATAL("Could not record " << wrHdl.key()
122 << " with EventRange " << wrHdl.getRange()
123 << " into Conditions Store");
124 return StatusCode::FAILURE;
125 }
126 ATH_MSG_DEBUG("Recorded new " << wrHdl.key() << " with range " << wrHdl.getRange() << " into Conditions Store");
127
128 return StatusCode::SUCCESS; // nothing to do
129
130}
StatusCode loadTimeChargeData(const EventContext &ctx, const readKey_t &readKey, const TimeChargeTech, const TimeChargeType type, writeHandleTdoPdo_t &writeHandle, NswCalibDbTimeChargeData *writeCdo) const
const std::string & key() const
const EventIDRange & getRange() const
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
const DataObjID & fullKey() const

◆ processThrData()

StatusCode NswCalibDbAlg::processThrData ( const EventContext & ctx) const
private

Definition at line 135 of file NswCalibDbAlg.cxx.

135 {
136
137 if(m_isData || !m_processThresholds) return StatusCode::SUCCESS; // nothing to do
138
139 // set up write handles for threshold data
140 SG::WriteCondHandle<NswCalibDbThresholdData> wrHdl{m_writeKey_thr, ctx};
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;
146 }
147 ATH_MSG_DEBUG("Range of threshold output is " << wrHdl.getRange());
148 std::unique_ptr<NswCalibDbThresholdData> wrCdo{std::make_unique<NswCalibDbThresholdData>(m_idHelperSvc.get())};
149
150 if(!m_readKey_mm_sidea_thr.empty()) {
151 ATH_CHECK(loadThresholdData(ctx, m_readKey_mm_sidea_thr , ThresholdTech::MM , wrHdl, wrCdo.get()));
152 }
153 if(!m_readKey_mm_sidec_thr.empty()) {
154 ATH_CHECK(loadThresholdData(ctx, m_readKey_mm_sidec_thr , ThresholdTech::MM , wrHdl, wrCdo.get()));
155 }
156 if(!m_readKey_stgc_sidea_thr.empty()) {
157 ATH_CHECK(loadThresholdData(ctx, m_readKey_stgc_sidea_thr, ThresholdTech::STGC, wrHdl, wrCdo.get()));
158 }
159 if(!m_readKey_stgc_sidec_thr.empty()) {
160 ATH_CHECK(loadThresholdData(ctx, m_readKey_stgc_sidec_thr, ThresholdTech::STGC, wrHdl, wrCdo.get()));
161 }
162
163 // insert/write data for threshold data
164 if (wrHdl.record(std::move(wrCdo)).isFailure()) {
165 ATH_MSG_FATAL("Could not record " << wrHdl.key()
166 << " with EventRange " << wrHdl.getRange()
167 << " into Conditions Store");
168 return StatusCode::FAILURE;
169 }
170 ATH_MSG_DEBUG("Recorded new " << wrHdl.key() << " with range " << wrHdl.getRange() << " into Conditions Store");
171
172 return StatusCode::SUCCESS;
173}
StatusCode loadThresholdData(const EventContext &, const readKey_t &, const ThresholdTech, writeHandleThr_t &, NswCalibDbThresholdData *) const

◆ renounce()

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 > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
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)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::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 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::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 HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
#define ATH_MSG_WARNING(x)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_condSvc

ServiceHandle<ICondSvc> NswCalibDbAlg::m_condSvc {this, "CondSvc", "CondSvc"}
private

Definition at line 76 of file NswCalibDbAlg.h.

76{this, "CondSvc", "CondSvc"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

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_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> NswCalibDbAlg::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 77 of file NswCalibDbAlg.h.

77{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};

◆ m_isData

Gaudi::Property<bool> NswCalibDbAlg::m_isData {this, "isData" , true, "Processing data"}
private

Definition at line 73 of file NswCalibDbAlg.h.

73{this, "isData" , true, "Processing data"};

◆ m_loadMmT0Data

Gaudi::Property<bool> NswCalibDbAlg::m_loadMmT0Data {this, "loadMmT0Data", false, "Enable loading the sTgc T0Data"}
private

Definition at line 96 of file NswCalibDbAlg.h.

96{this, "loadMmT0Data", false, "Enable loading the sTgc T0Data"};

◆ m_loadsTgcT0Data

Gaudi::Property<bool> NswCalibDbAlg::m_loadsTgcT0Data {this, "loadsTgcT0Data", false, "Enable loading the sTgcT0Data"}
private

Definition at line 97 of file NswCalibDbAlg.h.

97{this, "loadsTgcT0Data", false, "Enable loading the sTgcT0Data"};

◆ 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

Definition at line 100 of file NswCalibDbAlg.h.

100{this, "MmT0FileName", "", "Path to a file containing the MM T0 data, this will override the data from the conditions db"};

◆ m_processThresholds

Gaudi::Property<bool> NswCalibDbAlg::m_processThresholds {this, "processThresholds", false, "Process threshold data"}
private

Definition at line 74 of file NswCalibDbAlg.h.

74{this, "processThresholds", false, "Process threshold data"};

◆ 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

Definition at line 85 of file NswCalibDbAlg.h.

85{this, "ReadKey_MM_SIDEA_PDO" , "/MDT/MM/CHARGE/SIDEA" , "Key of input MM condition data for side A data PDO"};

◆ 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

Definition at line 83 of file NswCalibDbAlg.h.

83{this, "ReadKey_MM_SIDEA_TDO" , "/MDT/MM/TIME/SIDEA" , "Key of input MM condition data for side A data TDO"};

◆ 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

Definition at line 87 of file NswCalibDbAlg.h.

87{this, "ReadKey_MM_SIDEA_THR" , "/MDT/MM/THR/SIDEA" , "Key of input MM condition data for side A data THR"};

◆ 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

Definition at line 86 of file NswCalibDbAlg.h.

86{this, "ReadKey_MM_SIDEC_PDO" , "/MDT/MM/CHARGE/SIDEC" , "Key of input MM condition data for side C data PDO"};

◆ 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

Definition at line 84 of file NswCalibDbAlg.h.

84{this, "ReadKey_MM_SIDEC_TDO" , "/MDT/MM/TIME/SIDEC" , "Key of input MM condition data for side C data TDO"};

◆ 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

Definition at line 88 of file NswCalibDbAlg.h.

88{this, "ReadKey_MM_SIDEC_THR" , "/MDT/MM/THR/SIDEC" , "Key of input MM condition data for side C data THR"};

◆ 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

Definition at line 98 of file NswCalibDbAlg.h.

98{this, "ReadKey_MM_T0", "" , "Key of input MM condition data for side A data T0"};

◆ 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

Definition at line 91 of file NswCalibDbAlg.h.

91{this, "ReadKey_STGC_SIDEA_PDO", "/TGC/NSW/CHARGE/SIDEA", "Key of input sTGC condition data for side A data PDO"};

◆ 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

Definition at line 89 of file NswCalibDbAlg.h.

89{this, "ReadKey_STGC_SIDEA_TDO", "/TGC/NSW/TIME/SIDEA" , "Key of input sTGC condition data for side A data TDO"};

◆ 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

Definition at line 93 of file NswCalibDbAlg.h.

93{this, "ReadKey_STGC_SIDEA_THR", "/TGC/NSW/THR/SIDEA" , "Key of input sTGC condition data for side A data THR"};

◆ 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

Definition at line 92 of file NswCalibDbAlg.h.

92{this, "ReadKey_STGC_SIDEC_PDO", "/TGC/NSW/CHARGE/SIDEC", "Key of input sTGC condition data for side C data PDO"};

◆ 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

Definition at line 90 of file NswCalibDbAlg.h.

90{this, "ReadKey_STGC_SIDEC_TDO", "/TGC/NSW/TIME/SIDEC" , "Key of input sTGC condition data for side C data TDO"};

◆ 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

Definition at line 94 of file NswCalibDbAlg.h.

94{this, "ReadKey_STGC_SIDEC_THR", "/TGC/NSW/THR/SIDEC" , "Key of input sTGC condition data for side C data THR"};

◆ 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

Definition at line 99 of file NswCalibDbAlg.h.

99{this, "ReadKey_STGC_T0", "" , "Key of input sTGC condition data for side C data T0"};

◆ 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

Definition at line 101 of file NswCalibDbAlg.h.

101{this, "sTgcT0FileName", "", "Path to a file containing the sTGC T0 data, this will override the data from the conditions db"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_writeKey_nswT0

writeKeyMmT0_t NswCalibDbAlg::m_writeKey_nswT0 {this, "WriteKey_NswT0" , "NswT0Data" , "Key of output calibration data (NSW T0s)"}
private

Definition at line 81 of file NswCalibDbAlg.h.

81{this, "WriteKey_NswT0" , "NswT0Data" , "Key of output calibration data (NSW T0s)"};

◆ m_writeKey_tdopdo

writeKeyTdoPdo_t NswCalibDbAlg::m_writeKey_tdopdo {this, "WriteKey_TdoPdo", "NswCalibDbTimeChargeData", "Key of output calibration data (TDOs and PDOs)" }
private

Definition at line 79 of file NswCalibDbAlg.h.

79{this, "WriteKey_TdoPdo", "NswCalibDbTimeChargeData", "Key of output calibration data (TDOs and PDOs)" };

◆ m_writeKey_thr

writeKeyThr_t NswCalibDbAlg::m_writeKey_thr {this, "WriteKey_Thr" , "NswCalibDbThresholdData" , "Key of output calibration data (VMM thresholds)"}
private

Definition at line 80 of file NswCalibDbAlg.h.

80{this, "WriteKey_Thr" , "NswCalibDbThresholdData" , "Key of output calibration data (VMM thresholds)"};

The documentation for this class was generated from the following files: