ATLAS Offline Software
Loading...
Searching...
No Matches
TrigByteStreamInputSvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGBYTESTREAMINPUTSVC_H
6#define TRIGBYTESTREAMINPUTSVC_H
7
14#include "EFInterfaceSvc.h"
15#include <memory.h>
16
17// Forward declarations
18class StoreGateSvc;
19
25class TrigByteStreamInputSvc : public extends<AthService, IByteStreamInputSvc> {
26public:
28 TrigByteStreamInputSvc(const std::string& name, ISvcLocator* svcLoc);
31
32 // Helper for swapping between the 2 interfaces enum
34
35 // ------------------------- Service methods --------------------------------
36 virtual StatusCode initialize() override;
37 virtual StatusCode finalize() override;
38
39 // ------------------------- ByteStreamInputSvc methods ----------------------
40 virtual const RawEvent* nextEvent() override;
41 virtual const RawEvent* previousEvent() override;
42 virtual const RawEvent* currentEvent() const override;
43
44private:
45 // ------------------------- Service handles ---------------------------------
46 ServiceHandle<IROBDataProviderSvc> m_robDataProviderSvc {this, "ROBDataProvider", "ROBDataProviderSvc"};
47 ServiceHandle<EFInterfaceSvc> m_efInterfaceSvc {this, "EFInterfaceSvc", "", "Online service managing EF interface with Dataflow"};
48 ServiceHandle<StoreGateSvc> m_evtStore {this, "EventStore", "StoreGateSvc"};
49 ToolHandle<GenericMonitoringTool> m_monTool {this, "MonTool", "" , "Monitoring tool"};
50
51 // ------------------------- Properties --------------------------------------
52 Gaudi::Property<int> m_checkCTPFragmentModuleID {this, "CheckCTPFragmentModuleID", -1,
53 "After reading a new event, assert we can retrieve the CTP fragment with Module ID given by this property, "
54 "and that has no errors. A value <0 disables the check."};
55
56 // ------------------------- Private data members ----------------------------
57 struct EventCache {
58 ~EventCache() = default;
59 void releaseEvent();
60 std::unique_ptr<RawEvent> fullEventFragment {nullptr};
61 std::unique_ptr<uint32_t[]> rawData {nullptr};
62 };
63
65 uint16_t m_maxLB{0};
66 bool m_hasEFInterface{false};
67};
68
69#endif // TRIGBYTESTREAMINPUTSVC_H
Maintain a set of objects, one per slot.
This file contains the interface for the ByteStreamInputSvc classes.
Header file to be included by clients of the Monitored infrastructure.
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment RawEvent
data type for reading raw event
Definition RawEvent.h:37
Maintain a set of objects, one per slot.
The Athena Transient Store API.
virtual const RawEvent * currentEvent() const override
TrigByteStreamInputSvc(const std::string &name, ISvcLocator *svcLoc)
Standard constructor.
ServiceHandle< EFInterfaceSvc > m_efInterfaceSvc
uint16_t m_maxLB
Maximum lumi block number seen so far, used for monitoring.
virtual const RawEvent * previousEvent() override
virtual const RawEvent * nextEvent() override
SG::SlotSpecificObj< EventCache > m_eventsCache
Cache of RawEvent pointer per event slot.
virtual ~TrigByteStreamInputSvc()
Standard destructor.
virtual StatusCode finalize() override
Gaudi::Property< int > m_checkCTPFragmentModuleID
ServiceHandle< IROBDataProviderSvc > m_robDataProviderSvc
ToolHandle< GenericMonitoringTool > m_monTool
ServiceHandle< StoreGateSvc > m_evtStore
virtual StatusCode initialize() override
std::unique_ptr< uint32_t[]> rawData
Underlying data structure.
std::unique_ptr< RawEvent > fullEventFragment
Current event fragment.