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 () override
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.
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

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< 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()
Default constructor:
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 184 of file ALFA_CLinkAlg.cxx.

186{
187 bool bRes=true;
188
189 bRes&=(DCSIds.ullBlmID=CalcDCSId(ctx, m_BLMKey))>0;
190 bRes&=(DCSIds.ullHVChannelID=CalcDCSId(ctx, m_HVChannelKey))>0;
191 bRes&=(DCSIds.ullLocalMonitoringID=CalcDCSId(ctx, m_localMonitoringKey))>0;
192 bRes&=(DCSIds.ullMovementID=CalcDCSId(ctx, m_movementKey))>0;
193 bRes&=(DCSIds.ullRadMonID=CalcDCSId(ctx, m_radmonKey))>0;
194 bRes&=(DCSIds.ullTriggerRatesID=CalcDCSId(ctx, m_triggerRatesKey))>0;
195 bRes&=(DCSIds.ullFEConfigurationID=CalcDCSId(ctx, m_FEConfigurationKey))>0;
196 bRes&=(DCSIds.ullTriggerSettingsID=CalcDCSId(ctx, m_triggerSettingsKey))>0;
197 return bRes? StatusCode::SUCCESS:StatusCode::FAILURE;
198}
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 157 of file ALFA_CLinkAlg.cxx.

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

◆ ClearXAODHeaderData()

void ALFA_CLinkAlg::ClearXAODHeaderData ( )
private

Definition at line 577 of file ALFA_CLinkAlg.cxx.

578{
579 if (m_nDataType==1)
580 {
581 //DCS IDs
582 /*
583 *m_pullDCSBlmID=0;
584 *m_pullDCSHVChannelID=0;
585 *m_pullDCSLocalMonitoringID=0;
586 *m_pullDCSMovementID=0;
587 *m_pullDCSRadMonID=0;
588 *m_pullDCSTriggerRatesID=0;
589 *m_pullDCSFEConfigurationID=0;
590 *m_pullDCSTriggerSettingsID=0;*/
591
592 //RawDataContainer
593 m_vecScaler.resize(RPOTSCNT);
594 fill_n(m_vecScaler.begin(),m_vecScaler.size(),-1);
595 //m_nBCId=-1;
596 //m_nTimeStamp=-1;
597 //m_nTimeStamp_ns=-1;
599 fill_n(m_vecTrigPat.begin(),m_vecTrigPat.size(),0);
600 }
601
602 //DigitCollection
604 fill_n(m_vecMDFiberHits.begin(),m_vecMDFiberHits.size(),0);
606 fill_n(m_vecMDMultiplicity.begin(),m_vecMDMultiplicity.size(),0);
607
608 //ODDigitCollection
610 fill_n(m_vecODFiberHitsPos.begin(),m_vecODFiberHitsPos.size(),0);
612 fill_n(m_vecODFiberHitsNeg.begin(),m_vecODFiberHitsNeg.size(),0);
613
615 fill_n(m_vecODMultiplicityPos.begin(),m_vecODMultiplicityPos.size(),0);
617 fill_n(m_vecODMultiplicityNeg.begin(),m_vecODMultiplicityNeg.size(),0);
618}
#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 526 of file ALFA_CLinkAlg.cxx.

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

Definition at line 61 of file ALFA_CLinkAlg.cxx.

62{
63 ATH_MSG_DEBUG ("ALFA_CLinkAlg::execute()");
64
65 const EventContext& ctx = Gaudi::Hive::currentContext();
66
67 auto pDataEvent = std::make_unique<ALFA_CLinkEvent>();
68
69 ATH_CHECK( LoadAllEventData(ctx, *pDataEvent) );
70 if (m_nDataType==1) {
71 DCSID DCSIds;
72 ATH_CHECK( CalcAllDCSIds (ctx, DCSIds) );
73 pDataEvent->SetDCSFolderIDs(&DCSIds);
74 }
75 SG::WriteHandle<ALFA_CLinkEvent> clinkEventH (m_clinkEventKey, ctx);
76 ATH_CHECK( clinkEventH.record (std::move (pDataEvent)) );
77 ATH_CHECK( GenerateXAOD (ctx) );
78
79 return StatusCode::SUCCESS;
80}
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< 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 394 of file ALFA_CLinkAlg.cxx.

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

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

◆ finalize()

StatusCode ALFA_CLinkAlg::finalize ( )
overridevirtual

Definition at line 82 of file ALFA_CLinkAlg.cxx.

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

◆ GenerateXAOD()

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

Definition at line 200 of file ALFA_CLinkAlg.cxx.

201{
202 auto pxAODContainer = std::make_unique<xAOD::ALFADataContainer>();
203 auto pxAODAuxContainer = std::make_unique<xAOD::ALFADataAuxContainer>();
204 pxAODContainer->setStore(pxAODAuxContainer.get());
205
206 CHECK(FillXAOD_TrackingData(ctx, *pxAODContainer));
207 CHECK(FillXAOD_HeaderData(ctx, *pxAODContainer));
208
209 SG::WriteHandle<xAOD::ALFADataContainer> xaodData (m_xaodDataKey, ctx);
210 ATH_CHECK( xaodData.record (std::move(pxAODContainer),
211 std::move(pxAODAuxContainer)) );
212
213 return StatusCode::SUCCESS;
214}
#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

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

◆ LoadAllEventData()

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

Definition at line 89 of file ALFA_CLinkAlg.cxx.

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

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< 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< 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< 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< Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ 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< 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< 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< 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 }
std::vector< SG::VarHandleKeyArray * > m_vhka

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< 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< 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 79 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< 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< 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: