// ------------------------------------------------------------------------- // ----- R3BMbsFile file ----- // ----- Created 26/12/12 by J.L. Rodriguez ----- // ----- ----- // ------------------------------------------------------------------------- #include "R3BMbsFile.h" #include #include #include #include #include using namespace std; R3BMbsFile::R3BMbsFile(const char* name, Int_t* status) : fName(name) { OpenFile(status); } Int_t* R3BMbsFile::OpenFile(Int_t* status) { int inputmode=1; fxInputChannel=new s_evt_channel; void* headptr=&fxInfoHeader; *status = f_evt_get_open(inputmode,const_cast(fName.Data()),fxInputChannel, (Char_t**) headptr, 1,1); cout << "-I- Status OpenFile="<< *status<l_count; if (status==0) { // cout << "got an event, it's nr: "<l_dlen; *setype =fxSubEvent->i_type; *sesubtype=fxSubEvent->i_subtype; *sesubcrate=fxSubEvent->h_subcrate; if (!status) { delete nrlongwords; return fxEventData;} else { cout << "No sub event got: "<< endl; delete nrlongwords; return NULL; } } Int_t R3BMbsFile::GetNbTrigger(){ return fxEvent->i_trigger; } void R3BMbsFile::PrintSubEvent(s_ves10_1* SEH, Int_t* ED){ cout << "This is Subevent header:"<l_dlen<i_subtype<i_type<h_control<h_subcrate<i_procid<l_dlen << endl; cout << fxBuffer->l_evt << endl; cout << fxBuffer->h_begin << endl; cout << fxBuffer->h_end << endl; } void R3BMbsFile::PrintEventHeader(){ cout << "This is Event header:"<filhe_dlen << endl; cout << "-I- "<filhe_label << endl; cout << "-I- Time "<filhe_time << endl; cout << "-I- File "<filhe_file << endl; } void R3BMbsFile::PrintFileHeader(s_filhe* FH) { cout << "This is File Header:"<filhe_dlen << endl; cout << FH->filhe_evt << endl; cout << FH->filhe_label << endl; cout << FH->filhe_run << endl; cout << FH->filhe_time << endl; cout << FH->filhe_current_i << endl; cout << FH->filhe_file << endl; }