| 1 |
mocchiut |
1.1 |
// |
| 2 |
|
|
// CaloTRKCALOALIG.cc -- standalone program to call the CaloTRKCALOALIG 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 |
|
|
// |
| 15 |
|
|
extern void CaloTrackerAlignmentRT(TString); |
| 16 |
|
|
extern void info(); |
| 17 |
|
|
using namespace std; |
| 18 |
|
|
// |
| 19 |
|
|
int main(int numinp, char *inps[]){ |
| 20 |
|
|
TString name; |
| 21 |
|
|
if ( numinp < 3 ){ |
| 22 |
|
|
if ( numinp == 2 ){ |
| 23 |
|
|
if ( !strcmp(inps[1],"--version") ){ |
| 24 |
|
|
info(); |
| 25 |
|
|
return(0); |
| 26 |
|
|
}; |
| 27 |
|
|
if ( !strcmp(inps[1],"-h") || !strcmp(inps[1],"--help") ){ |
| 28 |
|
|
printf("\nUsage:\n\n CaloTRKCALOALIG file \n"); |
| 29 |
|
|
printf("\n - file must be in the form: /path/to/filesfromyoda/dw_000000_00000/ \n"); |
| 30 |
|
|
printf("\nExample: \n\nCaloTRKCALOALIG /home/pamela/filesfromyoda/dw_050301_00100/ \n\n"); |
| 31 |
|
|
return(0); |
| 32 |
|
|
}; |
| 33 |
|
|
}; |
| 34 |
|
|
printf("\n Welcome to CaloTRKCALOALIG! \n"); |
| 35 |
|
|
name = (TString)inps[1]; |
| 36 |
|
|
if ( numinp == 1 ){ |
| 37 |
|
|
printf("\n Welcome to CaloTRKCALOALIG! \n"); |
| 38 |
|
|
// |
| 39 |
|
|
printf("\n You must provide the following input parameters: \n\n"); |
| 40 |
|
|
// |
| 41 |
|
|
char input[256]; |
| 42 |
|
|
// |
| 43 |
|
|
printf(" Path to YODA unpacked directory: \n "); |
| 44 |
|
|
cin.getline(input,256); |
| 45 |
|
|
name = (TString)input; |
| 46 |
|
|
}; |
| 47 |
|
|
}; |
| 48 |
|
|
// |
| 49 |
|
|
CaloTrackerAlignmentRT(name); |
| 50 |
|
|
// |
| 51 |
|
|
return(0); |
| 52 |
|
|
} |