int main(int argc, char** argv)
{
	gStyle->SetOptFit(1);
	
	std::vector<scintData> data;
	std::string outPath = "";
	if(argc == 1)
	{
	  data = takeData("results.txt");
	}
	else if (argc == 2)
	{
	  data = takeData(std::string(argv[1]));
	}
	else if (argc == 3)
	{
	  data = takeData(std::string(argv[1]));
	  outPath = argv[2];
	}
	
	if(data.size() == 0 )
	{
	  std::cout<<"Error while opening input file"<<std::endl;
	  return 1;
	}
	
	velocityCalc( data , outPath);
	
	return 0;
}
Example #2
0
void Token::deleteThis()
{
    if (_next) { // Copy next to this and delete next
        takeData(_next);
        _next->link(nullptr); // mark as unlinked
        deleteNext();
    } else if (_previous && _previous->_previous) { // Copy previous to this and delete previous
        takeData(_previous);

        Token* toDelete = _previous;
        _previous = _previous->_previous;
        _previous->_next = this;

        delete toDelete;
    } else {
        // We are the last token in the list, we can't delete
        // ourselves, so just make us empty
        str("");
    }
}