Changeset 13853 for fact


Ignore:
Timestamp:
05/24/12 02:07:58 (12 years ago)
Author:
Jens Buss
Message:
 
set host path for analisys on phido to the fhgfs scratch
add LoadRootFile Function
conditionals in verbosity output
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/rootmacros/PulseTemplates/rootfilehandler.C

    r13787 r13853  
    132132    gFile->mkdir(subdirectory.Data());
    133133    gFile->cd(subdirectory.Data());
    134     gDirectory->pwd();
    135     cout << histList;
     134    if (verbosityLevel > 1)
     135    {
     136        gDirectory->pwd();
     137    }
     138//    cout << histList;
    136139    for ( int idx = 0; idx < histList->GetSize(); idx++)
    137140    {
     
    147150// end of SaveHistograms
    148151//----------------------------------------------------------------------------
    149 
    150152
    151153TString
     
    197199}
    198200
     201TFile*
     202LoadRootFile(
     203        TString         path,
     204        TString         filename,
     205        int             verbosityLevel
     206        )
     207{
     208    if (verbosityLevel > 1)
     209    {
     210        cout << "...loading root-file: ";
     211    }
     212    path += filename;
     213    TFile* file = TFile::Open( path );
     214
     215    if (file->IsZombie())
     216    {
     217        cerr << "file does not exist" << endl;
     218        delete file;
     219        return NULL;
     220    }
     221    else
     222    if (verbosityLevel > 1)
     223    {
     224        cout << path ;
     225        cout << " ...successfull" << endl;
     226    }
     227    return file;
     228}
     229
    199230TString
    200231SetHostsPaths(
     
    219250
    220251        dataDirectory = "/fhgfs/groups/app/fact-construction/";
    221         homeDirectory = "/home/jbuss/";
     252        homeDirectory = "/fhgfs/users/jbuss/";
    222253    }
    223254    else
Note: See TracChangeset for help on using the changeset viewer.