ATLAS Offline Software
ByteStreamRDP_OutputSvc.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 BYTESTREAMRDP_OUTPUTSVC_H
6 #define BYTESTREAMRDP_OUTPUTSVC_H
7 
18 #include "ByteStreamData/RawEvent.h"
22 #include "GaudiKernel/ServiceHandle.h"
23 
25 
26 class ByteStreamRDP_OutputSvc: public extends<AthService, IByteStreamOutputSvc> {
27 public:
29  ByteStreamRDP_OutputSvc(const std::string& name, ISvcLocator* svcloc);
30 
32  virtual StatusCode initialize() override;
33 
35  virtual bool putEvent(const RawEvent* re) override;
36  virtual bool putEvent(const RawEvent* re, const EventContext& ctx) override;
37 
38 private: // data
39  struct EventCache {
40  void releaseEvent() {
41  this->rawEvent.reset();
42  this->dataBuffer.reset();
43  }
44  std::unique_ptr<RawEvent> rawEvent {nullptr};
45  std::unique_ptr<uint32_t[]> dataBuffer {nullptr};
46  };
48 
50  this, "ROBDataProviderSvc", "ROBDataProviderSvc", "ROB data provider"};
51  Gaudi::Property<std::string> m_bsOutputStreamName {
52  this, "BSOutputStreamName", "", "Stream name for multiple output"};
53 };
54 
55 #endif
ByteStreamRDP_OutputSvc::putEvent
virtual bool putEvent(const RawEvent *re) override
Implementation of the IByteStreamOutputSvc interface methods.
Definition: ByteStreamRDP_OutputSvc.cxx:33
ByteStreamRDP_OutputSvc::EventCache::releaseEvent
void releaseEvent()
Definition: ByteStreamRDP_OutputSvc.h:40
ByteStreamRDP_OutputSvc::EventCache
Definition: ByteStreamRDP_OutputSvc.h:39
RawEvent
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment RawEvent
data type for reading raw event
Definition: RawEvent.h:37
ByteStreamRDP_OutputSvc::m_bsOutputStreamName
Gaudi::Property< std::string > m_bsOutputStreamName
Definition: ByteStreamRDP_OutputSvc.h:51
ByteStreamRDP_OutputSvc::EventCache::rawEvent
std::unique_ptr< RawEvent > rawEvent
Current event fragment.
Definition: ByteStreamRDP_OutputSvc.h:44
IROBDataProviderSvc
Interface class for managing ROB for both online and offline.
Definition: IROBDataProviderSvc.h:23
SG::SlotSpecificObj
Maintain a set of objects, one per slot.
Definition: AthenaKernel/AthenaKernel/SlotSpecificObj.h:70
IByteStreamOutputSvc.h
This file contains the interface for the ByteStreamOutputSvc classes.
RawEvent.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ByteStreamRDP_OutputSvc
Writing the data to ROBDataProviderSvc for transient BS.
Definition: ByteStreamRDP_OutputSvc.h:26
ByteStreamRDP_OutputSvc::m_robProvider
ServiceHandle< IROBDataProviderSvc > m_robProvider
Definition: ByteStreamRDP_OutputSvc.h:49
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ByteStreamRDP_OutputSvc::ByteStreamRDP_OutputSvc
ByteStreamRDP_OutputSvc(const std::string &name, ISvcLocator *svcloc)
Constructors:
Definition: ByteStreamRDP_OutputSvc.cxx:17
ByteStreamRDP_OutputSvc::EventCache::dataBuffer
std::unique_ptr< uint32_t[]> dataBuffer
Underlying data structure.
Definition: ByteStreamRDP_OutputSvc.h:45
re
const boost::regex re(r_e)
AthService.h
SlotSpecificObj.h
Maintain a set of objects, one per slot.
ByteStreamRDP_OutputSvc::m_eventsCache
SG::SlotSpecificObj< EventCache > m_eventsCache
Cache of event data for each slot.
Definition: ByteStreamRDP_OutputSvc.h:47
ByteStreamRDP_OutputSvc::initialize
virtual StatusCode initialize() override
Required of all Gaudi Services.
Definition: ByteStreamRDP_OutputSvc.cxx:23
ServiceHandle< IROBDataProviderSvc >