BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
WriteRawData Class Reference

#include <WriteRawData.h>

+ Inheritance diagram for WriteRawData:

Public Member Functions

 WriteRawData (const std::string &name, ISvcLocator *pSvcLocator)
 
StatusCode initialize ()
 
StatusCode execute ()
 
StatusCode finalize ()
 

Detailed Description

Definition at line 3 of file WriteRawData.h.

Constructor & Destructor Documentation

◆ WriteRawData()

WriteRawData::WriteRawData ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 25 of file WriteRawData.cxx.

26 : Algorithm(name, pSvcLocator)
27{}

Member Function Documentation

◆ execute()

StatusCode WriteRawData::execute ( )

Definition at line 42 of file WriteRawData.cxx.

43{
44 StatusCode sc;
45 MsgStream log( msgSvc(), name() );
46
47 log << MSG::INFO << "================================================" << endreq;
48 log << MSG::INFO << "In execute()" << endreq;
49 log << MSG::INFO << "++++++++++++++++++++++++++++++++++++++++++++++++" << endreq;
50
51 static int evtnum = 0;
52 static int runnum = 999;
53
54 // Create the Event header and set it as "root" of the event store
56 event->setEventNumber(evtnum++);
57 event->setRunNumber(runnum);
58
59 IDataManagerSvc* evtmgr = dynamic_cast<IDataManagerSvc*>(eventSvc());
60 sc = evtmgr->setRoot(EventModel::EventHeader , event);
61 if( sc.isFailure() ) {
62 log << MSG::ERROR << "Unable to register /Event object" << endreq;
63 return sc;
64 }
65
66 DigiEvent* digi = new DigiEvent;
67 log << MSG::INFO << " DigiEvent clID :: " << digi->clID() << endreq;
68 sc = eventSvc()->registerObject(EventModel::Digi::Event, digi);
69 if( sc.isFailure() ) {
70 log << MSG::ERROR << "Unable to register /Event/Digi object" << endreq;
71 return sc;
72 }
73
74 sc = writeMdcDigiData();
75 if( sc.isFailure() ) {
76 log << MSG::ERROR << "Unable to register /Event/Digi/MdcDigiCol object" << endreq;
77 return sc;
78 }
79
80 sc = writeEmcDigiData();
81 if( sc.isFailure() ) {
82 log << MSG::ERROR << "Unable to register /Event/Digi/EmcDigiCol object" << endreq;
83 return sc;
84 }
85
86 sc = writeTofDigiData();
87 if( sc.isFailure() ) {
88 log << MSG::ERROR << "Unable to register /Event/Digi/EmcDigiCol object" << endreq;
89 return sc;
90 }
91
92 sc = writeMucDigiData();
93 if( sc.isFailure() ) {
94 log << MSG::ERROR << "Unable to register /Event/Digi/EmcDigiCol object" << endreq;
95 return sc;
96 }
97
98 m_count++;
99
100 return StatusCode::SUCCESS;
101}
IMessageSvc * msgSvc()
virtual const CLID & clID() const
Retrieve reference to class definition structure.
Definition DigiEvent.h:33
void setEventNumber(int value)
Update event number.
Definition EventHeader.h:39
_EXTERN_ std::string Event
Definition EventModel.h:56

◆ finalize()

StatusCode WriteRawData::finalize ( )

Definition at line 178 of file WriteRawData.cxx.

179{
180
181 MsgStream log(msgSvc(), name());
182
183 log << MSG::INFO << "In finalize()" << endreq;
184
185 return StatusCode::SUCCESS;
186}

◆ initialize()

StatusCode WriteRawData::initialize ( )

Definition at line 30 of file WriteRawData.cxx.

31{
32
33 MsgStream log(msgSvc(), name());
34 m_count = 0;
35
36 log << MSG::INFO << "in initialize()" << endreq;
37
38 return StatusCode::SUCCESS;
39}

The documentation for this class was generated from the following files: