Exemple #1
0
void	ProcessVisualize()
{
	TEveManager::Create();

	TEvePointSetArray	*evp =
	    new TEvePointSetArray("Event points", "Event points");
	TEvePointSetArray	*chp =
	    new TEvePointSetArray("Chamber points", "Chamber points");
	evp->SetMarkerColor(kGreen);
	evp->InitBins("Event cause", 8, 0.5, 8.5);
	chp->SetMarkerColor(kCyan);
	chp->InitBins("Nothing", 1, -0.5, 0.5);
	TEveTrackList *list = new TEveTrackList();
	list->SetLineColor(kMagenta);
	list->SetName("Incident tracks");
	TEveTrackPropagator* prop = list->GetPropagator();
	prop->SetMaxR(2000);
	prop->SetMaxZ(4000);

	int	j = 0;
	BOOST_FOREACH(event_t &e, vis_result)
	{
		evp->Fill(e.i1.x, e.i1.y, e.i1.z, e.event_cause);
		chp->Fill(e.inc.a(0), e.inc.a(1), e.inc.a(2), 0);
		chp->Fill(e.l.a(0), e.l.a(1), e.l.a(2), 0);
		chp->Fill(e.r.a(0), e.r.a(1), e.r.a(2), 0);
		if ((++j % 1000) == 0)
		{
			TEveTrack	*track = make_track(e.inc, prop);
			track->SetLineColor(list->GetLineColor());
			list->AddElement(track);
			track = make_track(e.l, prop);
			track->SetLineColor(list->GetLineColor());
			list->AddElement(track);
			track = make_track(e.r, prop);
			track->SetLineColor(list->GetLineColor());
			list->AddElement(track);
		}
	}
Exemple #2
0
static int update_info(playa_info_t *info, disk68_t *d, music68_t *mus,
		       char *tmp)
{
/*   SDDEBUG("update info [%p] [%p]\n", d, mus); */
  info->update_mask = 0;
  if (!d) {
    return -1;
  }
  if (!mus) {
    mus = d->mus + d->default_six;
  }

/*   SDDEBUG("update info\n"); */
  playa_info_time(info, mus->time << 10);
  playa_info_desc(info, make_desc(mus,tmp));
  playa_info_artist(info, make_author(mus,tmp));
  playa_info_track(info, make_track(d,tmp));
  playa_info_title(info, mus->name);

  return 0;
}
Exemple #3
0
/* takes a file handle, file position should be at the start of the Anadisk
   dump data.  reads the info for each sector and builds it into a list
   of sides.  each side holds a list of tracks, and each track a list of sectors */
struct disk_side *parse_image(FILE *fp)
{
	struct sect_info si;
	struct disk_side *sides = NULL;
	struct disk_side *curr_side, *new_side;
	struct disk_track *curr_track, *new_track;
	struct disk_sector *curr_sector, *new_sector;

	
	while (get_sector_info(fp, &si))
	{
		curr_side = find_side(sides, si.phy_side);
		if (curr_side == NULL)
		{
			new_side = make_side(si.phy_side);
			if (sides == NULL)
				sides = new_side;
			else
			{
				for (curr_side = sides; curr_side->next != NULL; curr_side = curr_side->next)
					;
				curr_side->next = new_side;
			}
			max_sides++;
			
			curr_side = new_side;
		}
		
		
		curr_track = find_track(curr_side->tracks, si.phy_cylinder);
		if (curr_track == NULL)
		{
			new_track = make_track(si.phy_cylinder, si.phy_side);
			if (curr_side->tracks == NULL)
				curr_side->tracks = new_track;
			else
			{
				for (curr_track = curr_side->tracks; curr_track->next != NULL; curr_track = curr_track->next)
					;
				curr_track->next = new_track;
			}
			curr_side->track_count++;
			if (curr_side->track_count > max_tracks)
				max_tracks = curr_side->track_count;
			
			curr_track = new_track;
		}
		
		
		new_sector = make_sector(si.log_sector, si.log_cylinder, si.log_side, si.size, ftell(fp));
		if (si.size > sector_size)
			sector_size = si.size;
		if (curr_track->sectors == NULL)
			curr_track->sectors = new_sector;
		else
		{
			for (curr_sector = curr_track->sectors; curr_sector->next != NULL; curr_sector = curr_sector->next)
				;
			curr_sector->next = new_sector;
		}
		curr_track->sector_count++;
		if (curr_track->sector_count > max_sectors)
			max_sectors = curr_track->sector_count;
				
		skip_sector(fp, &si);
	}
	
	return sides;
}