Ignore:
Timestamp:
08/20/13 13:47:35 (11 years ago)
Author:
tbretz
Message:
Fixed severity in logging stream.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/fact/analysis/callisto.C

    r15509 r17032  
     1#include "MLogManip.h"
     2
    13int callisto(const char *seqfile="seq/2012/01/23/20120123_023.seq", const char *outpath = "output", bool use_delays=true)
    24{
     
    6567    if (map && gSystem->AccessPathName(map, kFileExists))
    6668    {
    67         gLog << "ERROR - Cannot access mapping file '" << map << "'" << endl;
     69        gLog << err << "ERROR - Cannot access mapping file '" << map << "'" << endl;
    6870        return 1;
    6971    }
     
    7375    if (!seq.IsValid())
    7476    {
    75         gLog << "ERROR - Sequence '" << seqfile << "' invalid!" << endl;
     77        gLog << err << "ERROR - Sequence '" << seqfile << "' invalid!" << endl;
    7678        return 2;
    7779    }
     
    8082
    8183    gLog.Separator("Callisto");
    82     gLog << "Calibrate data of sequence '" << seq.GetFileName() << "'" << endl;
     84    gLog << all << "Calibrate data of sequence '" << seq.GetFileName() << "'" << endl;
    8385    gLog << endl;
    8486
     
    9395    if (!drs.IsValid())
    9496    {
    95         gLog << "ERROR - DRS sequence invalid!" << endl;
     97        gLog << err << "ERROR - DRS sequence invalid!" << endl;
    9698        return 3;
    9799    }
    98100
    99     gLog << "DRS sequence file: " << drsname.str() << '\n' << endl;
     101    gLog << all << "DRS sequence file: " << drsname.str() << '\n' << endl;
    100102
    101103    TString drsfile = seq.GetFileName(0, MSequence::kRawDrs);
    102104    if (drsfile.IsNull())
    103105    {
    104         cout << "No DRS file available in sequence." << endl;
     106        gLog << err << "No DRS file available in sequence." << endl;
    105107        return 4;
    106108    }
     
    111113    TString calfile = seq.GetFileName(0, MSequence::kFitsCal);
    112114
     115    gLog << all;
    113116    gLog << "DRS calib     300: " << drsfile << '\n';
    114117    gLog << "DRS calib    1024: " << drs1024 << "\n\n";
     
    122125        return 6;
    123126
     127    gLog << all;
    124128    gLog << "Time calibration : " << timfile << '\n';
    125129    gLog << "Pedestal     file: " << pedfile << '\n';
     
    131135    if (seq.GetRuns(iter, MSequence::kFitsDat)<=0)
    132136    {
    133         gLog << "ERROR - Sequence valid but without files." << endl;
     137        gLog << err << "ERROR - Sequence valid but without files." << endl;
    134138        return 7;
    135139    }
     
    143147    if (arrt.Read()<=0)
    144148    {
    145         cout << "ERROR - Reading LP template from " << lp_template << endl;
     149        gLog << err << "ERROR - Reading LP template from " << lp_template << endl;
    146150        return 100;
    147151    }
     
    150154    if (!lpref)
    151155    {
    152         cout << "ERROR - LP Template not found in " << lp_template << endl;
     156        gLog << err << "ERROR - LP Template not found in " << lp_template << endl;
    153157        return 101;
    154158    }
     
    158162    if (!gain)
    159163    {
    160         cout << "ERROR - Gain not found in " << lp_template << endl;
     164        gLog << err << "ERROR - Gain not found in " << lp_template << endl;
    161165        return 101;
    162166    }
     
    166170    if (arrp.Read()<=0)
    167171    {
    168         cout << "ERROR - Reading Pulse template from " << pulse_template << endl;
     172        gLog << err << "ERROR - Reading Pulse template from " << pulse_template << endl;
    169173        return 102;
    170174    }
     
    173177    if (!hpulse)
    174178    {
    175         cout << "ERROR - Pulse Template not found in " << pulse_template << endl;
     179        gLog << err << "ERROR - Pulse Template not found in " << pulse_template << endl;
    176180        return 103;
    177181    }
Note: See TracChangeset for help on using the changeset viewer.