58 return StatusCode::SUCCESS;
65 const EventContext& ctx = Gaudi::Hive::currentContext();
67 auto pDataEvent = std::make_unique<ALFA_CLinkEvent>();
73 pDataEvent->SetDCSFolderIDs(&DCSIds);
79 return StatusCode::SUCCESS;
86 return StatusCode::SUCCESS;
130 if(!locRecODEvColl.
isValid()) {
138 if(!locRecCorrEvColl.
isValid()) {
146 if(!locRecCorrODEvColl.
isValid()) {
152 return StatusCode::SUCCESS;
160 unsigned long long ullID;
165 if (!
h.range (range))
return 0;
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));
172 else if(time.isTimeStamp()){
173 ullID = time.time_stamp();
175 ullID |= time.time_stamp_ns_offset();
197 return bRes? StatusCode::SUCCESS:StatusCode::FAILURE;
202 auto pxAODContainer = std::make_unique<xAOD::ALFADataContainer>();
203 auto pxAODAuxContainer = std::make_unique<xAOD::ALFADataAuxContainer>();
204 pxAODContainer->setStore(pxAODAuxContainer.get());
211 std::move(pxAODAuxContainer)) );
213 return StatusCode::SUCCESS;
220 int nPotID, nSideID, nODSign;
222 vector<int> vecFiberSel;
232 memset(&arrTrackCntPerRPot[0],0,
sizeof(arrTrackCntPerRPot));
235 nPotID=locRecEvent->getPotNum();
236 arrTrackCntPerRPot[nPotID]++;
240 nPotID=locRecODEvent->getPotNum();
241 arrTrackCntPerRPot[nPotID]++;
247 memset(&arrTrackCntPerRPot[0],0,
sizeof(arrTrackCntPerRPot));
254 nPotID=locRecEvent->getPotNum();
265 vecFiberSel=locRecEvent->getFibSel();
266 for(i=0;i<vecFiberSel.size();i++)
271 arrTrackCntPerRPot[nPotID]++;
278 nPotID=locRecODEvent->getPotNum();
279 nSideID=locRecODEvent->getSide();
281 nODSign=(nSideID==0)? -1:1;
288 vecFiberSel=locRecODEvent->getFibSel();
289 for(i=0;i<vecFiberSel.size();i++)
294 arrTrackCntPerRPot[nPotID]++;
310 memset(&arrTrackCntPerRPot[0],0,
sizeof(arrTrackCntPerRPot));
316 nPotID=locRecCorrEvent->getPotNum();
331 arrTrackCntPerRPot[nPotID]++;
337 nPotID=locRecCorrODEvent->getPotNum();
338 nSideID=locRecCorrODEvent->getSide();
340 nODSign=(nSideID==0)? -1:1;
354 arrTrackCntPerRPot[nPotID]++;
364 xAODContainer.
push_back(std::make_unique<xAOD::ALFAData>());
391 return StatusCode::SUCCESS;
398 int nPotID, nPlateID, nFiberID, nSideID;
422 vector<bool> vecRPPattern;
425 nPotID=rawDataColl->GetMBId_POT();
426 (
m_vecScaler)[nPotID-1]=rawDataColl->Get_scaler_POT();
428 vecRPPattern=rawDataColl->Get_pattern_POT();
429 for(i=0;i<vecRPPattern.size();i++){
447 nPotID=digit->getStation();
448 nPlateID=digit->getPlate();
449 nFiberID=digit->getFiber();
458 ATH_MSG_ERROR(
"Index exceed array size for [RPotID, nPlateID, nFiberID]= ["<<nPotID<<
", "<<nPlateID<<
", "<<nFiberID<<
"]" );
474 nPotID=oddigit->getStation();
475 nPlateID=oddigit->getPlate();
476 nSideID=oddigit->getSide();
477 nFiberID=oddigit->getFiber();
492 ATH_MSG_ERROR(
"Index exceed array size for [RPotID, nPlateID, nFiberID, nSideID]= ["<<nPotID<<
", "<<nPlateID<<
", "<<nFiberID<<
", "<<nSideID<<
"]" );
504 xAODContainer.
push_back(std::make_unique<xAOD::ALFAData>());
523 return StatusCode::SUCCESS;
#define EVCOLLNAME_LOCRECOD
#define EVCOLLNAME_LOCRECCORR
#define EVCOLLNAME_RAWDATA
@ EDVT_LOCRECCORREVCOLLECTION
@ EDVT_LOCRECEVCOLLECTION
@ EDVT_RAWDATAEVCOLLECTION
@ EDVT_LOCRECCORRODEVCOLLECTION
@ EDVT_LOCRECODEVCOLLECTION
#define EVCOLLNAME_LOCRECCORROD
#define EVCOLLNAME_LOCREC
#define EVCOLLNAME_ODDIGIT
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
std::vector< float > m_vecXDetCS
SG::ReadCondHandleKey< CondAttrListCollection > m_radmonKey
std::vector< int > m_vecODMultiplicityPos
SG::ReadHandleKey< ALFA_RawDataContainer > m_rawDataContKey
unsigned long long CalcDCSId(const EventContext &ctx, const SG::ReadCondHandleKey< CondAttrListCollection > &key) const
SG::ReadHandleKey< ALFA_ODDigitCollection > m_ODDigitCollKey
std::vector< int > m_vecMDFibSel
SG::ReadCondHandleKey< CondAttrListCollection > m_movementKey
std::vector< float > m_vecXLhcCS
SG::ReadCondHandleKey< CondAttrListCollection > m_triggerRatesKey
StatusCode GenerateXAOD(const EventContext &ctx)
std::vector< float > m_vecYLhcCS
virtual StatusCode execute() override
SG::ReadHandleKey< ALFA_LocRecEvCollection > m_locRecEvCollKey
std::vector< int > m_vecNumU
virtual StatusCode finalize() override
std::vector< float > m_vecYStatCS
SG::ReadCondHandleKey< CondAttrListCollection > m_localMonitoringKey
std::vector< float > m_vecOverU
std::vector< int > m_vecDetectorPartID
std::vector< int > m_vecODMultiplicityNeg
StatusCode FillXAOD_HeaderData(const EventContext &ctx, xAOD::ALFADataContainer &xAODContainer)
std::vector< float > m_vecXRPotCS
StatusCode CalcAllDCSIds(const EventContext &ctx, DCSID &pDCSIds) const
std::vector< int > m_vecODFibSel
std::vector< int > m_vecODFiberHitsPos
void ClearXAODHeaderData()
std::vector< float > m_vecYRPotCS
std::vector< int > m_vecMDMultiplicity
SG::ReadHandleKey< ALFA_LocRecCorrEvCollection > m_locRecCorrEvCollKey
std::vector< float > m_vecXStatCS
std::vector< int > m_vecNumY
StatusCode FillXAOD_TrackingData(const EventContext &ctx, xAOD::ALFADataContainer &xAODContainer)
std::vector< int > m_vecScaler
std::vector< float > m_vecYDetCS
StatusCode LoadAllEventData(const EventContext &ctx, ALFA_CLinkEvent &dataEvent) const
SG::ReadCondHandleKey< CondAttrListCollection > m_FEConfigurationKey
std::vector< float > m_vecXBeamCS
SG::ReadCondHandleKey< CondAttrListCollection > m_triggerSettingsKey
virtual StatusCode initialize() override
std::vector< int > m_vecMDFiberHits
SG::ReadCondHandleKey< CondAttrListCollection > m_HVChannelKey
std::vector< int > m_vecNumV
std::vector< float > m_vecYBeamCS
SG::ReadHandleKey< ALFA_DigitCollection > m_digitCollKey
void ClearXAODTrackingData(const int nMaxTrackCnt, eRecType eType)
ALFA_CLinkAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::WriteHandleKey< ALFA_CLinkEvent > m_clinkEventKey
std::vector< float > m_vecZLhcCS
std::vector< float > m_vecOverY
std::vector< int > m_vecODFiberHitsNeg
SG::WriteHandleKey< xAOD::ALFADataContainer > m_xaodDataKey
SG::ReadHandleKey< ALFA_LocRecCorrODEvCollection > m_locRecCorrODEvCollKey
std::vector< int > m_vecTrigPat
std::vector< float > m_vecOverV
SG::ReadHandleKey< ALFA_LocRecODEvCollection > m_locRecODEvCollKey
SG::ReadCondHandleKey< CondAttrListCollection > m_BLMKey
StatusCode AddLink(eDVType eType, const void *pObj)
RDOs : Chamber Service Module, collection of RawData.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
ALFADataContainer_v1 ALFADataContainer
unsigned long long ullFEConfigurationID
unsigned long long ullLocalMonitoringID
unsigned long long ullRadMonID
unsigned long long ullHVChannelID
unsigned long long ullMovementID
unsigned long long ullTriggerSettingsID
unsigned long long ullTriggerRatesID
unsigned long long ullBlmID