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

Diff of /PadmeAmidala/src/PadmeAmidala.cpp

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

revision 1.1 by mocchiut, Tue Dec 5 12:31:00 2006 UTC revision 1.4 by mocchiut, Fri Sep 7 13:26:10 2007 UTC
# Line 44  void amidalausage(){ Line 44  void amidalausage(){
44    printf(" -g | --debug     set debug flag\n");    printf(" -g | --debug     set debug flag\n");
45    printf(" -idRun run       merge all runs in the directory which have the same date of run \"run\"\n");    printf(" -idRun run       merge all runs in the directory which have the same date of run \"run\"\n");
46    printf(" -outdir dir      output directory \"dir\"\n");    printf(" -outdir dir      output directory \"dir\"\n");
47      printf(" -castor          the output directory is a CASTOR path, use RFIO\n");
48    printf(" -dir dir         merge all runs in the directory \"dir\"\n");    printf(" -dir dir         merge all runs in the directory \"dir\"\n");
49    printf(" -d | -delete     delete original DarthVader runs once merged\n");    printf(" -d | -delete     delete original DarthVader runs once merged\n");
50      printf(" -no-DBupdate     do not update the DB\n");
51    printf(" -host            name of the DB host [default = $PAM_DBHOST or mysql://localhost/pamelaprod]\n");    printf(" -host            name of the DB host [default = $PAM_DBHOST or mysql://localhost/pamelaprod]\n");
52    printf(" -user            username for the DB connection [default = $PAM_DBUSER or \"anonymous\"] \n");    printf(" -user            username for the DB connection [default = $PAM_DBUSER or \"anonymous\"] \n");
53    printf(" -psw             password for the DB connection [default = $PAM_DBPSW or \"\"]\n");    printf(" -psw             password for the DB connection [default = $PAM_DBPSW or \"\"]\n");
# Line 74  int main(int numinp, char *inps[]){ Line 76  int main(int numinp, char *inps[]){
76    TString psw = "";    TString psw = "";
77    Bool_t debug = false;    Bool_t debug = false;
78    Bool_t delop = false;    Bool_t delop = false;
79      Bool_t dbup = true;
80      Bool_t castor = false;
81    //    //
82    const char *pamdbhost=gSystem->Getenv("PAM_DBHOST");    const char *pamdbhost=gSystem->Getenv("PAM_DBHOST");
83    const char *pamdbuser=gSystem->Getenv("PAM_DBUSER");    const char *pamdbuser=gSystem->Getenv("PAM_DBUSER");
# Line 106  int main(int numinp, char *inps[]){ Line 110  int main(int numinp, char *inps[]){
110        if ( !strcmp(inps[i],"-d") || !strcmp(inps[i],"-delete") ){        if ( !strcmp(inps[i],"-d") || !strcmp(inps[i],"-delete") ){
111          delop = true;          delop = true;
112        };        };
113          if ( !strcmp(inps[i],"-castor") ){
114            castor = true;
115          };
116          if ( !strcmp(inps[i],"-no-DBupdate") ){
117            dbup = false;
118          };
119        if ( !strcmp(inps[i],"-idRun") ) {        if ( !strcmp(inps[i],"-idRun") ) {
120          if ( numinp-1 < i+1 ) {          if ( numinp-1 < i+1 ) {
121            amidalausage();            amidalausage();
# Line 268  int main(int numinp, char *inps[]){ Line 278  int main(int numinp, char *inps[]){
278    myquery << "SET time_zone='+0:00'";    myquery << "SET time_zone='+0:00'";
279    dbc->Query(myquery.str().c_str());    dbc->Query(myquery.str().c_str());
280    //    //
281    RunGlue *rg = new RunGlue(dbc,run,dir,outdir);    RunGlue *rg = new RunGlue(dbc,run,dir,outdir,castor);
282    //    //
283    if ( debug ) rg->SetDebug(true);    if ( debug ) rg->SetDebug(true);
284    rg->SetDList(dectlist);    rg->SetDList(dectlist);
# Line 283  int main(int numinp, char *inps[]){ Line 293  int main(int numinp, char *inps[]){
293      //      //
294      if ( l ){      if ( l ){
295        //        //
296        if ( rg->OpenFile() ){  //      if ( rg->OpenFile() ){
297          if ( rg->FileIsOpen() ){
298          //          //
299          rg->MergeRootfile(l);          rg->MergeRootfile(l);
300          //          //
301          rg->UpdateDB(l);          if ( dbup ) rg->UpdateDB(l);
302          //          //
303          if ( delop ) rg->DeleteRunFiles(l);          if ( delop ) rg->DeleteRunFiles(l);
304          //          //

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.23