return tf->name;
}
+/*****************************************************************************
+ * Get the number of blocks in the tracefile
+ ****************************************************************************/
+
+unsigned ltt_tracefile_block_number(LttTracefile *tf)
+{
+ return tf->block_number;
+}
+
/*****************************************************************************
*Function name
* ltt_tracefile_seek_time: seek to the first event of the trace with time
}
}
+/*****************************************************************************
+ * Seek to the first event with position equal or larger to ep
+ ****************************************************************************/
+
+void ltt_tracefile_seek_position(LttTracefile *t, LttEventPosition *ep)
+{
+ //if we are at the right place, just return
+ if(t->which_block == ep->block_num && t->which_event == ep->event_num)
+ return;
+
+ if(t->which_block == ep->block_num) updateTracefile(t);
+ else readBlock(t,ep->block_num);
+
+ //event offset is availiable
+ if(ep->old_position){
+ t->cur_heart_beat_number = ep->heart_beat_number;
+ t->cur_event_pos = t->buffer + ep->event_offset;
+ return;
+ }
+
+ //only block number and event index are availiable
+ while(t->which_event < ep->event_num) ltt_tracefile_read(t);
+
+ return;
+}
+
/*****************************************************************************
*Function name
* ltt_tracefile_read : read the current event, set the pointer to the next