10#include "GaudiKernel/Bootstrap.h"
11#include "GaudiKernel/ISvcLocator.h"
12#include "GaudiKernel/MsgStream.h"
13#include "GaudiKernel/PropertyMgr.h"
20 : base_class( name, svcloc ), m_fw( 0 ) {
22 declareProperty(
"OutputFile", m_outputFile =
"offline.raw" );
24 m_buffer =
new uint32_t[64 * 1024];
29 MsgStream log(
msgSvc(), name() );
30 log << MSG::DEBUG <<
"RawDataOutputSvc Destructor called " << endmsg;
43 return StatusCode::SUCCESS;
49 auto sc = Service::initialize();
52 error() <<
"Failed to initialize Service" << endmsg;
58 debug() <<
"Opened output File " << m_outputFile << endmsg;
60 return StatusCode::SUCCESS;
65 MsgStream log(
msgSvc(), name() );
72 log << MSG::ERROR <<
"failed to copy Event to the buffer !" << endmsg;
80 }
catch ( std::exception& ex )
82 std::cerr <<
"Uncaught std exception: " << ex.what() << std::endl;
86 std::cerr << std::endl <<
"Uncaught unknown exception" << std::endl;
90 m_fw->writeEvent( m_buffer );
DECLARE_COMPONENT(BesBdkRc)
eformat::FullEventFragment< const uint32_t * > RawEvent
eformat::write::FullEventFragment WriteRawEvent
RawDataOutputSvc(const std::string &name, ISvcLocator *svcloc)
bool putEvent(WriteRawEvent *re)