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

#include <ALFA_CLinkAlg.h>

Inheritance diagram for ALFA_CLinkAlg:

Public Member Functions

 ALFA_CLinkAlg (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~ALFA_CLinkAlg ()
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) override
 Execute method.
virtual StatusCode finalize () override
StatusCode LoadAllEventData (const EventContext &ctx, ALFA_CLinkEvent &dataEvent) const
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
bool filterPassed (const EventContext &ctx) const
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
const EventContext & getContext () const
 Deprecated methods (use the ones with EventContext).
bool filterPassed () const
void setFilterPassed (bool state) const

Protected Member Functions

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
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

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

unsigned long long CalcDCSId (const EventContext &ctx, const SG::ReadCondHandleKey< CondAttrListCollection > &key) const
StatusCode CalcAllDCSIds (const EventContext &ctx, DCSID &pDCSIds) const
StatusCode GenerateXAOD (const EventContext &ctx)
StatusCode FillXAOD_TrackingData (const EventContext &ctx, xAOD::ALFADataContainer &xAODContainer)
StatusCode FillXAOD_HeaderData (const EventContext &ctx, xAOD::ALFADataContainer &xAODContainer)
void ClearXAODTrackingData (const int nMaxTrackCnt, eRecType eType)
void ClearXAODHeaderData ()
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

int m_nDataType
int m_nProcessingMode
int m_nMaxTrackCnt
std::vector< float > m_vecXDetCS
std::vector< float > m_vecYDetCS
std::vector< int > m_vecDetectorPartID
std::vector< float > m_vecOverU
std::vector< float > m_vecOverV
std::vector< float > m_vecOverY
std::vector< int > m_vecNumU
std::vector< int > m_vecNumV
std::vector< int > m_vecNumY
std::vector< int > m_vecMDFibSel
std::vector< int > m_vecODFibSel
std::vector< float > m_vecXLhcCS
std::vector< float > m_vecYLhcCS
std::vector< float > m_vecZLhcCS
std::vector< float > m_vecXRPotCS
std::vector< float > m_vecYRPotCS
std::vector< float > m_vecXStatCS
std::vector< float > m_vecYStatCS
std::vector< float > m_vecXBeamCS
std::vector< float > m_vecYBeamCS
std::vector< int > m_vecScaler
std::vector< int > m_vecTrigPat
std::vector< int > m_vecMDFiberHits
std::vector< int > m_vecMDMultiplicity
std::vector< int > m_vecODFiberHitsPos
std::vector< int > m_vecODFiberHitsNeg
std::vector< int > m_vecODMultiplicityPos
std::vector< int > m_vecODMultiplicityNeg
SG::ReadCondHandleKey< CondAttrListCollectionm_BLMKey { this, "BLMKey", DCSCOLLNAME_BLM, "BLM conditions key" }
SG::ReadCondHandleKey< CondAttrListCollectionm_HVChannelKey { this, "HVChannelKey", DCSCOLLNAME_HVCHANNEL, "HV channel conditions key" }
SG::ReadCondHandleKey< CondAttrListCollectionm_localMonitoringKey { this, "LocalMonitoringKey", DCSCOLLNAME_LOCALMONITORING, "Local monitoring conditions key" }
SG::ReadCondHandleKey< CondAttrListCollectionm_movementKey { this, "MovementKey", DCSCOLLNAME_LOCALMONITORING, "Movement conditions key" }
SG::ReadCondHandleKey< CondAttrListCollectionm_radmonKey { this, "RadmonKey", DCSCOLLNAME_RADMON, "Radmon conditions key" }
SG::ReadCondHandleKey< CondAttrListCollectionm_triggerRatesKey { this, "TriggerRatesKey", DCSCOLLNAME_TRIGGERRATES, "Trigger rates conditions key" }
SG::ReadCondHandleKey< CondAttrListCollectionm_FEConfigurationKey { this, "FEConfigurationKey", DCSCOLLNAME_FECONFIGURATION, "FE configuration conditions key" }
SG::ReadCondHandleKey< CondAttrListCollectionm_triggerSettingsKey { this, "TriggerSettingsKey", DCSCOLLNAME_TRIGGERSETTINGS, "Trigger settings conditions key" }
SG::ReadHandleKey< ALFA_RawDataContainerm_rawDataContKey { this, "RawDataContKey", EVCOLLNAME_RAWDATA, "SG key for raw data container" }
SG::ReadHandleKey< ALFA_DigitCollectionm_digitCollKey { this, "DigitCollKey", EVCOLLNAME_DIGIT, "SG key for digit collection" }
SG::ReadHandleKey< ALFA_ODDigitCollectionm_ODDigitCollKey { this, "ODDigitCollKey", EVCOLLNAME_ODDIGIT, "SG key for OD digit collection" }
SG::ReadHandleKey< ALFA_LocRecEvCollectionm_locRecEvCollKey { this, "LocRecEvCollectionKey", EVCOLLNAME_LOCREC, "SG key for LocRecEv collection" }
SG::ReadHandleKey< ALFA_LocRecODEvCollectionm_locRecODEvCollKey { this, "LocRecEvODCollectionKey", EVCOLLNAME_LOCRECOD, "SG key for LocRecEvOD collection" }
SG::ReadHandleKey< ALFA_LocRecCorrEvCollectionm_locRecCorrEvCollKey { this, "LocRecCorrEvCollectionKey", EVCOLLNAME_LOCRECCORR, "SG key for LocRecCorrEv collection" }
SG::ReadHandleKey< ALFA_LocRecCorrODEvCollectionm_locRecCorrODEvCollKey { this, "LocRecCorrODEvCollectionKey", EVCOLLNAME_LOCRECCORROD, "SG key for LocRecCorrODEv collection" }
SG::WriteHandleKey< ALFA_CLinkEventm_clinkEventKey { this, "CLinkEventKey", "ALFA_CLinkEvent", "SG key for output CLinkEvent" }
SG::WriteHandleKey< xAOD::ALFADataContainerm_xaodDataKey { this, "xAODDataKey", EVCOLLNAME_XAODALFADATACONTAINER, "SG key for output xAOD::ALFADataContainer" }
DataObjIDColl m_extendedExtraObjects
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 52 of file ALFA_CLinkAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ALFA_CLinkAlg()

ALFA_CLinkAlg::ALFA_CLinkAlg ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 17 of file ALFA_CLinkAlg.cxx.

18 : AthAlgorithm(name, pSvcLocator)
19{
20 // data type using in the local reconstruction
21 // for the simulation data the value is 0, for the real data the value is 1. Unset value is -1
22 declareProperty("DataType", m_nDataType=1, "data type using in the local reconstruction");
23 declareProperty("ProcessingMode", m_nProcessingMode=2, "Processing mode, 1=offline, 2=online");
24
26}
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ ~ALFA_CLinkAlg()

ALFA_CLinkAlg::~ALFA_CLinkAlg ( )
virtual

Definition at line 29 of file ALFA_CLinkAlg.cxx.

30{
31
32}

Member Function Documentation

◆ CalcAllDCSIds()

StatusCode ALFA_CLinkAlg::CalcAllDCSIds ( const EventContext & ctx,
DCSID & pDCSIds ) const
private

Definition at line 183 of file ALFA_CLinkAlg.cxx.

185{
186 bool bRes=true;
187
188 bRes&=(DCSIds.ullBlmID=CalcDCSId(ctx, m_BLMKey))>0;
189 bRes&=(DCSIds.ullHVChannelID=CalcDCSId(ctx, m_HVChannelKey))>0;
190 bRes&=(DCSIds.ullLocalMonitoringID=CalcDCSId(ctx, m_localMonitoringKey))>0;
191 bRes&=(DCSIds.ullMovementID=CalcDCSId(ctx, m_movementKey))>0;
192 bRes&=(DCSIds.ullRadMonID=CalcDCSId(ctx, m_radmonKey))>0;
193 bRes&=(DCSIds.ullTriggerRatesID=CalcDCSId(ctx, m_triggerRatesKey))>0;
194 bRes&=(DCSIds.ullFEConfigurationID=CalcDCSId(ctx, m_FEConfigurationKey))>0;
195 bRes&=(DCSIds.ullTriggerSettingsID=CalcDCSId(ctx, m_triggerSettingsKey))>0;
196 return bRes? StatusCode::SUCCESS:StatusCode::FAILURE;
197}
SG::ReadCondHandleKey< CondAttrListCollection > m_radmonKey
unsigned long long CalcDCSId(const EventContext &ctx, const SG::ReadCondHandleKey< CondAttrListCollection > &key) const
SG::ReadCondHandleKey< CondAttrListCollection > m_movementKey
SG::ReadCondHandleKey< CondAttrListCollection > m_triggerRatesKey
SG::ReadCondHandleKey< CondAttrListCollection > m_localMonitoringKey
SG::ReadCondHandleKey< CondAttrListCollection > m_FEConfigurationKey
SG::ReadCondHandleKey< CondAttrListCollection > m_triggerSettingsKey
SG::ReadCondHandleKey< CondAttrListCollection > m_HVChannelKey
SG::ReadCondHandleKey< CondAttrListCollection > m_BLMKey

◆ CalcDCSId()

unsigned long long ALFA_CLinkAlg::CalcDCSId ( const EventContext & ctx,
const SG::ReadCondHandleKey< CondAttrListCollection > & key ) const
private

Definition at line 156 of file ALFA_CLinkAlg.cxx.

158{
159 unsigned long long ullID;
160 std::string Folder;
161
162 SG::ReadCondHandle<CondAttrListCollection> h (key, ctx);
163 EventIDRange range;
164 if (!h.range (range)) return 0;
165
166 // Construct the ID:
167 EventIDBase time = range.start();
168 if(time.isRunLumi()){
169 ullID=static_cast<unsigned long long>(((time.run_number()&0xffff)<<16)|(time.lumi_block()&0xffff));
170 }
171 else if(time.isTimeStamp()){
172 ullID = time.time_stamp();
173 ullID <<= 32;
174 ullID |= time.time_stamp_ns_offset();
175 }
176 else{
177 ullID=0;
178 }
179
180 return ullID;
181}
time(flags, cells_name, *args, **kw)

◆ ClearXAODHeaderData()

void ALFA_CLinkAlg::ClearXAODHeaderData ( )
private

Definition at line 576 of file ALFA_CLinkAlg.cxx.

577{
578 if (m_nDataType==1)
579 {
580 //DCS IDs
581 /*
582 *m_pullDCSBlmID=0;
583 *m_pullDCSHVChannelID=0;
584 *m_pullDCSLocalMonitoringID=0;
585 *m_pullDCSMovementID=0;
586 *m_pullDCSRadMonID=0;
587 *m_pullDCSTriggerRatesID=0;
588 *m_pullDCSFEConfigurationID=0;
589 *m_pullDCSTriggerSettingsID=0;*/
590
591 //RawDataContainer
592 m_vecScaler.resize(RPOTSCNT);
593 fill_n(m_vecScaler.begin(),m_vecScaler.size(),-1);
594 //m_nBCId=-1;
595 //m_nTimeStamp=-1;
596 //m_nTimeStamp_ns=-1;
598 fill_n(m_vecTrigPat.begin(),m_vecTrigPat.size(),0);
599 }
600
601 //DigitCollection
603 fill_n(m_vecMDFiberHits.begin(),m_vecMDFiberHits.size(),0);
605 fill_n(m_vecMDMultiplicity.begin(),m_vecMDMultiplicity.size(),0);
606
607 //ODDigitCollection
609 fill_n(m_vecODFiberHitsPos.begin(),m_vecODFiberHitsPos.size(),0);
611 fill_n(m_vecODFiberHitsNeg.begin(),m_vecODFiberHitsNeg.size(),0);
612
614 fill_n(m_vecODMultiplicityPos.begin(),m_vecODMultiplicityPos.size(),0);
616 fill_n(m_vecODMultiplicityNeg.begin(),m_vecODMultiplicityNeg.size(),0);
617}
#define ODLAYERSCNT
#define MDFIBERSCNT
#define TRIGPATCNT
#define MDPLATESCNT
#define MDLAYERSCNT
#define RPOTSCNT
#define ODPLATESCNT
#define ODFIBERSCNT
std::vector< int > m_vecODMultiplicityPos
std::vector< int > m_vecODMultiplicityNeg
std::vector< int > m_vecODFiberHitsPos
std::vector< int > m_vecMDMultiplicity
std::vector< int > m_vecScaler
std::vector< int > m_vecMDFiberHits
std::vector< int > m_vecODFiberHitsNeg
std::vector< int > m_vecTrigPat

◆ ClearXAODTrackingData()

void ALFA_CLinkAlg::ClearXAODTrackingData ( const int nMaxTrackCnt,
eRecType eType )
private

Definition at line 525 of file ALFA_CLinkAlg.cxx.

526{
527 if(eType==ERC_LOCUNCORRECTED)
528 {
529 //LocRecEvCollection & LocRecEvODCollection
530 m_vecXDetCS.resize(RPOTSCNT*nMaxTrackCnt);
531 fill_n(m_vecXDetCS.begin(),m_vecXDetCS.size(),-9999);
532 m_vecYDetCS.resize(RPOTSCNT*nMaxTrackCnt);
533 fill_n(m_vecYDetCS.begin(),m_vecYDetCS.size(),-9999);
534 m_vecDetectorPartID.resize(RPOTSCNT*nMaxTrackCnt);
535 fill_n(m_vecDetectorPartID.begin(),m_vecDetectorPartID.size(),0);
536 m_vecOverU.resize(RPOTSCNT*nMaxTrackCnt);
537 fill_n(m_vecOverU.begin(),m_vecOverU.size(),-9999);
538 m_vecOverV.resize(RPOTSCNT*nMaxTrackCnt);
539 fill_n(m_vecOverV.begin(),m_vecOverV.size(),-9999);
540 m_vecOverY.resize(RPOTSCNT*nMaxTrackCnt);
541 fill_n(m_vecOverY.begin(),m_vecOverY.size(),-9999);
542 m_vecNumU.resize(RPOTSCNT*nMaxTrackCnt);
543 fill_n(m_vecNumU.begin(),m_vecNumU.size(),-9999);
544 m_vecNumV.resize(RPOTSCNT*nMaxTrackCnt);
545 fill_n(m_vecNumV.begin(),m_vecNumV.size(),-9999);
546 m_vecNumY.resize(RPOTSCNT*nMaxTrackCnt);
547 fill_n(m_vecNumY.begin(),m_vecNumY.size(),-9999);
548 m_vecMDFibSel.resize(RPOTSCNT*nMaxTrackCnt*MDLAYERSCNT*MDPLATESCNT);
549 fill_n(m_vecMDFibSel.begin(),m_vecMDFibSel.size(),-9999);
550 m_vecODFibSel.resize(RPOTSCNT*nMaxTrackCnt*ODPLATESCNT);
551 fill_n(m_vecODFibSel.begin(),m_vecODFibSel.size(),-9999);
552 }
553 else if(eType==ERC_LOCCORRECTED)
554 {
555 m_vecXLhcCS.resize(RPOTSCNT*nMaxTrackCnt);
556 fill_n(m_vecXLhcCS.begin(),m_vecXLhcCS.size(),-9999);
557 m_vecYLhcCS.resize(RPOTSCNT*nMaxTrackCnt);
558 fill_n(m_vecYLhcCS.begin(),m_vecYLhcCS.size(),-9999);
559 m_vecZLhcCS.resize(RPOTSCNT*nMaxTrackCnt);
560 fill_n(m_vecZLhcCS.begin(),m_vecZLhcCS.size(),-9999);
561 m_vecXRPotCS.resize(RPOTSCNT*nMaxTrackCnt);
562 fill_n(m_vecXRPotCS.begin(),m_vecXRPotCS.size(),-9999);
563 m_vecYRPotCS.resize(RPOTSCNT*nMaxTrackCnt);
564 fill_n(m_vecYRPotCS.begin(),m_vecYRPotCS.size(),-9999);
565 m_vecXStatCS.resize(RPOTSCNT*nMaxTrackCnt);
566 fill_n(m_vecXStatCS.begin(),m_vecXStatCS.size(),-9999);
567 m_vecYStatCS.resize(RPOTSCNT*nMaxTrackCnt);
568 fill_n(m_vecYStatCS.begin(),m_vecYStatCS.size(),-9999);
569 m_vecXBeamCS.resize(RPOTSCNT*nMaxTrackCnt);
570 fill_n(m_vecXBeamCS.begin(),m_vecXBeamCS.size(),-9999);
571 m_vecYBeamCS.resize(RPOTSCNT*nMaxTrackCnt);
572 fill_n(m_vecYBeamCS.begin(),m_vecYBeamCS.size(),-9999);
573 }
574}
@ ERC_LOCCORRECTED
@ ERC_LOCUNCORRECTED
std::vector< float > m_vecXDetCS
std::vector< int > m_vecMDFibSel
std::vector< float > m_vecXLhcCS
std::vector< float > m_vecYLhcCS
std::vector< int > m_vecNumU
std::vector< float > m_vecYStatCS
std::vector< float > m_vecOverU
std::vector< int > m_vecDetectorPartID
std::vector< float > m_vecXRPotCS
std::vector< int > m_vecODFibSel
std::vector< float > m_vecYRPotCS
std::vector< float > m_vecXStatCS
std::vector< int > m_vecNumY
std::vector< float > m_vecYDetCS
std::vector< float > m_vecXBeamCS
std::vector< int > m_vecNumV
std::vector< float > m_vecYBeamCS
std::vector< float > m_vecZLhcCS
std::vector< float > m_vecOverY
std::vector< float > m_vecOverV

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

◆ 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 ALFA_CLinkAlg::execute ( const EventContext & ctx)
overridevirtual

Execute method.

Provides access to the EventContext if needed but is non-const as opposed to AthReentrantAlgorithm.

Implements AthAlgorithm.

Definition at line 61 of file ALFA_CLinkAlg.cxx.

62{
63 ATH_MSG_DEBUG ("ALFA_CLinkAlg::execute()");
64
65
66 auto pDataEvent = std::make_unique<ALFA_CLinkEvent>();
67
68 ATH_CHECK( LoadAllEventData(ctx, *pDataEvent) );
69 if (m_nDataType==1) {
70 DCSID DCSIds;
71 ATH_CHECK( CalcAllDCSIds (ctx, DCSIds) );
72 pDataEvent->SetDCSFolderIDs(&DCSIds);
73 }
74 SG::WriteHandle<ALFA_CLinkEvent> clinkEventH (m_clinkEventKey, ctx);
75 ATH_CHECK( clinkEventH.record (std::move (pDataEvent)) );
76 ATH_CHECK( GenerateXAOD (ctx) );
77
78 return StatusCode::SUCCESS;
79}
struct _DCSID DCSID
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
StatusCode GenerateXAOD(const EventContext &ctx)
StatusCode CalcAllDCSIds(const EventContext &ctx, DCSID &pDCSIds) const
StatusCode LoadAllEventData(const EventContext &ctx, ALFA_CLinkEvent &dataEvent) const
SG::WriteHandleKey< ALFA_CLinkEvent > m_clinkEventKey

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

51{
52 // If we didn't find any symlinks to add, just return the collection
53 // from the base class. Otherwise, return the extended collection.
54 if (!m_extendedExtraObjects.empty()) {
56 }
57 return Algorithm::extraOutputDeps();
58}
DataObjIDColl m_extendedExtraObjects

◆ FillXAOD_HeaderData()

StatusCode ALFA_CLinkAlg::FillXAOD_HeaderData ( const EventContext & ctx,
xAOD::ALFADataContainer & xAODContainer )
private

Definition at line 393 of file ALFA_CLinkAlg.cxx.

395{
396 unsigned int i;
397 int nPotID, nPlateID, nFiberID, nSideID;
399
400 if (m_nDataType==1)
401 {
402 //DCS IDs
403 /*
404 *m_pullDCSBlmID=DataEvent.GetDCSFolderID(EDCSI_BLM);
405 *m_pullDCSHVChannelID=DataEvent.GetDCSFolderID(EDCSI_HVCHANNEL);
406 *m_pullDCSLocalMonitoringID=DataEvent.GetDCSFolderID(EDCSI_LOCALMONITORING);
407 *m_pullDCSMovementID=DataEvent.GetDCSFolderID(EDCSI_MOVEMENT);
408 *m_pullDCSRadMonID=DataEvent.GetDCSFolderID(EDCSI_RADMON);
409 *m_pullDCSTriggerRatesID=DataEvent.GetDCSFolderID(EDCSI_TRIGGERRATES);
410 *m_pullDCSFEConfigurationID=DataEvent.GetDCSFolderID(EDCSI_FECONFIGURATION);
411 *m_pullDCSTriggerSettingsID=DataEvent.GetDCSFolderID(EDCSI_TRIGGERSETTINGS);*/
412
413 //RawDataContainer
414 SG::ReadHandle<ALFA_RawDataContainer> rawDataCont (m_rawDataContKey, ctx);
415 if(rawDataCont.isValid())
416 {
417 //m_nTimeStamp=pRawDataColl->GetTimeStamp();
418 //m_nTimeStamp_ns=pRawDataColl->GetTimeStampns();
419 //m_nBCId=pRawDataColl->GetBCId();
420
421 vector<bool> vecRPPattern;
422 for (const ALFA_RawDataCollection* rawDataColl : *rawDataCont)
423 {
424 nPotID=rawDataColl->GetMBId_POT();
425 (m_vecScaler)[nPotID-1]=rawDataColl->Get_scaler_POT();
426
427 vecRPPattern=rawDataColl->Get_pattern_POT();
428 for(i=0;i<vecRPPattern.size();i++){
429 if(i<RPOTSCNT*TRIGPATCNT) (m_vecTrigPat)[(nPotID-1)*TRIGPATCNT+i]=vecRPPattern[vecRPPattern.size()-(i+1)];
430 }
431 }
432 }
433 else
434 {
435 ATH_MSG_WARNING( "Cannot find '"<< EVCOLLNAME_RAWDATA <<"' collection" );
436 //return StatusCode::FAILURE;
437 }
438 }
439
440 //DigitCollection
441 SG::ReadHandle<ALFA_DigitCollection> digitColl (m_digitCollKey, ctx);
442 if(digitColl.isValid())
443 {
444 for (const ALFA_Digit* digit : *digitColl)
445 {
446 nPotID=digit->getStation(); //in range 0-7
447 nPlateID=digit->getPlate(); //indexed from 0
448 nFiberID=digit->getFiber(); //indexed from 0
449
450 if(nPotID<RPOTSCNT && nPlateID<(MDLAYERSCNT*MDPLATESCNT) && nFiberID<MDFIBERSCNT)
451 {
452 (m_vecMDFiberHits)[(nPotID*MDLAYERSCNT*MDPLATESCNT*MDFIBERSCNT)+(nPlateID*MDFIBERSCNT)+nFiberID]=1;
453 (m_vecMDMultiplicity)[(nPotID*MDLAYERSCNT*MDPLATESCNT)+nPlateID]++;
454 }
455 else
456 {
457 ATH_MSG_ERROR( "Index exceed array size for [RPotID, nPlateID, nFiberID]= ["<<nPotID<<", "<<nPlateID<<", "<<nFiberID<<"]" );
458 //return StatusCode::FAILURE;
459 }
460 }
461 }
462 else{
463 ATH_MSG_WARNING( "Cannot find '"<< EVCOLLNAME_DIGIT <<"' collection" );
464 //return StatusCode::FAILURE;
465 }
466
467 //ODDigitCollection
468 SG::ReadHandle<ALFA_ODDigitCollection> odDigitColl (m_ODDigitCollKey, ctx);
469 if(odDigitColl.isValid())
470 {
471 for (const ALFA_ODDigit* oddigit : *odDigitColl)
472 {
473 nPotID=oddigit->getStation(); //in range 0-7
474 nPlateID=oddigit->getPlate(); //indexed from 0
475 nSideID=oddigit->getSide(); //indexed from 0
476 nFiberID=oddigit->getFiber(); //indexed from 0
477
478 if(nPotID<RPOTSCNT && nPlateID<(ODPLATESCNT) && nFiberID<ODLAYERSCNT*ODFIBERSCNT)
479 {
480 if(nSideID==0){ //right side
482 (m_vecODMultiplicityNeg)[(nPotID*ODPLATESCNT)+nPlateID]++;
483 }
484 else{ //left side
486 (m_vecODMultiplicityPos)[(nPotID*ODPLATESCNT)+nPlateID]++;
487 }
488 }
489 else
490 {
491 ATH_MSG_ERROR( "Index exceed array size for [RPotID, nPlateID, nFiberID, nSideID]= ["<<nPotID<<", "<<nPlateID<<", "<<nFiberID<<", "<<nSideID<<"]" );
492 //return StatusCode::FAILURE;
493 }
494 }
495 }
496 else
497 {
498 ATH_MSG_WARNING( "Cannot find '"<< EVCOLLNAME_ODDIGIT <<"' collection" );
499 //return StatusCode::FAILURE;
500 }
501
502 auto pData =
503 xAODContainer.push_back(std::make_unique<xAOD::ALFAData>());
504
505 //RawDataContainer
506 pData->setScaler(m_vecScaler);
507 //pData->setBCId(m_nBCId);
508 //pData->setTimeStamp(m_nTimeStamp);
509 //pData->setTimeStamp_ns(m_nTimeStamp_ns);
510 pData->setTrigPat(m_vecTrigPat);
511
512 //DigitCollection
513 pData->setMDFiberHits(m_vecMDFiberHits);
514 pData->setMDMultiplicity(m_vecMDMultiplicity);
515
516 //ODDigitCollection
517 pData->setODFiberHitsPos(m_vecODFiberHitsPos);
518 pData->setODFiberHitsNeg(m_vecODFiberHitsNeg);
519 pData->setODMultiplicityPos(m_vecODMultiplicityPos);
520 pData->setODMultiplicityNeg(m_vecODMultiplicityNeg);
521
522 return StatusCode::SUCCESS;
523}
#define EVCOLLNAME_DIGIT
#define EVCOLLNAME_RAWDATA
#define EVCOLLNAME_ODDIGIT
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
SG::ReadHandleKey< ALFA_RawDataContainer > m_rawDataContKey
SG::ReadHandleKey< ALFA_ODDigitCollection > m_ODDigitCollKey
void ClearXAODHeaderData()
SG::ReadHandleKey< ALFA_DigitCollection > m_digitCollKey
value_type push_back(value_type pElem)
Add an element to the end of the collection.

◆ FillXAOD_TrackingData()

StatusCode ALFA_CLinkAlg::FillXAOD_TrackingData ( const EventContext & ctx,
xAOD::ALFADataContainer & xAODContainer )
private

Definition at line 215 of file ALFA_CLinkAlg.cxx.

217{
218 unsigned int i;
219 int nPotID, nSideID, nODSign;
220 int arrTrackCntPerRPot[RPOTSCNT];
221 vector<int> vecFiberSel;
222
223 //LocRecEvCollection & LocRecODEvCollection
224 SG::ReadHandle<ALFA_LocRecEvCollection> locRecEvColl (m_locRecEvCollKey, ctx);
225 SG::ReadHandle<ALFA_LocRecODEvCollection> locRecODEvColl (m_locRecODEvCollKey, ctx);
226
227 if(locRecEvColl.isValid() && locRecODEvColl.isValid())
228 {
230 // resolve max track count from LocRecEvCollection
231 memset(&arrTrackCntPerRPot[0],0,sizeof(arrTrackCntPerRPot));
232 for(const ALFA_LocRecEvent* locRecEvent : *locRecEvColl)
233 {
234 nPotID=locRecEvent->getPotNum();
235 arrTrackCntPerRPot[nPotID]++;
236 }
237 for(const ALFA_LocRecODEvent* locRecODEvent : *locRecODEvColl)
238 {
239 nPotID=locRecODEvent->getPotNum();
240 arrTrackCntPerRPot[nPotID]++;
241 }
242 for(i=0;i<RPOTSCNT;i++){
243 if(arrTrackCntPerRPot[i]>m_nMaxTrackCnt) m_nMaxTrackCnt=arrTrackCntPerRPot[i];
244 }
245
246 memset(&arrTrackCntPerRPot[0],0,sizeof(arrTrackCntPerRPot));
248
249 //fill data - LocRecEvCollection
250 vecFiberSel.clear();
251 for(const ALFA_LocRecEvent* locRecEvent : *locRecEvColl)
252 {
253 nPotID=locRecEvent->getPotNum();
254
255 (m_vecDetectorPartID)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=1;
256 (m_vecXDetCS)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecEvent->getXposition();
257 (m_vecYDetCS)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecEvent->getYposition();
258
259 (m_vecOverU)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecEvent->getOverU();
260 (m_vecOverV)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecEvent->getOverV();
261 (m_vecNumU)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecEvent->getNumU();
262 (m_vecNumV)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecEvent->getNumV();
263
264 vecFiberSel=locRecEvent->getFibSel();
265 for(i=0;i<vecFiberSel.size();i++)
266 {
267 (m_vecMDFibSel)[nPotID*m_nMaxTrackCnt*MDLAYERSCNT*MDPLATESCNT+arrTrackCntPerRPot[nPotID]*MDLAYERSCNT*MDPLATESCNT+i]=vecFiberSel[i];
268 }
269
270 arrTrackCntPerRPot[nPotID]++;
271 }
272
273 //fill data - LocRecODEvCollection
274 vecFiberSel.clear();
275 for(const ALFA_LocRecODEvent* locRecODEvent : *locRecODEvColl)
276 {
277 nPotID=locRecODEvent->getPotNum();
278 nSideID=locRecODEvent->getSide();
279
280 nODSign=(nSideID==0)? -1:1;
281 (m_vecDetectorPartID)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=(nSideID==0)? 3:2;
282 (m_vecXDetCS)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=nODSign*22.0;
283 (m_vecYDetCS)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecODEvent->getYposition();
284 (m_vecOverY)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecODEvent->getOverY();
285 (m_vecNumY)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecODEvent->getNumY();
286
287 vecFiberSel=locRecODEvent->getFibSel();
288 for(i=0;i<vecFiberSel.size();i++)
289 {
290 (m_vecODFibSel)[nPotID*m_nMaxTrackCnt*ODPLATESCNT+arrTrackCntPerRPot[nPotID]*ODPLATESCNT+i]=vecFiberSel[i];
291 }
292
293 arrTrackCntPerRPot[nPotID]++;
294 }
295
296 }
297 else
298 {
299 ATH_MSG_WARNING( "Cannot find '"<< EVCOLLNAME_LOCREC <<"' or '"<<EVCOLLNAME_LOCRECOD<<"' collection" );
300 //return StatusCode::FAILURE;
301 }
302
303 //LocRecCorrEvCollection && LocRecCorrODEvCollection
304 SG::ReadHandle<ALFA_LocRecCorrEvCollection> locRecCorrEvColl (m_locRecCorrEvCollKey, ctx);
305 SG::ReadHandle<ALFA_LocRecCorrODEvCollection> locRecCorrODEvColl (m_locRecCorrODEvCollKey, ctx);
306
307 if(locRecCorrEvColl.isValid() && locRecCorrODEvColl.isValid())
308 {
309 memset(&arrTrackCntPerRPot[0],0,sizeof(arrTrackCntPerRPot));
311
312 //fill data - LocRecCorrEvCollection - ONLY DetCS for now (TODO rest)
313 for(const ALFA_LocRecCorrEvent* locRecCorrEvent : *locRecCorrEvColl)
314 {
315 nPotID=locRecCorrEvent->getPotNum();
316
317 (m_vecXLhcCS)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecCorrEvent->getXpositionLHC();
318 (m_vecYLhcCS)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecCorrEvent->getYpositionLHC();
319 (m_vecZLhcCS)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecCorrEvent->getZpositionLHC();
320
321 (m_vecXRPotCS)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecCorrEvent->getXpositionPot();
322 (m_vecYRPotCS)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecCorrEvent->getYpositionPot();
323
324 (m_vecXStatCS)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecCorrEvent->getXpositionStat();
325 (m_vecYStatCS)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecCorrEvent->getYpositionStat();
326
327 (m_vecXBeamCS)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecCorrEvent->getXpositionBeam();
328 (m_vecYBeamCS)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecCorrEvent->getYpositionBeam();
329
330 arrTrackCntPerRPot[nPotID]++;
331 }
332
333 //fill data - LocRecCorrODEvCollection - ONLY DetCS for now (TODO rest)
334 for(const ALFA_LocRecCorrODEvent* locRecCorrODEvent : *locRecCorrODEvColl)
335 {
336 nPotID=locRecCorrODEvent->getPotNum();
337 nSideID=locRecCorrODEvent->getSide();
338
339 nODSign=(nSideID==0)? -1:1;
340 (m_vecXLhcCS)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=nODSign*22.0;
341 (m_vecYLhcCS)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecCorrODEvent->getYpositionLHC();
342 (m_vecZLhcCS)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecCorrODEvent->getZpositionLHC();
343
344 (m_vecXRPotCS)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=nODSign*22.0;
345 (m_vecYRPotCS)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecCorrODEvent->getYpositionPot();
346
347 (m_vecXStatCS)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=nODSign*22.0;
348 (m_vecYStatCS)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecCorrODEvent->getYpositionStat();
349
350 (m_vecXBeamCS)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=nODSign*22.0;
351 (m_vecYBeamCS)[nPotID*m_nMaxTrackCnt+arrTrackCntPerRPot[nPotID]]=locRecCorrODEvent->getYpositionBeam();
352
353 arrTrackCntPerRPot[nPotID]++;
354 }
355 }
356 else
357 {
358 ATH_MSG_WARNING( "Cannot find '"<< EVCOLLNAME_LOCRECCORR <<"' or '"<<EVCOLLNAME_LOCRECCORROD<<"' collection" );
359 //return StatusCode::FAILURE;
360 }
361
362 auto pData =
363 xAODContainer.push_back(std::make_unique<xAOD::ALFAData>());
364
365 //LocRecEvCollection & LocRecODEvCollection
366 pData->setXDetCS(m_vecXDetCS);
367 pData->setYDetCS(m_vecYDetCS);
368 pData->setDetectorPartID(m_vecDetectorPartID);
369 pData->setMaxTrackCnt(m_nMaxTrackCnt);
370 pData->setOverU(m_vecOverU);
371 pData->setOverV(m_vecOverV);
372 pData->setOverY(m_vecOverY);
373 pData->setNumU(m_vecNumU);
374 pData->setNumV(m_vecNumV);
375 pData->setNumY(m_vecNumY);
376 pData->setMDFibSel(m_vecMDFibSel);
377 pData->setODFibSel(m_vecODFibSel);
378
379 //LocRecCorrEvCollection & LocRecCorrODEvCollection
380 pData->setXLhcCS(m_vecXLhcCS);
381 pData->setYLhcCS(m_vecYLhcCS);
382 pData->setZLhcCS(m_vecZLhcCS);
383 pData->setXRPotCS(m_vecXRPotCS);
384 pData->setYRPotCS(m_vecYRPotCS);
385 pData->setXStatCS(m_vecXStatCS);
386 pData->setYStatCS(m_vecYStatCS);
387 pData->setXBeamCS(m_vecXBeamCS);
388 pData->setYBeamCS(m_vecYBeamCS);
389
390 return StatusCode::SUCCESS;
391}
#define EVCOLLNAME_LOCRECOD
#define EVCOLLNAME_LOCRECCORR
#define EVCOLLNAME_LOCRECCORROD
#define EVCOLLNAME_LOCREC
SG::ReadHandleKey< ALFA_LocRecEvCollection > m_locRecEvCollKey
SG::ReadHandleKey< ALFA_LocRecCorrEvCollection > m_locRecCorrEvCollKey
void ClearXAODTrackingData(const int nMaxTrackCnt, eRecType eType)
SG::ReadHandleKey< ALFA_LocRecCorrODEvCollection > m_locRecCorrODEvCollKey
SG::ReadHandleKey< ALFA_LocRecODEvCollection > m_locRecODEvCollKey

◆ filterPassed() [1/2]

bool AthAlgorithm::filterPassed ( ) const
inherited

Definition at line 94 of file AthAlgorithm.cxx.

94 {
95 return filterPassed( Gaudi::Hive::currentContext() );
96}
bool filterPassed() const

◆ filterPassed() [2/2]

bool AthAlgorithm::filterPassed ( const EventContext & ctx) const
inherited

Definition at line 98 of file AthAlgorithm.cxx.

98 {
99 return execState( ctx ).filterPassed();
100}

◆ finalize()

StatusCode ALFA_CLinkAlg::finalize ( )
overridevirtual

Definition at line 81 of file ALFA_CLinkAlg.cxx.

82{
83 ATH_MSG_DEBUG ("ALFA_CLinkAlg::finalize()");
84
85 return StatusCode::SUCCESS;
86}

◆ GenerateXAOD()

StatusCode ALFA_CLinkAlg::GenerateXAOD ( const EventContext & ctx)
private

Definition at line 199 of file ALFA_CLinkAlg.cxx.

200{
201 auto pxAODContainer = std::make_unique<xAOD::ALFADataContainer>();
202 auto pxAODAuxContainer = std::make_unique<xAOD::ALFADataAuxContainer>();
203 pxAODContainer->setStore(pxAODAuxContainer.get());
204
205 CHECK(FillXAOD_TrackingData(ctx, *pxAODContainer));
206 CHECK(FillXAOD_HeaderData(ctx, *pxAODContainer));
207
208 SG::WriteHandle<xAOD::ALFADataContainer> xaodData (m_xaodDataKey, ctx);
209 ATH_CHECK( xaodData.record (std::move(pxAODContainer),
210 std::move(pxAODAuxContainer)) );
211
212 return StatusCode::SUCCESS;
213}
#define CHECK(...)
Evaluate an expression and check for errors.
StatusCode FillXAOD_HeaderData(const EventContext &ctx, xAOD::ALFADataContainer &xAODContainer)
StatusCode FillXAOD_TrackingData(const EventContext &ctx, xAOD::ALFADataContainer &xAODContainer)
SG::WriteHandleKey< xAOD::ALFADataContainer > m_xaodDataKey

◆ getContext()

const EventContext & AthAlgorithm::getContext ( ) const
inherited

Deprecated methods (use the ones with EventContext).

Definition at line 90 of file AthAlgorithm.cxx.

90 {
91 return Gaudi::Hive::currentContext();
92}

◆ initialize()

StatusCode ALFA_CLinkAlg::initialize ( )
overridevirtual

Definition at line 34 of file ALFA_CLinkAlg.cxx.

35{
36 ATH_MSG_DEBUG ("ALFA_CLinkAlg::initialize()");
37
38 ATH_CHECK( m_BLMKey.initialize (m_nDataType==1) );
39 ATH_CHECK( m_HVChannelKey.initialize (m_nDataType==1) );
41 ATH_CHECK( m_movementKey.initialize (m_nDataType==1) );
42 ATH_CHECK( m_radmonKey.initialize (m_nDataType==1) );
43 ATH_CHECK( m_triggerRatesKey.initialize (m_nDataType==1) );
46
47 ATH_CHECK( m_rawDataContKey.initialize (m_nDataType==1) );
48 ATH_CHECK( m_digitCollKey.initialize() );
49 ATH_CHECK( m_ODDigitCollKey.initialize() );
50 ATH_CHECK( m_locRecEvCollKey.initialize() );
51 ATH_CHECK( m_locRecODEvCollKey.initialize() );
52 ATH_CHECK( m_locRecCorrEvCollKey.initialize() );
53 ATH_CHECK( m_locRecCorrODEvCollKey.initialize() );
54
55 ATH_CHECK( m_clinkEventKey.initialize() );
56 ATH_CHECK( m_xaodDataKey.initialize() );
57
58 return StatusCode::SUCCESS;
59}

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

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 111 of file AthAlgorithm.h.

111{ return false; }

◆ LoadAllEventData()

StatusCode ALFA_CLinkAlg::LoadAllEventData ( const EventContext & ctx,
ALFA_CLinkEvent & dataEvent ) const

Definition at line 88 of file ALFA_CLinkAlg.cxx.

90{
91 //RawDataContainer
92 if (m_nDataType==1)
93 {
94 SG::ReadHandle<ALFA_RawDataContainer> rawDataCont (m_rawDataContKey, ctx);
95 if(!rawDataCont.isValid())
96 {
97 ATH_MSG_WARNING( "Container '"<<EVCOLLNAME_RAWDATA<<"' not found" );
98 //return StatusCode::FAILURE;
99 }
100 else ATH_CHECK(dataEvent.AddLink(EDVT_RAWDATAEVCOLLECTION, rawDataCont.cptr()));
101 }
102
103 //DigitCollection
104 SG::ReadHandle<ALFA_DigitCollection> digitColl (m_digitCollKey, ctx);
105 if(!digitColl.isValid()) {
106 ATH_MSG_WARNING( "Container '"<<EVCOLLNAME_DIGIT<<"' not found" );
107 //return StatusCode::FAILURE;
108 }
109 else ATH_CHECK(dataEvent.AddLink(EDVT_DIGITCOLLECTION, digitColl.cptr()));
110
111 //ODDigitCollection
112 SG::ReadHandle<ALFA_ODDigitCollection> odDigitColl (m_ODDigitCollKey, ctx);
113 if(!odDigitColl.isValid()) {
114 ATH_MSG_WARNING( "Container '"<<EVCOLLNAME_ODDIGIT<<"' not found" );
115 //return StatusCode::FAILURE;
116 }
117 else ATH_CHECK(dataEvent.AddLink(EDVT_ODDIGITCOLLECTION, odDigitColl.cptr()));
118
119 //LocRecEvCollection
120 SG::ReadHandle<ALFA_LocRecEvCollection> locRecEvColl (m_locRecEvCollKey, ctx);
121 if(!locRecEvColl.isValid()) {
122 ATH_MSG_WARNING( "Container '"<<EVCOLLNAME_LOCREC<<"' not found" );
123 //return StatusCode::FAILURE;
124 }
125 else ATH_CHECK(dataEvent.AddLink(EDVT_LOCRECEVCOLLECTION, locRecEvColl.cptr()));
126
127 //LocRecODEvCollection
128 SG::ReadHandle<ALFA_LocRecODEvCollection> locRecODEvColl (m_locRecODEvCollKey, ctx);
129 if(!locRecODEvColl.isValid()) {
130 ATH_MSG_WARNING( "Container '"<<EVCOLLNAME_LOCRECOD<<"' not found" );
131 //return StatusCode::FAILURE;
132 }
133 else CHECK(dataEvent.AddLink(EDVT_LOCRECODEVCOLLECTION, locRecODEvColl.cptr()));
134
135 //LocRecCorrEvCollection
136 SG::ReadHandle<ALFA_LocRecCorrEvCollection> locRecCorrEvColl (m_locRecCorrEvCollKey, ctx);
137 if(!locRecCorrEvColl.isValid()) {
138 ATH_MSG_WARNING( "Container '"<<EVCOLLNAME_LOCRECCORR<<"' not found" );
139 //return StatusCode::FAILURE;
140 }
141 else CHECK(dataEvent.AddLink(EDVT_LOCRECCORREVCOLLECTION, locRecCorrEvColl.cptr()));
142
143 //LocRecCorrODEvCollection
144 SG::ReadHandle<ALFA_LocRecCorrODEvCollection> locRecCorrODEvColl (m_locRecCorrODEvCollKey, ctx);
145 if(!locRecCorrODEvColl.isValid()) {
146 ATH_MSG_WARNING("Container '"<<EVCOLLNAME_LOCRECCORROD<<"' not found" );
147 //return StatusCode::FAILURE;
148 }
149 else CHECK(dataEvent.AddLink(EDVT_LOCRECCORRODEVCOLLECTION, locRecCorrODEvColl.cptr()));
150
151 return StatusCode::SUCCESS;
152
153}
@ EDVT_LOCRECCORREVCOLLECTION
@ EDVT_LOCRECEVCOLLECTION
@ EDVT_RAWDATAEVCOLLECTION
@ EDVT_DIGITCOLLECTION
@ EDVT_ODDIGITCOLLECTION
@ EDVT_LOCRECCORRODEVCOLLECTION
@ EDVT_LOCRECODEVCOLLECTION
StatusCode AddLink(eDVType eType, const void *pObj)

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

◆ 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() [1/2]

void AthAlgorithm::setFilterPassed ( bool state) const
inherited

Definition at line 102 of file AthAlgorithm.cxx.

102 {
103 setFilterPassed( state, Gaudi::Hive::currentContext() );
104}
void setFilterPassed(bool state) const

◆ setFilterPassed() [2/2]

void AthAlgorithm::setFilterPassed ( bool state,
const EventContext & ctx ) const
inherited

Definition at line 106 of file AthAlgorithm.cxx.

106 {
107 execState( ctx ).setFilterPassed(state);
108}

◆ sysInitialize()

StatusCode AthAlgorithm::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 AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, and PyAthena::Alg.

Definition at line 66 of file AthAlgorithm.cxx.

66 {
68
69 if (sc.isFailure()) {
70 return sc;
71 }
72 ServiceHandle<ICondSvc> cs("CondSvc",name());
73 for (auto h : outputHandles()) {
74 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75 // do this inside the loop so we don't create the CondSvc until needed
76 if ( cs.retrieve().isFailure() ) {
77 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78 return StatusCode::SUCCESS;
79 }
80 if (cs->regHandle(this,*h).isFailure()) {
81 sc = StatusCode::FAILURE;
82 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83 << " with CondSvc");
84 }
85 }
86 }
87 return sc;
88}
static Double_t sc
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
::StatusCode StatusCode
StatusCode definition for legacy code.

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

SG::ReadCondHandleKey<CondAttrListCollection> ALFA_CLinkAlg::m_BLMKey { this, "BLMKey", DCSCOLLNAME_BLM, "BLM conditions key" }
private

Definition at line 125 of file ALFA_CLinkAlg.h.

126{ this, "BLMKey", DCSCOLLNAME_BLM, "BLM conditions key" };
#define DCSCOLLNAME_BLM

◆ m_clinkEventKey

SG::WriteHandleKey<ALFA_CLinkEvent> ALFA_CLinkAlg::m_clinkEventKey { this, "CLinkEventKey", "ALFA_CLinkEvent", "SG key for output CLinkEvent" }
private

Definition at line 157 of file ALFA_CLinkAlg.h.

158{ this, "CLinkEventKey", "ALFA_CLinkEvent", "SG key for output CLinkEvent" };

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

SG::ReadHandleKey<ALFA_DigitCollection> ALFA_CLinkAlg::m_digitCollKey { this, "DigitCollKey", EVCOLLNAME_DIGIT, "SG key for digit collection" }
private

Definition at line 144 of file ALFA_CLinkAlg.h.

145{ this, "DigitCollKey", EVCOLLNAME_DIGIT, "SG key for digit collection" };

◆ 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 AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 114 of file AthAlgorithm.h.

◆ m_FEConfigurationKey

SG::ReadCondHandleKey<CondAttrListCollection> ALFA_CLinkAlg::m_FEConfigurationKey { this, "FEConfigurationKey", DCSCOLLNAME_FECONFIGURATION, "FE configuration conditions key" }
private

Definition at line 137 of file ALFA_CLinkAlg.h.

138{ this, "FEConfigurationKey", DCSCOLLNAME_FECONFIGURATION, "FE configuration conditions key" };
#define DCSCOLLNAME_FECONFIGURATION

◆ m_HVChannelKey

SG::ReadCondHandleKey<CondAttrListCollection> ALFA_CLinkAlg::m_HVChannelKey { this, "HVChannelKey", DCSCOLLNAME_HVCHANNEL, "HV channel conditions key" }
private

Definition at line 127 of file ALFA_CLinkAlg.h.

128{ this, "HVChannelKey", DCSCOLLNAME_HVCHANNEL, "HV channel conditions key" };
#define DCSCOLLNAME_HVCHANNEL

◆ m_localMonitoringKey

SG::ReadCondHandleKey<CondAttrListCollection> ALFA_CLinkAlg::m_localMonitoringKey { this, "LocalMonitoringKey", DCSCOLLNAME_LOCALMONITORING, "Local monitoring conditions key" }
private

Definition at line 129 of file ALFA_CLinkAlg.h.

130{ this, "LocalMonitoringKey", DCSCOLLNAME_LOCALMONITORING, "Local monitoring conditions key" };
#define DCSCOLLNAME_LOCALMONITORING

◆ m_locRecCorrEvCollKey

SG::ReadHandleKey<ALFA_LocRecCorrEvCollection> ALFA_CLinkAlg::m_locRecCorrEvCollKey { this, "LocRecCorrEvCollectionKey", EVCOLLNAME_LOCRECCORR, "SG key for LocRecCorrEv collection" }
private

Definition at line 152 of file ALFA_CLinkAlg.h.

153{ this, "LocRecCorrEvCollectionKey", EVCOLLNAME_LOCRECCORR, "SG key for LocRecCorrEv collection" };

◆ m_locRecCorrODEvCollKey

SG::ReadHandleKey<ALFA_LocRecCorrODEvCollection> ALFA_CLinkAlg::m_locRecCorrODEvCollKey { this, "LocRecCorrODEvCollectionKey", EVCOLLNAME_LOCRECCORROD, "SG key for LocRecCorrODEv collection" }
private

Definition at line 154 of file ALFA_CLinkAlg.h.

155{ this, "LocRecCorrODEvCollectionKey", EVCOLLNAME_LOCRECCORROD, "SG key for LocRecCorrODEv collection" };

◆ m_locRecEvCollKey

SG::ReadHandleKey<ALFA_LocRecEvCollection> ALFA_CLinkAlg::m_locRecEvCollKey { this, "LocRecEvCollectionKey", EVCOLLNAME_LOCREC, "SG key for LocRecEv collection" }
private

Definition at line 148 of file ALFA_CLinkAlg.h.

149{ this, "LocRecEvCollectionKey", EVCOLLNAME_LOCREC, "SG key for LocRecEv collection" };

◆ m_locRecODEvCollKey

SG::ReadHandleKey<ALFA_LocRecODEvCollection> ALFA_CLinkAlg::m_locRecODEvCollKey { this, "LocRecEvODCollectionKey", EVCOLLNAME_LOCRECOD, "SG key for LocRecEvOD collection" }
private

Definition at line 150 of file ALFA_CLinkAlg.h.

151{ this, "LocRecEvODCollectionKey", EVCOLLNAME_LOCRECOD, "SG key for LocRecEvOD collection" };

◆ m_movementKey

SG::ReadCondHandleKey<CondAttrListCollection> ALFA_CLinkAlg::m_movementKey { this, "MovementKey", DCSCOLLNAME_LOCALMONITORING, "Movement conditions key" }
private

Definition at line 131 of file ALFA_CLinkAlg.h.

132{ this, "MovementKey", DCSCOLLNAME_LOCALMONITORING, "Movement conditions key" };

◆ m_nDataType

int ALFA_CLinkAlg::m_nDataType
private

Definition at line 59 of file ALFA_CLinkAlg.h.

◆ m_nMaxTrackCnt

int ALFA_CLinkAlg::m_nMaxTrackCnt
private

Definition at line 84 of file ALFA_CLinkAlg.h.

◆ m_nProcessingMode

int ALFA_CLinkAlg::m_nProcessingMode
private

Definition at line 60 of file ALFA_CLinkAlg.h.

◆ m_ODDigitCollKey

SG::ReadHandleKey<ALFA_ODDigitCollection> ALFA_CLinkAlg::m_ODDigitCollKey { this, "ODDigitCollKey", EVCOLLNAME_ODDIGIT, "SG key for OD digit collection" }
private

Definition at line 146 of file ALFA_CLinkAlg.h.

147{ this, "ODDigitCollKey", EVCOLLNAME_ODDIGIT, "SG key for OD digit collection" };

◆ m_radmonKey

SG::ReadCondHandleKey<CondAttrListCollection> ALFA_CLinkAlg::m_radmonKey { this, "RadmonKey", DCSCOLLNAME_RADMON, "Radmon conditions key" }
private

Definition at line 133 of file ALFA_CLinkAlg.h.

134{ this, "RadmonKey", DCSCOLLNAME_RADMON, "Radmon conditions key" };
#define DCSCOLLNAME_RADMON

◆ m_rawDataContKey

SG::ReadHandleKey<ALFA_RawDataContainer> ALFA_CLinkAlg::m_rawDataContKey { this, "RawDataContKey", EVCOLLNAME_RAWDATA, "SG key for raw data container" }
private

Definition at line 142 of file ALFA_CLinkAlg.h.

143{ this, "RawDataContKey", EVCOLLNAME_RAWDATA, "SG key for raw data container" };

◆ m_triggerRatesKey

SG::ReadCondHandleKey<CondAttrListCollection> ALFA_CLinkAlg::m_triggerRatesKey { this, "TriggerRatesKey", DCSCOLLNAME_TRIGGERRATES, "Trigger rates conditions key" }
private

Definition at line 135 of file ALFA_CLinkAlg.h.

136{ this, "TriggerRatesKey", DCSCOLLNAME_TRIGGERRATES, "Trigger rates conditions key" };
#define DCSCOLLNAME_TRIGGERRATES

◆ m_triggerSettingsKey

SG::ReadCondHandleKey<CondAttrListCollection> ALFA_CLinkAlg::m_triggerSettingsKey { this, "TriggerSettingsKey", DCSCOLLNAME_TRIGGERSETTINGS, "Trigger settings conditions key" }
private

Definition at line 139 of file ALFA_CLinkAlg.h.

140{ this, "TriggerSettingsKey", DCSCOLLNAME_TRIGGERSETTINGS, "Trigger settings conditions key" };
#define DCSCOLLNAME_TRIGGERSETTINGS

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vecDetectorPartID

std::vector<int> ALFA_CLinkAlg::m_vecDetectorPartID
private

Definition at line 87 of file ALFA_CLinkAlg.h.

◆ m_vecMDFiberHits

std::vector<int> ALFA_CLinkAlg::m_vecMDFiberHits
private

Definition at line 116 of file ALFA_CLinkAlg.h.

◆ m_vecMDFibSel

std::vector<int> ALFA_CLinkAlg::m_vecMDFibSel
private

Definition at line 94 of file ALFA_CLinkAlg.h.

◆ m_vecMDMultiplicity

std::vector<int> ALFA_CLinkAlg::m_vecMDMultiplicity
private

Definition at line 117 of file ALFA_CLinkAlg.h.

◆ m_vecNumU

std::vector<int> ALFA_CLinkAlg::m_vecNumU
private

Definition at line 91 of file ALFA_CLinkAlg.h.

◆ m_vecNumV

std::vector<int> ALFA_CLinkAlg::m_vecNumV
private

Definition at line 92 of file ALFA_CLinkAlg.h.

◆ m_vecNumY

std::vector<int> ALFA_CLinkAlg::m_vecNumY
private

Definition at line 93 of file ALFA_CLinkAlg.h.

◆ m_vecODFiberHitsNeg

std::vector<int> ALFA_CLinkAlg::m_vecODFiberHitsNeg
private

Definition at line 121 of file ALFA_CLinkAlg.h.

◆ m_vecODFiberHitsPos

std::vector<int> ALFA_CLinkAlg::m_vecODFiberHitsPos
private

Definition at line 120 of file ALFA_CLinkAlg.h.

◆ m_vecODFibSel

std::vector<int> ALFA_CLinkAlg::m_vecODFibSel
private

Definition at line 95 of file ALFA_CLinkAlg.h.

◆ m_vecODMultiplicityNeg

std::vector<int> ALFA_CLinkAlg::m_vecODMultiplicityNeg
private

Definition at line 123 of file ALFA_CLinkAlg.h.

◆ m_vecODMultiplicityPos

std::vector<int> ALFA_CLinkAlg::m_vecODMultiplicityPos
private

Definition at line 122 of file ALFA_CLinkAlg.h.

◆ m_vecOverU

std::vector<float> ALFA_CLinkAlg::m_vecOverU
private

Definition at line 88 of file ALFA_CLinkAlg.h.

◆ m_vecOverV

std::vector<float> ALFA_CLinkAlg::m_vecOverV
private

Definition at line 89 of file ALFA_CLinkAlg.h.

◆ m_vecOverY

std::vector<float> ALFA_CLinkAlg::m_vecOverY
private

Definition at line 90 of file ALFA_CLinkAlg.h.

◆ m_vecScaler

std::vector<int> ALFA_CLinkAlg::m_vecScaler
private

Definition at line 109 of file ALFA_CLinkAlg.h.

◆ m_vecTrigPat

std::vector<int> ALFA_CLinkAlg::m_vecTrigPat
private

Definition at line 113 of file ALFA_CLinkAlg.h.

◆ m_vecXBeamCS

std::vector<float> ALFA_CLinkAlg::m_vecXBeamCS
private

Definition at line 105 of file ALFA_CLinkAlg.h.

◆ m_vecXDetCS

std::vector<float> ALFA_CLinkAlg::m_vecXDetCS
private

Definition at line 85 of file ALFA_CLinkAlg.h.

◆ m_vecXLhcCS

std::vector<float> ALFA_CLinkAlg::m_vecXLhcCS
private

Definition at line 98 of file ALFA_CLinkAlg.h.

◆ m_vecXRPotCS

std::vector<float> ALFA_CLinkAlg::m_vecXRPotCS
private

Definition at line 101 of file ALFA_CLinkAlg.h.

◆ m_vecXStatCS

std::vector<float> ALFA_CLinkAlg::m_vecXStatCS
private

Definition at line 103 of file ALFA_CLinkAlg.h.

◆ m_vecYBeamCS

std::vector<float> ALFA_CLinkAlg::m_vecYBeamCS
private

Definition at line 106 of file ALFA_CLinkAlg.h.

◆ m_vecYDetCS

std::vector<float> ALFA_CLinkAlg::m_vecYDetCS
private

Definition at line 86 of file ALFA_CLinkAlg.h.

◆ m_vecYLhcCS

std::vector<float> ALFA_CLinkAlg::m_vecYLhcCS
private

Definition at line 99 of file ALFA_CLinkAlg.h.

◆ m_vecYRPotCS

std::vector<float> ALFA_CLinkAlg::m_vecYRPotCS
private

Definition at line 102 of file ALFA_CLinkAlg.h.

◆ m_vecYStatCS

std::vector<float> ALFA_CLinkAlg::m_vecYStatCS
private

Definition at line 104 of file ALFA_CLinkAlg.h.

◆ m_vecZLhcCS

std::vector<float> ALFA_CLinkAlg::m_vecZLhcCS
private

Definition at line 100 of file ALFA_CLinkAlg.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_xaodDataKey

SG::WriteHandleKey<xAOD::ALFADataContainer> ALFA_CLinkAlg::m_xaodDataKey { this, "xAODDataKey", EVCOLLNAME_XAODALFADATACONTAINER, "SG key for output xAOD::ALFADataContainer" }
private

Definition at line 159 of file ALFA_CLinkAlg.h.

160{ this, "xAODDataKey", EVCOLLNAME_XAODALFADATACONTAINER, "SG key for output xAOD::ALFADataContainer" };
#define EVCOLLNAME_XAODALFADATACONTAINER

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