/[PAMELA software]/YodaProfiler/src/YodaProfiler.cpp
ViewVC logotype

Diff of /YodaProfiler/src/YodaProfiler.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by mocchiut, Fri Sep 1 12:47:13 2006 UTC revision 1.3 by mocchiut, Thu Sep 7 08:34:20 2006 UTC
# Line 20  void usage(){ Line 20  void usage(){
20    printf("\n Options can be: \n");    printf("\n Options can be: \n");
21    printf("\n --version       print informations about compilation and exit\n");    printf("\n --version       print informations about compilation and exit\n");
22    printf("\n -h | --help     print this help and exit \n");    printf("\n -h | --help     print this help and exit \n");
23    printf("\n -v | --verbose  be verbose [default: print nothing on STDOUT]\n");    printf("\n -v | --verbose  be verbose [default]\n");
24      printf("\n -s | --silent   default: print nothing on STDOUT\n");
25    printf("\n -g | --debug    be very verbose [default: no]\n");    printf("\n -g | --debug    be very verbose [default: no]\n");
26    printf("\n -boot number    CPU boot number [default = taken from VarDump]\n");    printf("\n -boot number    CPU boot number [default = taken from VarDump]\n");
27    printf("\n -tsync number   timesync (s) [default = taken from data]\n");    printf("\n -tsync number   timesync (s) [default = taken from data]\n");
28    printf("\n -obt0 number    obt at timesync (ms) [default = taken from data]\n");    printf("\n -obt0 number    obt at timesync (ms) [default = taken from data]\n");
29    printf("\n -clean number   number in seconds after which the fragment table\n");    printf("\n -clean number   number in seconds after which the fragment table\n");
30    printf("\n                 can be cleaned and runs validated [default = 864000 (10 days)],\n");    printf("\n                 can be cleaned and runs validated [default = -1 do not clean],\n");
31    printf("\n                 if 0 force cleaning immediatly, if negative do not clean\n");    printf("\n                 if 0 force cleaning immediatly, if negative do not clean\n");
32    printf("\n -host           name for the host [default = mysql://localhost/pamelaprod]\n");    printf("\n -host           name for the host [default = $PAM_DBHOST or mysql://localhost/pamelaprod]\n");
33    printf("\n -user           username for the DB [default = anonymous] \n");    printf("\n -user           username for the DB [default = $PAM_DBUSER or \"anonymous\"] \n");
34    printf("\n -psw            password for the DB [default = \"\"]\n");    printf("\n -psw            password for the DB [default = $PAM_DBPSW or \"\"]\n");
35    printf("\n The order of input files and options does not matter. \n");    printf("\n The order of input files and options does not matter. \n");
36    printf("\nExample: \n");    printf("\nExample: \n");
37    printf("\n YodaProfiler -yodaFile /path/to/raw/files/000_000_00000_cln2.pam -rawFile /path/to/filesfromyoda/000_000_00000_cln2.root -v \n\n");    printf("\n YodaProfiler -yodaFile /path/to/raw/files/000_000_00000_cln2.pam -rawFile /path/to/filesfromyoda/000_000_00000_cln2.root -v \n\n");
# Line 45  int main(int numinp, char *inps[]){ Line 46  int main(int numinp, char *inps[]){
46    UInt_t boot = 0;    UInt_t boot = 0;
47    UInt_t tsync = 0;    UInt_t tsync = 0;
48    UInt_t obt0 = 0;    UInt_t obt0 = 0;
49    Long64_t olderthan = 864000LL;    //  Long64_t olderthan = 864000LL;
50      Long64_t olderthan = -1LL;
51    //    //
52    //    //
53    TString filerawname;    TString filerawname;
54    //    //
55    TString host;    TString host = "mysql://localhost/pamelaprod";
56    TString user;    TString user = "anonymous";
57    TString password;    TString password = "";
58      //
59      const char *pamdbhost=gSystem->Getenv("PAM_DBHOST");
60      const char *pamdbuser=gSystem->Getenv("PAM_DBUSER");
61      const char *pamdbpsw=gSystem->Getenv("PAM_DBPSW");
62      if ( strcmp(pamdbhost,"") ) host = pamdbhost;
63      if ( strcmp(pamdbuser,"") ) user = pamdbuser;
64      if ( strcmp(pamdbpsw,"") ) password = pamdbuser;
65    //    //
66    TString filerootname;    TString filerootname;
67    //        //    
68    Bool_t beverbose = false;    Bool_t beverbose = true;
69    Bool_t debug = false;    Bool_t debug = false;
70    Int_t i = 0;    Int_t i = 0;
71    //    //
# Line 136  int main(int numinp, char *inps[]){ Line 145  int main(int numinp, char *inps[]){
145        //        //
146        if ( !strcmp(inps[i],"-v") || !strcmp(inps[i],"--verbose") ) beverbose = true;        if ( !strcmp(inps[i],"-v") || !strcmp(inps[i],"--verbose") ) beverbose = true;
147        //        //
148          if ( !strcmp(inps[i],"-s") || !strcmp(inps[i],"--silent") ) beverbose = false;
149          //
150        if ( !strcmp(inps[i],"-g") || !strcmp(inps[i],"--debug") ) debug = true;        if ( !strcmp(inps[i],"-g") || !strcmp(inps[i],"--debug") ) debug = true;
151        //        //
152        i++;        i++;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.23