ATLAS Offline Software
ByteStreamRDP_OutputSvc.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 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"
21 #include "GaudiKernel/ServiceHandle.h"
22 
24 
26 public:
28  ByteStreamRDP_OutputSvc(const std::string& name, ISvcLocator* svcloc);
29 
31  virtual StatusCode initialize() override;
32 
34  virtual bool putEvent(const RawEvent* re) override;
35  virtual bool putEvent(const RawEvent* re, const EventContext& ctx) override;
36 
38  StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
39 
40 private: // data
41  struct EventCache {
42  void releaseEvent() {
43  this->rawEvent.reset();
44  this->dataBuffer.reset();
45  }
46  std::unique_ptr<RawEvent> rawEvent {nullptr};
47  std::unique_ptr<uint32_t[]> dataBuffer {nullptr};
48  };
50 
52  this, "ROBDataProviderSvc", "ROBDataProviderSvc", "ROB data provider"};
53  Gaudi::Property<std::string> m_bsOutputStreamName {
54  this, "BSOutputStreamName", "", "Stream name for multiple output"};
55 };
56 
57 #endif
ByteStreamRDP_OutputSvc::putEvent
virtual bool putEvent(const RawEvent *re) override
Implementation of the ByteStreamOutputSvc interface methods.
Definition: ByteStreamRDP_OutputSvc.cxx:39
ByteStreamOutputSvc.h
This file contains the class definition for the ByteStreamOutputSvc class.
ByteStreamRDP_OutputSvc::EventCache::releaseEvent
void releaseEvent()
Definition: ByteStreamRDP_OutputSvc.h:42
ByteStreamRDP_OutputSvc::EventCache
Definition: ByteStreamRDP_OutputSvc.h:41
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:53
ByteStreamRDP_OutputSvc::EventCache::rawEvent
std::unique_ptr< RawEvent > rawEvent
Current event fragment.
Definition: ByteStreamRDP_OutputSvc.h:46
IROBDataProviderSvc
Interface class for managing ROB for both online and offline.
Definition: IROBDataProviderSvc.h:25
SG::SlotSpecificObj
Maintain a set of objects, one per slot.
Definition: AthenaKernel/AthenaKernel/SlotSpecificObj.h:70
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:25
ByteStreamRDP_OutputSvc::m_robProvider
ServiceHandle< IROBDataProviderSvc > m_robProvider
Definition: ByteStreamRDP_OutputSvc.h:51
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
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:47
re
const boost::regex re(r_e)
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:49
ByteStreamOutputSvc
This class provides the base class to services to write bytestream data. The concrete class can provi...
Definition: ByteStreamOutputSvc.h:25
ByteStreamRDP_OutputSvc::initialize
virtual StatusCode initialize() override
Required of all Gaudi Services.
Definition: ByteStreamRDP_OutputSvc.cxx:23
ByteStreamRDP_OutputSvc::queryInterface
StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface) override
Required of all Gaudi services: see Gaudi documentation for details.
Definition: ByteStreamRDP_OutputSvc.cxx:61
ServiceHandle< IROBDataProviderSvc >