ATLAS Offline Software
Loading...
Searching...
No Matches
TrigByteStreamCnvSvc.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 TRIGBYTESTREAMCNVSVC_H
6#define TRIGBYTESTREAMCNVSVC_H
7
12
13// Forward declarations
14class StoreGateSvc;
16
23class TrigByteStreamCnvSvc : public extends<ByteStreamCnvSvcBase,
24 IByteStreamCnvSvc, IByteStreamEventAccess> {
25public:
27 TrigByteStreamCnvSvc(const std::string& name, ISvcLocator* svcLoc);
29 virtual ~TrigByteStreamCnvSvc();
30
31 // ------------------------- IService methods --------------------------------
32 virtual StatusCode initialize() override;
33 virtual StatusCode finalize() override;
34
35 // ------------------------- IConversionSvc methods --------------------------
37 virtual StatusCode connectOutput(const std::string& outputFile) override;
39 StatusCode connectOutput(const std::string& outputFile, const EventContext& eventContext);
41 virtual StatusCode connectOutput(const std::string& outputFile, const std::string& openMode) override;
43 virtual StatusCode commitOutput(const std::string& outputFile, bool do_commit) override;
45 StatusCode commitOutput(const std::string& outputFile, bool do_commit, const EventContext& eventContext);
46
47 // ------------------------- IByteStreamEventAccess methods ------------------
49 virtual RawEventWrite* getRawEvent() override;
51 RawEventWrite* getRawEvent(const EventContext& eventContext) const;
52
53protected:
54 // ------------------------- IByteStreamCnvSvc methods ------------------
55 virtual FullEventAssemblerBase* findFullEventAssembler(const std::string& name) const override;
56 virtual StatusCode storeFullEventAssembler(std::unique_ptr<FullEventAssemblerBase> fea, const std::string& name) override;
57
58private:
59 // ------------------------- Helper methods ----------------------------------
61 RawEventWrite* setRawEvent(std::unique_ptr<RawEventWrite>&& rawEventWrite, const EventContext& eventContext);
63 void clearRawEvent(const EventContext& eventContext);
65 void printRawEvent(const EventContext& eventContext) const;
67 void monitorRawEvent(const std::unique_ptr<uint32_t[]>& rawEventPtr) const;
69 const EventContext* currentContext() const;
70
71 // ------------------------- Service / Tool handles --------------------------
72 ServiceHandle<StoreGateSvc> m_evtStore {this, "EventStore", "StoreGateSvc"};
73 ServiceHandle<IROBDataProviderSvc> m_robDataProviderSvc {this, "ROBDataProvider", "ROBDataProviderSvc"};
74 ToolHandle<GenericMonitoringTool> m_monTool {this, "MonTool", "" , "Monitoring tool"};
75
76 // ------------------------- Other private members ---------------------------
78};
79
80#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
virtual FullEventAssemblerBase * findFullEventAssembler(const std::string &name) const override
void clearRawEvent(const EventContext &eventContext)
Delete raw event from the cache.
ServiceHandle< IROBDataProviderSvc > m_robDataProviderSvc