/[PAMELA software]/calo/flight/FUTILITIES/src/FCaloADC2MIP.cc
ViewVC logotype

Contents of /calo/flight/FUTILITIES/src/FCaloADC2MIP.cc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Wed Mar 22 15:07:48 2006 UTC (18 years, 8 months ago) by mocchiut
Branch: FUTILITIES
CVS Tags: start, v1r03, v1r01
Changes since 1.1: +0 -0 lines
Flight Utilities calorimeter package 1st release

1 //
2 // CaloADC2MIP.cc -- standalone program to call the CaloADC2MIP macro.
3 // by Emiliano Mocchiutti
4 //
5 // Version 1.00 (2005/08/16)
6 //
7 // Changelog:
8 //
9 // 0.00 - 1.00 : working.
10 //
11 #include <TString.h>
12 #include <iostream>
13 extern void FCaloADC2MIP(TString, TString, TString ,TString);
14 extern void info();
15 using namespace std;
16 //
17 int main(int numinp, char *inps[]){
18 TString name;
19 TString calname;
20 TString list;
21 TString outdir;
22 if ( numinp < 5 ){
23 if ( numinp == 2 ){
24 if ( !strcmp(inps[1],"--version") ){
25 info();
26 return(0);
27 };
28 if ( !strcmp(inps[1],"-h") || !strcmp(inps[1],"--help") ){
29 printf("\nUsage:\n\n FCaloADC2MIP file calibration_file outdir list \n");
30 printf("\n - file must be in the form: /path/to/filesfromyoda/dw_000000_00000/ \n");
31 printf("\n or /path/to/filesfromyoda/ if a file list is given \n");
32 printf("\n - calibration_file must be in the form: /path/to/filesfromyoda/dw_000000_00000/ \n");
33 printf("\n - outdir output directory \n");
34 printf("\n - list text file containing a list of files \n");
35 printf("\n in the form: dw_000000_00000 <new line> dw_000000_00000 ... \n");
36 printf("\nExample: \n\nFCaloADC2MIP /home/pamela/filesfromyoda/dw_050301_00100/ \"\" \"\" \"\"\n\n");
37 return(0);
38 };
39 printf(" Try with --help or -h \n");
40 return(0);
41 };
42 if ( numinp == 1 ){
43 printf("\n Welcome to FCaloADC2MIP! \n");
44 //
45 printf("\n You must provide the following input parameters: \n\n");
46 //
47 char input[256];
48 //
49 printf(" Path to YODA unpacked directory or to the FilesFromYoda: \n ");
50 cin.getline(input,256);
51 name = (TString)input;
52 printf(" Path to YODA unpacked directory for a calorimeter calibration: \n ");
53 cin.getline(input,256);
54 calname = (TString)input;
55 printf(" Output directory: \n ");
56 cin.getline(input,256);
57 outdir = (TString)input;
58 printf(" Filename of the list of files (if any): \n ");
59 cin.getline(input,256);
60 list = (TString)input;
61 };
62 } else {
63 printf("\n Welcome to FCaloADC2MIP! \n");
64 name = (TString)inps[1];
65 calname = (TString)inps[2];
66 outdir = (TString)inps[3];
67 list = (TString)inps[4];
68 };
69 //
70 FCaloADC2MIP(name,calname,outdir,list);
71 //
72 return(0);
73 }

  ViewVC Help
Powered by ViewVC 1.1.23