//
// FCaloCALIBSCAN.cc -- standalone program to call the FCaloCALIBSCAN macro. 
//    by Emiliano Mocchiutti
//
//   Version 1.00 (2006/03/08)
//
// Changelog: 
//
// 0.00 - 1.00 : working.
//
#include <TString.h>
#include <iostream>
//
#include <FCaloCALIBSCANfun.h>
extern void info();
using namespace std;
//
int main(int numinp, char *inps[]){
  TString name;
  TString list;
  if ( numinp != 3 ){
    if ( numinp > 1 ){
      if ( !strcmp(inps[1],"--version") ){
	info();
	return(0);
      };
    };
    printf("\nUsage:\n\n FCaloCALIBSCAN file list \n");
    printf("\n - file                must be in the form: /path/to/filesfromyoda/dw_000000_00000.root  \n");
    printf(  " - list                text file containing a list of file in the format dw_000000_00000.root \n");
    printf(  "                       if a list is given file becomes the directory where to find files. \n");
    printf("\nExample: \n\nFCaloCALIBSCAN /home/pamela/filesfromyoda/ mylist.txt \n\n");
    //
    return(0);
  } else {
    printf("\n Welcome to FCaloCALIBSCAN! \n");
    name = (TString)inps[1];
    list = (TString)inps[2];
  };
  //
  FCaloCALIBSCAN(name,list);
  //
  return(0);
}
