#include <RawDataOutputSvc.h>
Definition at line 12 of file RawDataOutputSvc.h.
◆ RawDataOutputSvc()
RawDataOutputSvc::RawDataOutputSvc |
( |
const std::string & | name, |
|
|
ISvcLocator * | svcloc ) |
Definition at line 19 of file RawDataOutputSvc.cxx.
21 m_fw(0)
22{
23 PropertyMgr m_propMgr;
24 m_propMgr.declareProperty("OutputFile", m_outputFile = "offline.raw");
25
26 IJobOptionsSvc* jobSvc;
27 Gaudi::svcLocator()->service("JobOptionsSvc", jobSvc);
28 jobSvc->setMyProperties(name, &m_propMgr);
29
30 m_buffer = new uint32_t[64*1024];
31}
IRawDataOutputSvc(const std::string &name, ISvcLocator *svcloc)
◆ ~RawDataOutputSvc()
RawDataOutputSvc::~RawDataOutputSvc |
( |
void | | ) |
|
Definition at line 34 of file RawDataOutputSvc.cxx.
35{
36 MsgStream log(messageService(), name() );
37 log << MSG::DEBUG << "RawDataOutputSvc Destructor called " << endreq;
38
39 delete [] m_buffer;
40}
◆ finalize()
StatusCode RawDataOutputSvc::finalize |
( |
| ) |
|
|
virtual |
Definition at line 43 of file RawDataOutputSvc.cxx.
44{
45
46 if ( m_fw ) {
47 delete m_fw;
48 m_fw = 0;
49 }
50
51 return StatusCode::SUCCESS;
52}
◆ initialize()
StatusCode RawDataOutputSvc::initialize |
( |
| ) |
|
|
virtual |
Reimplemented from IRawDataOutputSvc.
Definition at line 55 of file RawDataOutputSvc.cxx.
56{
57 MsgStream log(messageService(), name() );
58
59
61
62 log << MSG::DEBUG << "Opened output File " << m_outputFile << endreq;
63
64 return StatusCode::SUCCESS;
65}
◆ putEvent()
Implements IRawDataOutputSvc.
Definition at line 68 of file RawDataOutputSvc.cxx.
69{
70 MsgStream log(messageService(), name() );
71
72
73
76 log << MSG::ERROR << "failed to copy Event to the buffer !" << endreq;
77 return false;
78 }
79
80 try {
82 evt.check_tree();
83 }
84 catch (std::exception& ex) {
85 std::cerr << "Uncaught std exception: " << ex.what() << std::endl;
86 std::exit(1);
87 }
88 catch (...) {
89 std::cerr << std::endl << "Uncaught unknown exception" << std::endl;
90 std::exit(1);
91 }
92
94
95 return true;
96}
int writeEvent(const uint32_t *pevt)
The documentation for this class was generated from the following files: