Ignore:
Timestamp:
07/29/05 23:13:12 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/macros/findcacofiles.C

    r7182 r7232  
    4444
    4545
    46 int findcacofiles(TString date)
     46int findcacofiles(TString date, TString logpath)
    4747{
    4848    TEnv env("sql.rc");
     
    7272    }
    7373
    74     Int_t idx = date.First('-');
    75     TString year = date(0, idx);
    76     cout << "year: " << year << endl;
    77 
    78     ofstream fout("/magic/datacenter/autologs/filesondisk/"+year+"/findcacofiles-"+date+".txt");
     74    TString filename(Form("%s/findcacofiles-%s.txt", logpath.Data(), date.Data()));
     75    ofstream fout(filename, ios::app);
    7976    if (!fout)
    8077    {
    81         cout << "ERROR - Cannot open file." << endl;
    82         return kFALSE;
     78        cout << "ERROR - Cannot open file " << filename << endl;
     79        return 0;
    8380    }
    84     TString runnumber=0;
     81
    8582    TSQLRow *row=0;
    8683    while ((row = res->Next()))
Note: See TracChangeset for help on using the changeset viewer.