ATLAS Offline Software
ByteStreamInputSvc.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef BYTESTREAMCNVSVC_BYTESTREAMINPUTSVC_H
6 #define BYTESTREAMCNVSVC_BYTESTREAMINPUTSVC_H
7 
14 #include <exception>
18 
24 public:
26  ByteStreamInputSvc(const std::string& name, ISvcLocator* svcloc);
28  virtual ~ByteStreamInputSvc(void);
29 
31  static const InterfaceID& interfaceID();
32 
34  virtual const RawEvent* nextEvent() = 0;
35  virtual const RawEvent* previousEvent() = 0;
36  virtual void setEvent(void* /*data*/, unsigned int /*status*/) {}
38  virtual const RawEvent* currentEvent() const = 0;
40  virtual unsigned int currentEventStatus() const;
41  virtual std::pair<long,std::string> getBlockIterator(const std::string& /* file */);
42  virtual void closeBlockIterator(bool);
43  virtual bool ready();
44  virtual StatusCode generateDataHeader();
45  virtual long positionInBlock();
46  virtual void validateEvent();
47 };
48 
49 inline const InterfaceID& ByteStreamInputSvc::interfaceID() {
51  static const InterfaceID IID_ByteStreamInputSvc("ByteStreamInputSvc", 1, 0);
52  return(IID_ByteStreamInputSvc);
53 }
54 
55 inline unsigned int ByteStreamInputSvc::currentEventStatus() const {
56  return(0);
57 }
58 
59 // Virtual methods needed for file input
60 inline std::pair<long,std::string> ByteStreamInputSvc::getBlockIterator(const std::string& /* file */) {return std::make_pair(-1,"GUID");}
62 inline bool ByteStreamInputSvc::ready() {return false;}
63 inline StatusCode ByteStreamInputSvc::generateDataHeader() {return StatusCode::SUCCESS;}
64 inline long ByteStreamInputSvc::positionInBlock() {return -1;}
66 #endif
ByteStreamInputSvc::previousEvent
virtual const RawEvent * previousEvent()=0
ByteStreamInputSvc
This class provides the base class to services to read bytestream data. The concrete class can provid...
Definition: ByteStreamInputSvc.h:23
ByteStreamInputSvc::closeBlockIterator
virtual void closeBlockIterator(bool)
Definition: ByteStreamInputSvc.h:61
ByteStreamInputSvc::~ByteStreamInputSvc
virtual ~ByteStreamInputSvc(void)
destructor
Definition: ByteStreamInputSvc.cxx:13
RawEvent
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment RawEvent
data type for reading raw event
Definition: RawEvent.h:37
ByteStreamInputSvc::ByteStreamInputSvc
ByteStreamInputSvc(const std::string &name, ISvcLocator *svcloc)
constructor
Definition: ByteStreamInputSvc.cxx:8
ByteStreamInputSvc::validateEvent
virtual void validateEvent()
Definition: ByteStreamInputSvc.h:65
ByteStreamInputSvc::setEvent
virtual void setEvent(void *, unsigned int)
Definition: ByteStreamInputSvc.h:36
RawEvent.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthService
Definition: AthService.h:32
ByteStreamExceptions.h
ByteStreamInputSvc::positionInBlock
virtual long positionInBlock()
Definition: ByteStreamInputSvc.h:64
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ByteStreamInputSvc::currentEvent
virtual const RawEvent * currentEvent() const =0
virtual method for accessing the current event
ByteStreamInputSvc::getBlockIterator
virtual std::pair< long, std::string > getBlockIterator(const std::string &)
Definition: ByteStreamInputSvc.h:60
AthService.h
ByteStreamInputSvc::ready
virtual bool ready()
Definition: ByteStreamInputSvc.h:62
ByteStreamInputSvc::interfaceID
static const InterfaceID & interfaceID()
Retrieve interface ID.
Definition: ByteStreamInputSvc.h:49
ByteStreamInputSvc::currentEventStatus
virtual unsigned int currentEventStatus() const
virtual method for accessing the current event status
Definition: ByteStreamInputSvc.h:55
ByteStreamInputSvc::nextEvent
virtual const RawEvent * nextEvent()=0
virtual method for advance to the next event
ByteStreamInputSvc::generateDataHeader
virtual StatusCode generateDataHeader()
Definition: ByteStreamInputSvc.h:63