Changeset 2299 for trunk


Ignore:
Timestamp:
08/01/03 16:28:20 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2297 r2299  
    2020   * mranforest/MRanForestFill.[h,cc]:
    2121     - default fNumTrees set to -1 tree (all trees)
     22
     23   * manalysis/MBlindPixelCalc.[h,cc]:
     24     - interpolate Pedestal, too
     25     - Only count 'valid' pixels
     26     
     27   * mfileio/MRead.[h,cc]:
     28     - enhanced AddFiles
     29     
     30   * mhist/MHCamEvent.[h,cc]:
     31     - Added PrintOutlayers
     32
     33   * mhist/MHCamera.[h,cc]:
     34     - added GetNumPixels
     35     - added default to GetMean and GetRMS
     36
     37   * mhist/MHTriggerLvl0.[h,cc]:
     38     - added PrintOutlayers
     39
     40   * merpp.cc:
     41     - added more arguments
     42     - replace .raw by .root if no root file given
     43     - automatic extension adding
     44     
     45   * mbase/MEvtLoop.[h,cc]:
     46     - added estimated run time
     47     - in Process: Changes type of rc from Bool_t to Int_t
     48     
     49   * mmain/MStatusDisplay.cc:
     50     - changed order in Tab-menu
     51     
     52   * mraw/MRawFileRead.cc:
     53     - consistency check for 0xc0c1 files
     54     
     55   * mraw/MRawRunHeader.cc:
     56     - initialize variables
     57     - added 0xc0c1 support
    2258
    2359
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.cc

    r2298 r2299  
    267267}
    268268
    269 Bool_t MEvtLoop::ProcessGuiEvents(Int_t num)
     269Bool_t MEvtLoop::ProcessGuiEvents(Int_t num, Int_t entries)
    270270{
    271271    if (!fProgress || gROOT->IsBatch())
     
    320320            txt += " (";
    321321            txt += speed;
    322             txt += "Evts/s)";
     322            txt += "Evts/s, est: ";
     323            txt += (int)((long int)(t0-t2)*entries/(60000.*(num-start)));
     324            txt += "m";
     325            //txt += (int)fmod(entries/(1000.*(num-start)/(long int)(t0-t2)), 60);
     326            //txt += "s";
     327            txt += ")";
    323328        }
    324329        fDisplay->SetStatusLine1(txt);
     
    416421        {
    417422            numcnts++;
    418             if (!ProcessGuiEvents(++dummy))
     423            if (!ProcessGuiEvents(++dummy, entries))
    419424                break;
    420425        }
     
    424429        {
    425430            numcnts++;
    426             if (!ProcessGuiEvents(maxcnt - dummy))
     431            if (!ProcessGuiEvents(maxcnt - dummy, entries))
    427432                break;
    428433        }
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.h

    r2219 r2299  
    3737    void StreamPrimitive(ofstream &out) const;
    3838
    39     Bool_t ProcessGuiEvents(Int_t num);
     39    Bool_t ProcessGuiEvents(Int_t num, Int_t entries);
    4040
    4141public:
  • trunk/MagicSoft/Mars/merpp.cc

    r2267 r2299  
    3939{
    4040    gLog << "Sorry the usage is:" << endl;
    41     gLog << "   merpp [-vn] inputfile outputfile [compression level]" << endl << endl;
     41    gLog << "   merpp [-a0] [-vn] [-cn] inputfile[.raw] [outputfile[.root]]" << endl << endl;
    4242    gLog << "     input file:   Magic DAQ binary file." << endl;
    4343    gLog << "     ouput file:   Merpped root file." << endl;
    44     gLog << "     compr. level: 1..9 [default=1]" << endl;
     44    gLog << "     -a0: Do not use Ansii codes." << endl;
     45    gLog << "     -cn: Compression level n=1..9 [default=1]" << endl;
    4546    gLog << "     -vn: Verbosity level n [default=2]" << endl << endl;
    4647}
     
    4950{
    5051    MArgs arg(argc, argv);
    51     arg.Print();
    5252
    5353    gLog << "==================================================" << endl ;
     
    6060
    6161    //
     62    // Set verbosity to highest level.
     63    //
     64    gLog.SetDebugLevel(arg.HasOption("-v") ? arg.GetIntAndRemove("-v") : 2);
     65
     66    if (arg.HasOption("-a") && arg.GetIntAndRemove("-a")==0)
     67        gLog.SetNoColors();
     68
     69    const int kComprlvl = arg.HasOption("-c") ? arg.GetIntAndRemove("-c") : 1;
     70
     71    //
    6272    // check for the right usage of the program
    6373    //
    64     if (arg.GetNumArguments()<2 || arg.GetNumArguments()>3)
     74    if (arg.GetNumArguments()<1 || arg.GetNumArguments()>2)
    6575    {
    6676        Usage();
     
    6979
    7080    //
    71     // Set verbosity to highest level.
    72     //
    73     gLog.SetDebugLevel(arg.HasOption("-v") ? arg.GetInt("-v") : 2);
    74 
    75     //
    7681    // This is to make argv[i] more readable insidethe code
    7782    //
    78     const char *kNamein   = arg.GetArgumentStr(0);
    79     const char *kNameout  = arg.GetArgumentStr(1);
    80     const int   kComprlvl = arg.GetNumArguments()==3 ? arg.GetArgumentInt(2) : 1;
     83    TString kNamein  = arg.GetArgumentStr(0);
     84    TString kNameout = arg.GetArgumentStr(1);
    8185
    8286    //
     
    8589    TROOT merpp("merpp", "Mars - Merging and Preprocessing Program");
    8690    merpp.SetBatch();
     91
     92    if (!kNamein.EndsWith(".raw"))
     93        kNamein += ".raw";
     94
     95    if (kNameout.IsNull())
     96        kNameout = kNamein(0, kNamein.Last('.'));
     97
     98    if (!kNameout.EndsWith(".root"))
     99        kNameout += ".root";
    87100
    88101    //
     
    117130
    118131    //
    119     // ---- Tho following is only necessary to supress some output ----
     132    // ---- The following is only necessary to supress some output ----
    120133    //
    121134    MRawRunHeader runheader;
  • trunk/MagicSoft/Mars/mmain/MStatusDisplay.cc

    r2296 r2299  
    194194    MGPopupMenu *tabmenu = new MGPopupMenu(gClient->GetRoot());
    195195    // tabmenu->AddEntry("Save &As...", kFileSaveAs);
     196    tabmenu->AddEntry("Next [&+]",           kTabNext);
     197    tabmenu->AddEntry("Previous [&-]",       kTabPrevious);
     198    tabmenu->AddSeparator();
    196199    tabmenu->AddEntry("Save As tab-i.&ps",   kTabSaveAsPS);
    197200    tabmenu->AddEntry("Save As tab-i.&gif",  kTabSaveAsGIF);
     
    202205    tabmenu->AddSeparator();
    203206    tabmenu->AddEntry("Print with &lpr",     kFilePrint);
    204     tabmenu->AddSeparator();
    205     tabmenu->AddEntry("Next [&+]",           kTabNext);
    206     tabmenu->AddEntry("Previous [&-]",       kTabPrevious);
    207207    tabmenu->Associate(this);
    208208
  • trunk/MagicSoft/Mars/mraw/MRawFileRead.cc

    r2207 r2299  
    223223    {
    224224        fRawCrateArray->GetEntry(i)->ReadEvt(*fIn);
     225        if (!*fIn)
     226            return kFALSE;
    225227
    226228        fRawEvtData->ReadEvt(*fIn);
     229        if (!*fIn)
     230            return kFALSE;
    227231    }
    228232
  • trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc

    r2273 r2299  
    5656
    5757    fPixAssignment = new MArrayS(0);
     58
     59    fFormatVersion=0;
     60    fSoftVersion=0;
     61    fRunType=0;
     62    fRunNumber=0;
     63    fProjectName[0]=0;
     64    fSourceName[0]=0;
     65    fSourceEpochChar[0]=0;
     66    fSourceEpochDate=0;
     67    fMJD=0;
     68    fDateYear=0;
     69    fDateMonth=0;
     70    fDateDay=0;
     71    fNumCrates=0;
     72    fNumPixInCrate=0;
     73    fNumSamplesLoGain=0;
     74    fNumSamplesHiGain=0;
     75    fNumEvents=0;
    5876}
    5977
     
    7694    // read one RUN HEADER from the input stream
    7795    //
    78     fin.read((char*)&fMagicNumber,       2);
     96    fin.read((char*)&fMagicNumber, 2);
    7997
    8098    //
    8199    // check whether the the file has the right file type or not
    82100    //
    83     if (fMagicNumber != kMagicNumber)
     101    if (fMagicNumber != kMagicNumber && fMagicNumber != kMagicNumber+1)
    84102    {
    85103        *fLog << err << "Error: Wrong Magic Number: Not a Magic File!" << endl;
    86104        return;
    87105    }
     106
     107    if (fMagicNumber == kMagicNumber && fMagicNumber != kMagicNumber+1)
     108        *fLog << warn << "WARNING - This file maybe broken (0xc0c1) - DAQ didn't close it correctly!" << endl;
    88109
    89110    Byte_t dummy[16];
Note: See TracChangeset for help on using the changeset viewer.