17 , fServerName(tServerName)
18 , fxInputChannel(nullptr)
21 , fxEventData(nullptr)
27 , fServerName(source.GetServerName())
28 , fxInputChannel(nullptr)
31 , fxEventData(nullptr)
39 if (!ConnectToServer()) {
46 Bool_t FairMbsStreamSource::ConnectToServer()
51 void* headptr = &fxInfoHeader;
54 LOG(info) <<
"FairMbsStreamSource::ConnectToServer()";
55 LOG(info) << Form(
"- open connection to MBS stream server %s...", fServerName.Data());
58 inputMode, const_cast<char*>(fServerName.Data()), fxInputChannel, static_cast<Char_t**>(headptr), 1, 1);
60 CHARS* sErrorString =
nullptr;
67 LOG(info) << Form(
"- connection to MBS stream server %s established.", fServerName.Data());
74 void* evtptr = &fxEvent;
75 void* buffptr = &fxBuffer;
77 LOG(debug2) <<
"FairLmdSource::ReadEvent => New event ";
79 Int_t status =
f_evt_get_event(fxInputChannel, static_cast<INTS4**>(evtptr), static_cast<INTS4**>(buffptr));
81 LOG(debug2) <<
"FairLmdSource::ReadEvent => f_evt_get_event status: " << status;
84 LOG(info) <<
"FairMbsStreamSource::ReadEvent()";
86 CHARS* sErrorString =
nullptr;
101 LOG(debug2) <<
"FairLmdSource::ReadEvent => Found " << nrSubEvts <<
" Sub-event ";
103 for (Int_t i = 1; i <= nrSubEvts; i++) {
104 void* SubEvtptr = &fxSubEvent;
105 void* EvtDataptr = &fxEventData;
109 fxEvent, i, static_cast<Int_t**>(SubEvtptr), static_cast<Int_t**>(EvtDataptr), &nrlongwords);
111 sebuflength = nrlongwords;
112 setype = fxSubEvent->
i_type;
118 if (!
Unpack(fxEventData, sebuflength, setype, sesubtype, seprocid, sesubcrate, secontrol)) {
130 LOG(info) <<
"FairMbsStreamSource::Close()";
132 CHARS* sErrorString =
nullptr;
INTS4 f_evt_get_subevent(s_ve10_1 *ps_ve10_1, INTS4 l_subevent, INTS4 **pl_se, INTS4 **pl_d, INTS4 *pl_lwords)
INTS4 f_evt_get_close(s_evt_channel *ps_chan)
INTS4 f_evt_get_open(INTS4 l_mode, CHARS *pc_server, s_evt_channel *ps_chan, CHARS **ps_info, INTS4 l_sample, INTS4 l_param)
Bool_t Unpack(Int_t *data, Int_t size, Short_t type, Short_t subType, Short_t procId, Short_t subCrate, Short_t control)
INTS4 f_evt_error(INTS4 l_error, CHARS *pc_dest, INTS4 l_out)
ClassImp(FairEventBuilder)
FairMbsStreamSource(TString tServerName)
virtual Int_t ReadEvent(UInt_t=0)
INTS4 f_evt_get_event(s_evt_channel *ps_chan, INTS4 **ppl_buffer, INTS4 **ppl_goobuf)
virtual ~FairMbsStreamSource()