//
// CaloTRKCALOALIG.cc -- standalone program to call the CaloTRKCALOALIG macro. 
//    by Emiliano Mocchiutti
//
//   Version 1.00 (2005/08/16)
//
// Changelog: 
//
// 0.00 - 1.00 : working.
//
#include <TString.h>
#include <iostream>
// 
extern void FCaloTrackerAlignmentRT(TString);
extern void info();
using namespace std;
//
int main(int numinp, char *inps[]){
  TString name;
  if ( numinp < 3 ){
    if ( numinp == 2 ){
      if ( !strcmp(inps[1],"--version") ){
	info();
	return(0);
      };
      if ( !strcmp(inps[1],"-h") || !strcmp(inps[1],"--help") ){
	printf("\nUsage:\n\n FCaloTRKCALOALIG file \n");
	printf("\n - file                must be in the form: /path/to/filesfromyoda/dw_000000_00000/  \n");
	printf("\nExample: \n\nFCaloTRKCALOALIG /home/pamela/filesfromyoda/dw_050301_00100/ \n\n");
	return(0);
      };
    };
    printf("\n Welcome to FCaloTRKCALOALIG! \n");
    name = (TString)inps[1];
    if ( numinp == 1 ){
      printf("\n Welcome to FCaloTRKCALOALIG! \n");
      //
      printf("\n You must provide the following input parameters: \n\n");
      //
      char input[256];
      //
      printf(" Path to YODA unpacked file: \n ");
      cin.getline(input,256);
      name = (TString)input;
    };
  };
  //
  FCaloTrackerAlignmentRT(name);
  //
  return(0);
}
