45 lines
956 B
C++
45 lines
956 B
C++
//
|
|
// DB_Track.cpp
|
|
//
|
|
//
|
|
// Created by Baranyai David on 2018. 06. 05..
|
|
//
|
|
|
|
#include <stdio.h>
|
|
#include <iostream>
|
|
#include "TApplication.h"
|
|
#include "TrackFinder.hpp"
|
|
#include "TH2D.h"
|
|
#include "TCanvas.h"
|
|
#include "TSystem.h"
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
TApplication App("tapp", &argc, argv);
|
|
|
|
std::cout << "Press enter for the next track." << std::endl << "Press Ctrl + C to exit." << std::endl;
|
|
|
|
TH2D *twodhisto = new TH2D("twodhisto", "twodhisto", 100, 0, 32, 100, 0, 4);
|
|
TCanvas *canvas = new TCanvas();
|
|
|
|
TrackFinder finder;
|
|
|
|
while(true)
|
|
{
|
|
if(std::cin.get() == '\n')
|
|
{
|
|
if(finder.FindAndDrawNextTrack(twodhisto, canvas))
|
|
{
|
|
gSystem -> ProcessEvents();
|
|
}
|
|
else
|
|
{
|
|
std::cout << "Reached the end of the database" << std::endl;
|
|
}
|
|
}
|
|
}
|
|
|
|
App.Run();
|
|
return 0;
|
|
}
|