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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Mon Sep 22 20:18:53 2008 UTC (16 years, 2 months ago) by mocchiut
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +4 -2 lines
Added -m32 flag for cross compilation on 64bit machines

1 mocchiut 1.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 mocchiut 1.2 extern void FCaloADC2MIP(TString, TString, TString ,TString,Int_t);
14 mocchiut 1.1 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 mocchiut 1.2 Int_t fit = 1;
23 mocchiut 1.1 if ( numinp < 5 ){
24     if ( numinp == 2 ){
25     if ( !strcmp(inps[1],"--version") ){
26     info();
27     return(0);
28     };
29     if ( !strcmp(inps[1],"-h") || !strcmp(inps[1],"--help") ){
30     printf("\nUsage:\n\n FCaloADC2MIP file calibration_file outdir list \n");
31     printf("\n - file must be in the form: /path/to/filesfromyoda/dw_000000_00000/ \n");
32     printf("\n or /path/to/filesfromyoda/ if a file list is given \n");
33     printf("\n - calibration_file must be in the form: /path/to/filesfromyoda/dw_000000_00000/ \n");
34     printf("\n - outdir output directory \n");
35     printf("\n - list text file containing a list of files \n");
36     printf("\n in the form: dw_000000_00000 <new line> dw_000000_00000 ... \n");
37     printf("\nExample: \n\nFCaloADC2MIP /home/pamela/filesfromyoda/dw_050301_00100/ \"\" \"\" \"\"\n\n");
38     return(0);
39     };
40     printf(" Try with --help or -h \n");
41     return(0);
42     };
43     if ( numinp == 1 ){
44     printf("\n Welcome to FCaloADC2MIP! \n");
45     //
46     printf("\n You must provide the following input parameters: \n\n");
47     //
48     char input[256];
49     //
50     printf(" Path to YODA unpacked directory or to the FilesFromYoda: \n ");
51     cin.getline(input,256);
52     name = (TString)input;
53     printf(" Path to YODA unpacked directory for a calorimeter calibration: \n ");
54     cin.getline(input,256);
55     calname = (TString)input;
56     printf(" Output directory: \n ");
57     cin.getline(input,256);
58     outdir = (TString)input;
59     printf(" Filename of the list of files (if any): \n ");
60     cin.getline(input,256);
61     list = (TString)input;
62     };
63     } else {
64     printf("\n Welcome to FCaloADC2MIP! \n");
65     name = (TString)inps[1];
66     calname = (TString)inps[2];
67     outdir = (TString)inps[3];
68     list = (TString)inps[4];
69 mocchiut 1.2 fit = (Int_t)inps[5];
70 mocchiut 1.1 };
71     //
72 mocchiut 1.2 FCaloADC2MIP(name,calname,outdir,list,fit);
73 mocchiut 1.1 //
74     return(0);
75     }

  ViewVC Help
Powered by ViewVC 1.1.23