ATLAS Offline Software
Loading...
Searching...
No Matches
TrigByteStreamInputSvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGBYTESTREAMINPUTSVC_H
6#define TRIGBYTESTREAMINPUTSVC_H
7
14#include <memory.h>
15
16// Forward declarations
17class StoreGateSvc;
18
24class TrigByteStreamInputSvc : public extends<AthService, IByteStreamInputSvc> {
25public:
27 TrigByteStreamInputSvc(const std::string& name, ISvcLocator* svcLoc);
30
31 // ------------------------- Service methods --------------------------------
32 virtual StatusCode initialize() override;
33 virtual StatusCode finalize() override;
34
35 // ------------------------- ByteStreamInputSvc methods ----------------------
36 virtual const RawEvent* nextEvent() override;
37 virtual const RawEvent* previousEvent() override;
38 virtual const RawEvent* currentEvent() const override;
39
40private:
41 // ------------------------- Service handles ---------------------------------
42 ServiceHandle<IROBDataProviderSvc> m_robDataProviderSvc {this, "ROBDataProvider", "ROBDataProviderSvc"};
43 ServiceHandle<StoreGateSvc> m_evtStore {this, "EventStore", "StoreGateSvc"};
44 ToolHandle<GenericMonitoringTool> m_monTool {this, "MonTool", "" , "Monitoring tool"};
45
46 // ------------------------- Properties --------------------------------------
47 Gaudi::Property<int> m_checkCTPFragmentModuleID {this, "CheckCTPFragmentModuleID", -1,
48 "After reading a new event, assert we can retrieve the CTP fragment with Module ID given by this property, "
49 "and that has no errors. A value <0 disables the check."};
50
51 // ------------------------- Private data members ----------------------------
52 struct EventCache {
53 ~EventCache() = default;
54 void releaseEvent();
55 std::unique_ptr<RawEvent> fullEventFragment {nullptr};
56 std::unique_ptr<uint32_t[]> rawData {nullptr};
57 };
58
60 uint16_t m_maxLB{0};
61};
62
63#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.
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.