58 return StatusCode::SUCCESS;
66 auto pDataEvent = std::make_unique<ALFA_CLinkEvent>();
72 pDataEvent->SetDCSFolderIDs(&DCSIds);
78 return StatusCode::SUCCESS;
85 return StatusCode::SUCCESS;
129 if(!locRecODEvColl.
isValid()) {
137 if(!locRecCorrEvColl.
isValid()) {
145 if(!locRecCorrODEvColl.
isValid()) {
151 return StatusCode::SUCCESS;
159 unsigned long long ullID;
164 if (!
h.range (range))
return 0;
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));
171 else if(time.isTimeStamp()){
172 ullID = time.time_stamp();
174 ullID |= time.time_stamp_ns_offset();
196 return bRes? StatusCode::SUCCESS:StatusCode::FAILURE;
201 auto pxAODContainer = std::make_unique<xAOD::ALFADataContainer>();
202 auto pxAODAuxContainer = std::make_unique<xAOD::ALFADataAuxContainer>();
203 pxAODContainer->setStore(pxAODAuxContainer.get());
210 std::move(pxAODAuxContainer)) );
212 return StatusCode::SUCCESS;
219 int nPotID, nSideID, nODSign;
221 vector<int> vecFiberSel;
231 memset(&arrTrackCntPerRPot[0],0,
sizeof(arrTrackCntPerRPot));
234 nPotID=locRecEvent->getPotNum();
235 arrTrackCntPerRPot[nPotID]++;
239 nPotID=locRecODEvent->getPotNum();
240 arrTrackCntPerRPot[nPotID]++;
246 memset(&arrTrackCntPerRPot[0],0,
sizeof(arrTrackCntPerRPot));
253 nPotID=locRecEvent->getPotNum();
264 vecFiberSel=locRecEvent->getFibSel();
265 for(i=0;i<vecFiberSel.size();i++)
270 arrTrackCntPerRPot[nPotID]++;
277 nPotID=locRecODEvent->getPotNum();
278 nSideID=locRecODEvent->getSide();
280 nODSign=(nSideID==0)? -1:1;
287 vecFiberSel=locRecODEvent->getFibSel();
288 for(i=0;i<vecFiberSel.size();i++)
293 arrTrackCntPerRPot[nPotID]++;
309 memset(&arrTrackCntPerRPot[0],0,
sizeof(arrTrackCntPerRPot));
315 nPotID=locRecCorrEvent->getPotNum();
330 arrTrackCntPerRPot[nPotID]++;
336 nPotID=locRecCorrODEvent->getPotNum();
337 nSideID=locRecCorrODEvent->getSide();
339 nODSign=(nSideID==0)? -1:1;
353 arrTrackCntPerRPot[nPotID]++;
363 xAODContainer.
push_back(std::make_unique<xAOD::ALFAData>());
390 return StatusCode::SUCCESS;
397 int nPotID, nPlateID, nFiberID, nSideID;
421 vector<bool> vecRPPattern;
424 nPotID=rawDataColl->GetMBId_POT();
425 (
m_vecScaler)[nPotID-1]=rawDataColl->Get_scaler_POT();
427 vecRPPattern=rawDataColl->Get_pattern_POT();
428 for(i=0;i<vecRPPattern.size();i++){
446 nPotID=digit->getStation();
447 nPlateID=digit->getPlate();
448 nFiberID=digit->getFiber();
457 ATH_MSG_ERROR(
"Index exceed array size for [RPotID, nPlateID, nFiberID]= ["<<nPotID<<
", "<<nPlateID<<
", "<<nFiberID<<
"]" );
473 nPotID=oddigit->getStation();
474 nPlateID=oddigit->getPlate();
475 nSideID=oddigit->getSide();
476 nFiberID=oddigit->getFiber();
491 ATH_MSG_ERROR(
"Index exceed array size for [RPotID, nPlateID, nFiberID, nSideID]= ["<<nPotID<<
", "<<nPlateID<<
", "<<nFiberID<<
", "<<nSideID<<
"]" );
503 xAODContainer.
push_back(std::make_unique<xAOD::ALFAData>());
522 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
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
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
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.
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