/[PAMELA software]/calo/ground/UTILITIES/src/CaloADC2MIP.cc
ViewVC logotype

Contents of /calo/ground/UTILITIES/src/CaloADC2MIP.cc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Tue Dec 6 10:59:29 2005 UTC (19 years, 2 months ago) by mocchiut
Branch: MAIN, UTILITIES
CVS Tags: start, v2r01, v2r00, HEAD
Changes since 1.1: +0 -0 lines
Imported sources

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 <caloclasses.h>
13 #include <iostream>
14 // void CaloADC2MIP(TString Filename, TString calcalibfile = "", TString flist="")
15 extern void CaloADC2MIP(TString, TString ,TString);
16 extern void info();
17 using namespace std;
18 //
19 int main(int numinp, char *inps[]){
20 TString name;
21 TString calname;
22 TString list;
23 if ( numinp < 4 ){
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 CaloADC2MIP file calibration_file 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 - 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\nCaloADC2MIP /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 CaloADC2MIP! \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(" Filename of the list of files (if any): \n ");
56 cin.getline(input,256);
57 list = (TString)input;
58 };
59 } else {
60 printf("\n Welcome to CaloADC2MIP! \n");
61 name = (TString)inps[1];
62 calname = (TString)inps[2];
63 list = (TString)inps[3];
64 };
65 //
66 CaloADC2MIP(name,calname,list);
67 //
68 return(0);
69 }

  ViewVC Help
Powered by ViewVC 1.1.23