Changeset 17032


Ignore:
Timestamp:
08/20/13 13:47:35 (11 years ago)
Author:
tbretz
Message:
Fixed severity in logging stream.
Location:
trunk/Mars/fact/analysis
Files:
3 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    }
  • trunk/Mars/fact/analysis/merpp.C

    r15232 r17032  
     1#include "MLogManip.h"
     2
    13void merpp(TString &froot, const char *id, const char *faux)
    24{
     
    68    if (file.IsZombie())
    79    {
    8         gLog << "merpp: Invalid file '" << froot << "'" << endl;
     10        gLog << err << "merpp: Invalid file '" << froot << "'" << endl;
    911        return;
    1012    }
     
    1416    if (!tree)
    1517    {
    16         gLog << "merpp: Tree 'RunHeaders' not found... skipped." << endl;
     18        gLog << err << "merpp: Tree 'RunHeaders' not found... skipped." << endl;
    1719        return;
    1820    }
     
    2022    if (tree->GetEntries()!=1)
    2123    {
    22         gLog << "merpp: Number of RunHeaders do not match 1... skipped." << endl;
     24        gLog << err << "merpp: Number of RunHeaders do not match 1... skipped." << endl;
    2325        return;
    2426    }
     
    2931    if (file.Get(id))
    3032    {
    31         gLog << "WARNING - Tree '" << id << "' already existing... skipped." << endl;
     33        gLog << warn << "WARNING - Tree '" << id << "' already existing... skipped." << endl;
    3234        return;
    3335    }
     
    4345    TString time   = Form("MTime%s",   id);
    4446
     47    gLog << all;
    4548    gLog << " --- Fits file: " << ffits << endl;
    4649    gLog << " --- Root file: " << froot << endl;
     
    7881    if (!seq.IsValid())
    7982    {
    80         gLog << "ERROR - Sequence invalid!" << endl;
     83        gLog << err << "ERROR - Sequence invalid!" << endl;
    8184        return 1;
    8285    }
     
    8588
    8689    gLog.Separator("Merpp");
     90    gLog << all;
    8791    gLog << "Merge slow control data of sequence ";
    8892    gLog << seq.GetFileName() << endl;
     
    9397    if (seq.GetRuns(iter, MSequence::kFactImg, path)<=0)
    9498    {
    95         gLog << "ERROR - Sequence valid but without files." << endl;
     99        gLog << err << "ERROR - Sequence valid but without files." << endl;
    96100        return 2;
    97101    }
  • trunk/Mars/fact/analysis/star.C

    r15231 r17032  
     1#include "MLogManip.h"
     2
    13int star(const char *seqfile="sequences/20111205_013.seq", Double_t lvl1=7.8, Double_t lvl2=3.9, const char *inpath = "output", const char *outpath = "output")
    24{
     
    911    if (!seq.IsValid())
    1012    {
    11         gLog << "ERROR - Sequence invalid!" << endl;
     13        gLog << err << "ERROR - Sequence invalid!" << endl;
    1214        return 1;
    1315    }
     
    1618
    1719    gLog.Separator("Star");
    18     gLog << "Calculate image parameters of sequence ";
     20    gLog << all << "Calculate image parameters of sequence ";
    1921    gLog << seq.GetFileName() << endl;
    2022    gLog << endl;
     
    3234    if (seq.GetRuns(iter, MSequence::kFactCal, inpath)<=0)
    3335    {
    34         gLog << "ERROR - Sequence valid but without files." << endl;
     36        gLog << err << "ERROR - Sequence valid but without files." << endl;
    3537        return 2;
    3638    }
Note: See TracChangeset for help on using the changeset viewer.