ATLAS Offline Software
Loading...
Searching...
No Matches
TrigByteStreamCnvSvc.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 TRIGBYTESTREAMCNVSVC_H
6#define TRIGBYTESTREAMCNVSVC_H
7
12#include "EFInterfaceSvc.h"
13
14// Forward declarations
15class StoreGateSvc;
17
24class TrigByteStreamCnvSvc : public extends<ByteStreamCnvSvcBase,
25 IByteStreamCnvSvc, IByteStreamEventAccess> {
26public:
28 TrigByteStreamCnvSvc(const std::string& name, ISvcLocator* svcLoc);
30 virtual ~TrigByteStreamCnvSvc();
31
32 // ------------------------- IService methods --------------------------------
33 virtual StatusCode initialize() override;
34 virtual StatusCode finalize() override;
35
36 // ------------------------- IConversionSvc methods --------------------------
38 virtual StatusCode connectOutput(const std::string& outputFile) override;
40 StatusCode connectOutput(const std::string& outputFile, const EventContext& eventContext);
42 virtual StatusCode connectOutput(const std::string& outputFile, const std::string& openMode) override;
44 virtual StatusCode commitOutput(const std::string& outputFile, bool do_commit) override;
46 StatusCode commitOutput(const std::string& outputFile, bool do_commit, const EventContext& eventContext);
47
48 // ------------------------- IByteStreamEventAccess methods ------------------
50 virtual RawEventWrite* getRawEvent() override;
52 RawEventWrite* getRawEvent(const EventContext& eventContext) const;
53
54protected:
55 // ------------------------- IByteStreamCnvSvc methods ------------------
56 virtual FullEventAssemblerBase* findFullEventAssembler(const std::string& name) const override;
57 virtual StatusCode storeFullEventAssembler(std::unique_ptr<FullEventAssemblerBase> fea, const std::string& name) override;
58
59private:
60 // ------------------------- Helper methods ----------------------------------
62 RawEventWrite* setRawEvent(std::unique_ptr<RawEventWrite>&& rawEventWrite, const EventContext& eventContext);
64 void clearRawEvent(const EventContext& eventContext);
66 void printRawEvent(const EventContext& eventContext) const;
68 void monitorRawEvent(const std::unique_ptr<uint32_t[]>& rawEventPtr) const;
70 const EventContext* currentContext() const;
71
72 // ------------------------- Service / Tool handles --------------------------
73 ServiceHandle<StoreGateSvc> m_evtStore {this, "EventStore", "StoreGateSvc"};
74 ServiceHandle<IROBDataProviderSvc> m_robDataProviderSvc {this, "ROBDataProvider", "ROBDataProviderSvc"};
75 ServiceHandle<EFInterfaceSvc> m_efInterfaceSvc {this, "EFInterfaceSvc", "", "Online service managing EF interface with Dataflow"};
76 ToolHandle<GenericMonitoringTool> m_monTool {this, "MonTool", "" , "Monitoring tool"};
77
78 // ------------------------- Other private members ---------------------------
80 bool m_hasEFInterface{false};
81};
82
83#endif // TRIGBYTESTREAMCNVSVC_H
Maintain a set of objects, one per slot.
Header file to be included by clients of the Monitored infrastructure.
OFFLINE_FRAGMENTS_NAMESPACE_WRITE::FullEventFragment RawEventWrite
data type for writing raw event
Definition RawEvent.h:39
base class for assembling a full atlas raw event from subfragments
Interface class for managing ROB for both online and offline.
Maintain a set of objects, one per slot.
The Athena Transient Store API.
const EventContext * currentContext() const
Hack used in HLT to avoid using ThreadLocalContext, see explanation in the implementation.
RawEventWrite * setRawEvent(std::unique_ptr< RawEventWrite > &&rawEventWrite, const EventContext &eventContext)
Store new raw event in the cache.
virtual StatusCode finalize() override
TrigByteStreamCnvSvc(const std::string &name, ISvcLocator *svcLoc)
Standard constructor.
void monitorRawEvent(const std::unique_ptr< uint32_t[]> &rawEventPtr) const
Fill histograms from contents of a FullEventFragment.
virtual StatusCode connectOutput(const std::string &outputFile) override
In the case of online BS data, this method creates the output FullEventFragment and fills its header.
virtual StatusCode storeFullEventAssembler(std::unique_ptr< FullEventAssemblerBase > fea, const std::string &name) override
virtual ~TrigByteStreamCnvSvc()
Standard destructor.
virtual StatusCode commitOutput(const std::string &outputFile, bool do_commit) override
In the case of online BS data, this method binds and sends out the output FullEventFragment.
virtual StatusCode initialize() override
virtual RawEventWrite * getRawEvent() override
Return a pointer to the raw event for the current event context.
SG::SlotSpecificObj< std::unique_ptr< RawEventWrite > > m_rawEventWriteCache
void printRawEvent(const EventContext &eventContext) const
Print contents of the raw event.
ServiceHandle< StoreGateSvc > m_evtStore
ToolHandle< GenericMonitoringTool > m_monTool
ServiceHandle< EFInterfaceSvc > m_efInterfaceSvc
virtual FullEventAssemblerBase * findFullEventAssembler(const std::string &name) const override
void clearRawEvent(const EventContext &eventContext)
Delete raw event from the cache.
ServiceHandle< IROBDataProviderSvc > m_robDataProviderSvc