Changeset 2207


Ignore:
Timestamp:
06/23/03 11:19:04 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mmain/MStatusDisplay.cc

    r2194 r2207  
    340340void MStatusDisplay::SetLogStream(MLog *log, Bool_t enable)
    341341{
     342    if (gROOT->IsBatch())
     343        return;
     344
    342345    if (log && fLogBox==NULL)
    343346    {
     
    455458void MStatusDisplay::SetStatusLine1(const char *txt)
    456459{
     460    if (gROOT->IsBatch())
     461        return;
    457462    fStatusBar->SetText(txt, 0);
    458463    gClient->ProcessEventsFor(fStatusBar);
     
    465470void MStatusDisplay::SetStatusLine2(const char *txt)
    466471{
     472    if (gROOT->IsBatch())
     473        return;
    467474    fStatusBar->SetText(txt, 1);
    468475    gClient->ProcessEventsFor(fStatusBar);
     
    491498//
    492499MStatusDisplay::MStatusDisplay(Long_t t)
    493 : TGMainFrame(gClient->GetRoot(), 1, 1), fTimer(this, t, kTRUE), fStatus(kLoopNone), fLog(&gLog), fLogIdx(-1), fLogTimer(this, 250, kTRUE), fLogBox(NULL), fIsLocked(0)
     500: TGMainFrame(gClient ? gClient->GetRoot() : NULL, 1, 1), fTimer(this, t, kTRUE), fStatus(kLoopNone), fLog(&gLog), fLogIdx(-1), fLogTimer(this, 250, kTRUE), fLogBox(NULL), fIsLocked(0)
    494501{
    495502    gROOT->GetListOfSpecials()->Add(this);
    496     gROOT->GetListOfCleanups()->Add(this);
    497503
    498504    fFont = gVirtualX->LoadQueryFont("7x13bold");
     505
     506    fBatch.SetOwner();
    499507
    500508    //
     
    521529    // Add Widgets (from top to bottom)
    522530    //
    523     AddMenuBar();
    524     AddTabs();
    525     AddProgressBar();
    526     AddStatusBar();
     531    if (gClient) // BATCH MODE
     532    {
     533        AddMenuBar();
     534        AddTabs();
     535        AddProgressBar();
     536        AddStatusBar();
     537    }
    527538
    528539    //
     
    547558MStatusDisplay::~MStatusDisplay()
    548559{
     560    gROOT->GetListOfSpecials()->Remove(this);
     561
    549562    SetLogStream(NULL);
    550563
     
    553566    if (fFont)
    554567        gVirtualX->DeleteFont(fFont);
    555 
    556     gROOT->GetListOfSpecials()->Remove(this);
    557     gROOT->GetListOfCleanups()->Remove(this);
    558 }
     568}
    559569
    560570// --------------------------------------------------------------------------
     
    594604TCanvas *MStatusDisplay::GetCanvas(int i) const
    595605{
     606    if (gROOT->IsBatch())
     607        return (TCanvas*)fBatch.At(i-1);
     608
    596609    if (i<0 || i>=fTab->GetNumberOfTabs())
    597610    {
     
    656669TCanvas &MStatusDisplay::AddTab(const char *name)
    657670{
     671    if (gROOT->IsBatch())
     672    {
     673        TCanvas *c = new TCanvas(name, name);
     674        fBatch.Add(c);
     675        return *c;
     676    }
     677
    658678    // Add new tab
    659679    TGCompositeFrame *f = fTab->AddTab(name);
    660680
    661     // create root embedded canvas and add it to the tab
     681    // create root emb 0edded canvas and add it to the tab
    662682    TRootEmbeddedCanvas *ec = new TRootEmbeddedCanvas(name, f, f->GetWidth(), f->GetHeight(), 0);
    663683    f->AddFrame(ec, fLayCanvas);
     
    676696    // layout and map new tab
    677697//#if ROOT_VERSION_CODE < ROOT_VERSION(3,03,00)
     698//    MapSubwindows();
     699//    Layout();
     700//#else
     701    Layout();
    678702    MapSubwindows();
    679703    Layout();
    680 //#else
    681 //    Layout();
    682 //    MapSubwindows();
    683704//#endif
    684705
     
    707728        return;
    708729
    709     c->Modified();
    710     c->Update();
    711     c->Paint();
     730    // Code taken from TCanvas::Update() and TCanvas::Paint
     731    c->FeedbackMode(kFALSE);  // Goto double buffer mode
     732    c->Paint();               // Repaint all pad's
     733    c->Flush();               // Copy all pad pixmaps to the screen
     734    //c->SetCursor(kCross);
     735
     736    // Old version
     737    //c->Modified();
     738    //c->Update();
     739    //c->Paint();
    712740}
    713741
     
    803831Bool_t MStatusDisplay::HasCanvas(const TCanvas *c) const
    804832{
     833    if (gROOT->IsBatch())
     834        return fBatch.FindObject(c);
     835
    805836    for (int i=1; i<fTab->GetNumberOfTabs(); i++)
    806837        if (c==GetCanvas(i))
     
    829860    case kLoopStop:
    830861    case kFileExit:
    831         if (id==kFileExit && !fIsLocked)
     862        if (id==kFileExit)
    832863            delete this;
    833864        fStatus = (Status_t)id;
     
    11541185void MStatusDisplay::SetNoContextMenu(Bool_t flag)
    11551186{
    1156     if (fIsLocked>1)
     1187    if (fIsLocked>1 || gROOT->IsBatch())
    11571188        return;
    11581189
     
    11731204Bool_t MStatusDisplay::HandleTimer(TTimer *timer)
    11741205{
     1206    if (gROOT->IsBatch())
     1207        return kTRUE;
     1208
    11751209    const Int_t c = fTab->GetCurrent();
    11761210
     
    13021336    }
    13031337
    1304     if (num>=fTab->GetNumberOfTabs())
     1338    if (!gROOT->IsBatch() && num>=fTab->GetNumberOfTabs())
    13051339    {
    13061340        *fLog << warn << "MStatusDisplay::Write: Tab doesn't exist... skipped." << endl;
    13071341        return 0;
    13081342    }
     1343    if (gROOT->IsBatch() && num>fBatch.GetSize())
     1344    {
     1345        *fLog << warn << "MStatusDisplay::Write: Tab doesn't exist... skipped." << endl;
     1346        return 0;
     1347    }
    13091348
    13101349    TObjArray list;
    13111350
    1312     const Int_t from = num<0 ? 1 : num;
    1313     const Int_t to   = num<0 ? fTab->GetNumberOfTabs() : num+1;
     1351    const Int_t max  = gROOT->IsBatch() ? fBatch.GetSize()+1 : fTab->GetNumberOfTabs();
     1352    const Int_t from = num<0 ?   1 : num;
     1353    const Int_t to   = num<0 ? max : num+1;
    13141354
    13151355    TCanvas *c;
     
    14061446Bool_t MStatusDisplay::CheckTabForCanvas(int num) const
    14071447{
     1448    if (gROOT->IsBatch())
     1449        return num>0 && num<=fBatch.GetSize() || num<0;
     1450
    14081451    if (num>=fTab->GetNumberOfTabs())
    14091452    {
     
    15301573    // Maintain tab numbers
    15311574    //
    1532     const Int_t from = num<0 ? 1 : num;
    1533     const Int_t to   = num<0 ? fTab->GetNumberOfTabs() : num+1;
     1575    const Int_t max  = gROOT->IsBatch() ? fBatch.GetSize()+1 : fTab->GetNumberOfTabs();
     1576    const Int_t from = num<0 ?   1 : num;
     1577    const Int_t to   = num<0 ? max : num+1;
    15341578
    15351579    for (int i=from; i<to; i++)
     
    15721616        CanvasSetFillColor(*n, kWhite);
    15731617        l.Add(n);
    1574 
    15751618        //
    15761619        // Paint canvas into root file
     
    15781621        if (num<0)
    15791622            *fLog << inf << " - ";
    1580         *fLog << inf << "Writing Tab #" << i << ": " << c->GetName() << " (" << n << ") ";
     1623        *fLog << inf << "Writing Tab #" << i << ": " << c->GetName() << " (" << c << ") ";
    15811624        if (num>0)
    15821625            *fLog << "to " << name;
     
    16141657
    16151658    gPad = NULL; // Important!
    1616 
    16171659    l.Delete();
    16181660
     
    16211663
    16221664    gVirtualPS = psave;
    1623     padsav->cd();
     1665    if (padsav)
     1666        padsav->cd();
    16241667
    16251668    *fLog << inf << "done." << endl;
     
    16321675Bool_t MStatusDisplay::SaveAsGIF(Int_t num, TString name)
    16331676{
     1677    if (gROOT->IsBatch())
     1678    {
     1679        *fLog << warn << "Sorry, writing gif-files is not available in batch mode." << endl;
     1680        return 0;
     1681    }
    16341682    SetStatusLine1("Writing GIF file...");
    16351683    SetStatusLine2("");
  • trunk/MagicSoft/Mars/mmain/MStatusDisplay.h

    r2178 r2207  
    7474
    7575    UInt_t fIsLocked;
     76
     77    TList fBatch;
    7678
    7779    void AddMenuBar();
  • trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc

    r2173 r2207  
    6565}
    6666
    67 Bool_t MMcCollectionAreaCalc::PreProcess (MParList *pList)
     67Int_t MMcCollectionAreaCalc::PreProcess (MParList *pList)
    6868{
    6969    // connect the raw data with this task
     
    151151}
    152152
    153 Bool_t MMcCollectionAreaCalc::Process()
     153Int_t MMcCollectionAreaCalc::Process()
    154154{
    155155    const Double_t energy = fMcEvt->GetEnergy();
     
    178178}
    179179
    180 Bool_t MMcCollectionAreaCalc::PostProcess()
     180Int_t MMcCollectionAreaCalc::PostProcess()
    181181{
    182182    //
  • trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.h

    r2036 r2207  
    3030    Bool_t fAllEvtsTriggered;
    3131
     32    Bool_t ReInit(MParList *plist);
     33
     34    Int_t PreProcess(MParList *pList);
     35    Int_t Process();
     36    Int_t PostProcess();
     37
    3238public:
    3339    MMcCollectionAreaCalc(const char *input=NULL,
    3440                          const char *name=NULL, const char *title=NULL);
    35 
    36     Bool_t ReInit(MParList *plist);
    37 
    38     Bool_t PreProcess(MParList *pList);
    39     Bool_t Process();
    40     Bool_t PostProcess();
    4141
    4242    ClassDef(MMcCollectionAreaCalc, 0) // Task to calculate the collection area histogram
  • trunk/MagicSoft/Mars/mmontecarlo/MMcThresholdCalc.cc

    r2173 r2207  
    100100// connect Monte Carlo data with this task
    101101//
    102 Bool_t MMcThresholdCalc::PreProcess(MParList* pList)
     102Int_t MMcThresholdCalc::PreProcess(MParList* pList)
    103103{
    104104    //
     
    142142// distribution to get the energy threshold.
    143143//
    144 Bool_t MMcThresholdCalc::Process()
     144Int_t MMcThresholdCalc::Process()
    145145{
    146146    const Float_t energy   = fMcEvt->GetEnergy();
     
    160160// Some iterations are done to be sure the fit parameters converge.
    161161//
    162 Bool_t MMcThresholdCalc::PostProcess()
     162Int_t MMcThresholdCalc::PostProcess()
    163163{
    164164    for (UInt_t i=0; i<fNum; i++)
  • trunk/MagicSoft/Mars/mmontecarlo/MMcThresholdCalc.h

    r1016 r2207  
    1414#endif
    1515#ifndef ROOT_TObjArray
    16 #include "TObjArray.h"
     16#include <TObjArray.h>
    1717#endif
    1818
     
    3939    MHMcEnergy *GetHEnergy(UInt_t i) { return (MHMcEnergy*)(*fEnergy)[i]; }
    4040
     41    Int_t PreProcess(MParList* pList);
     42    Int_t Process();
     43    Int_t PostProcess();
     44
    4145public:
    42 
    4346    MMcThresholdCalc(const Int_t dim = 0,
    4447                     const char* name = NULL, const char* title = NULL);
    4548    ~MMcThresholdCalc();
    46 
    47     Bool_t PreProcess(MParList* pList);
    48     Bool_t Process();
    49     Bool_t PostProcess();
    5049
    5150    ClassDef(MMcThresholdCalc, 0) // Task to compute the energy threshold
  • trunk/MagicSoft/Mars/mmontecarlo/MMcTimeGenerate.cc

    r2173 r2207  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     18!   Author(s): Thomas Bretz, 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!   Author(s): Harald Kornmayer 1/2001
    2020!
     
    6363//  options, either Montecarlo files with a single trigger option.
    6464//
    65 Bool_t MMcTimeGenerate::PreProcess (MParList *pList)
     65Int_t MMcTimeGenerate::PreProcess (MParList *pList)
    6666{
    6767    // connect the raw data with this task
     
    7777//
    7878//
    79 Bool_t MMcTimeGenerate::Process()
     79Int_t MMcTimeGenerate::Process()
    8080{
    8181    Double_t dt;
  • trunk/MagicSoft/Mars/mmontecarlo/MMcTimeGenerate.h

    r1211 r2207  
    2020    Double_t fDeadTime;
    2121
     22    Int_t PreProcess(MParList *pList);
     23    Int_t Process();
     24
    2225public:
    2326    MMcTimeGenerate(const char *name=NULL, const char *title=NULL);
     
    2528    ~MMcTimeGenerate();
    2629
    27     Bool_t PreProcess(MParList *pList);
    28     Bool_t Process();
    29 
    3030    ClassDef(MMcTimeGenerate, 0) // To generate a random time
    3131};
  • trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.cc

    r2173 r2207  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
     18!   Author(s): Thomas Bretz, 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!   Author(s): Harald Kornmayer 1/2001
    2020!
    2121!   Copyright: MAGIC Software Development, 2000-2003
    2222!
    23 !   Modified 4/7/2002 Abelardo Moralejo: now the dimension of fTrigger is
    24 !    set dinamically, to allow an arbitrary large number of trigger
    25 !    conditions to be processed.
    26 !
    2723!
    2824\* ======================================================================== */
     25
     26/////////////////////////////////////////////////////////////////////////////
     27//
     28// Modified 4/7/2002 Abelardo Moralejo: now the dimension of fTrigger is
     29//  set dinamically, to allow an arbitrary large number of trigger
     30//  conditions to be processed.
     31//
     32/////////////////////////////////////////////////////////////////////////////
    2933#include "MMcTriggerRateCalc.h"
    3034
     
    3236
    3337#include <TCanvas.h>
     38#include <TGraphErrors.h>
    3439
    3540#include "MLog.h"
     
    215220//  options, either Montecarlo files with a single trigger option.
    216221//
    217 Bool_t MMcTriggerRateCalc::PreProcess (MParList *pList)
     222Int_t MMcTriggerRateCalc::PreProcess (MParList *pList)
    218223{
    219224    // connect the raw data with this task
     
    266271//  MHMcRate container.
    267272//
    268 Bool_t MMcTriggerRateCalc::Process()
     273Int_t MMcTriggerRateCalc::Process()
    269274{
    270275    //
     
    318323//  The PostProcess-function calculates and shows the trigger rate
    319324//
    320 Bool_t MMcTriggerRateCalc::PostProcess()
     325Int_t MMcTriggerRateCalc::PostProcess()
    321326{
    322327    for (UInt_t i=0; i<fNum; i++)
     
    374379     sure, that the histograms are not overwritten.
    375380     Also the comment for the function doesn't match the rules.
    376 
     381     BTW: please replace all arrays by Root lists (TArray*, TList, etc)
    377382  TCanvas *c = MH::MakeDefCanvas("Rate");
    378383
  • trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.h

    r2173 r2207  
    99#endif
    1010
    11 #include <TGraphErrors.h>
    12 
    1311class MParList;
    1412class MMcEvt;
     
    1715class MMcTrig;
    1816class MHMcRate;
     17class TH1F;
    1918
    2019class MMcTriggerRateCalc : public MTask
    2120{
    2221private:
    23     MMcEvt    *fMcEvt;        //!
     22    MMcEvt    *fMcEvt;     //!
    2423
    2524    TObjArray *fMcRate;
     
    2928    MMcCorsikaRunHeader *fMcCorRunHeader;
    3029
    31     UInt_t     fNum;           // decoded dimension
     30    UInt_t     fNum;       // decoded dimension
    3231    UInt_t     fFirst;
    3332    UInt_t     fLast;
    3433
    35     Float_t*   fTrigNSB;   // Number of triggers due to NSB alone
     34    Float_t   *fTrigNSB;   // Number of triggers due to NSB alone
    3635    Float_t    fSimNSB;    // Number of simulated NSB-only events
    3736
    38     Float_t*   fTrigger;       // Number of triggered showers
    39     Float_t    fShowers;       // Number of simulated showers
    40     Float_t    fAnalShow;      // Number of analysed showers
     37    Float_t   *fTrigger;   // Number of triggered showers
     38    Float_t    fShowers;   // Number of simulated showers
     39    Float_t    fAnalShow;  // Number of analysed showers
    4140
    42     Int_t      fPartId;        // Incident particle that generates showers
     41    Int_t      fPartId;    // Incident particle that generates showers
     42
     43    TH1F      *fHist[5];
    4344
    4445    void Init(int dim, float *trigbg,
     
    4849    MMcTrig  *GetTrig(UInt_t i) const { return (MMcTrig*)((*fMcTrig)[i]); }
    4950
    50     TH1F*     fHist[5];
     51    Bool_t ReInit(MParList *plist);
     52
     53    Int_t PreProcess(MParList *pList);
     54    Int_t Process();
     55    Int_t PostProcess();
    5156
    5257public:
     
    5964    ~MMcTriggerRateCalc();
    6065
    61     Bool_t ReInit(MParList *plist);
    62 
    63     Bool_t PreProcess(MParList *pList);
    64     Bool_t Process();
    65     Bool_t PostProcess();
    66 
    6766    TH1F* GetHist(Int_t i) {return fHist[i];}
    6867
  • trunk/MagicSoft/Mars/mranforest/MRanForestCalc.cc

    r2173 r2207  
    9191// number of columns (with the same meaning).
    9292//
    93 Bool_t MRanForestCalc::PreProcess(MParList *plist)
     93Int_t MRanForestCalc::PreProcess(MParList *plist)
    9494{
    9595    fRanForest = (MRanForest*)plist->FindObject("MRanForest");
     
    137137//
    138138//
    139 Bool_t MRanForestCalc::Process()
     139Int_t MRanForestCalc::Process()
    140140{
    141141    // first copy the data from the data array to a vector event
  • trunk/MagicSoft/Mars/mranforest/MRanForestCalc.h

    r2071 r2207  
    2424    MRanTree    *fRanTree;
    2525
     26    Int_t PreProcess(MParList *plist);
     27    Int_t Process();
     28
    2629public:
    2730    MRanForestCalc(const char *name=NULL, const char *title=NULL);
     
    3336    void SetUseNumTrees(UShort_t n=100) { fNum = n; }
    3437
    35     Bool_t PreProcess(MParList *plist);
    36     Bool_t Process();
    37 
    3838    ClassDef(MRanForestCalc, 0) // Task
    3939};
  • trunk/MagicSoft/Mars/mranforest/MRanForestFill.cc

    r2173 r2207  
    7272
    7373// --------------------------------------------------------------------------
    74 Bool_t MRanForestFill::PreProcess(MParList *plist)
     74Int_t MRanForestFill::PreProcess(MParList *plist)
    7575{
    7676    fRanTree = (MRanTree*)plist->FindObject("MRanTree");
     
    9696//
    9797//
    98 Bool_t MRanForestFill::Process()
     98Int_t MRanForestFill::Process()
    9999{
    100100    fNum++;
     
    105105}
    106106
    107 Bool_t MRanForestFill::PostProcess()
     107Int_t MRanForestFill::PostProcess()
    108108{
    109109    fRanForest->SetNumTrees(fNum);
  • trunk/MagicSoft/Mars/mranforest/MRanForestFill.h

    r2173 r2207  
    2020    Int_t fNum;
    2121
     22    Int_t PreProcess(MParList *plist);
     23    Int_t Process();
     24    Int_t PostProcess();
     25
    2226public:
    2327    MRanForestFill(const char *name=NULL, const char *title=NULL);
     
    2630    void SetNumTrees(UShort_t n=100) { fNumTrees = n; }
    2731
    28     Bool_t PreProcess(MParList *plist);
    29     Bool_t Process();
    30     Bool_t PostProcess();
    31 
    3232    ClassDef(MRanForestFill, 0) // Task
    3333};
  • trunk/MagicSoft/Mars/mranforest/MRanForestGrow.cc

    r2173 r2207  
    7575// number of columns (with the same meaning).
    7676//
    77 Bool_t MRanForestGrow::PreProcess(MParList *plist)
     77Int_t MRanForestGrow::PreProcess(MParList *plist)
    7878{
    7979    fMGammas = (MHMatrix*)plist->FindObject("MatrixGammas", "MHMatrix");
     
    122122//
    123123//
    124 Bool_t MRanForestGrow::Process()
     124Int_t MRanForestGrow::Process()
    125125{
    126126    Bool_t not_last=fRanForest->GrowForest();
     
    130130}
    131131
    132 Bool_t MRanForestGrow::PostProcess()
     132Int_t MRanForestGrow::PostProcess()
    133133{
    134134    fRanTree->SetReadyToSave();
  • trunk/MagicSoft/Mars/mranforest/MRanForestGrow.h

    r2071 r2207  
    3131    Int_t fNdSize;
    3232
     33    Int_t PreProcess(MParList *pList);
     34    Int_t Process();
     35    Int_t PostProcess();
     36
    3337public:
    3438    MRanForestGrow(const char *name=NULL, const char *title=NULL);
     
    3842    void SetNdSize(Int_t n)  {    fNdSize=n;  }
    3943
    40     Bool_t PreProcess(MParList *pList);
    41     Bool_t Process();
    42     Bool_t PostProcess();
    43 
    4444    ClassDef(MRanForestGrow, 0) // Task to grow a random forest
    4545};
  • trunk/MagicSoft/Mars/mraw/MRawEvtData.cc

    r2200 r2207  
    6464#include "MArrayS.h"
    6565#include "MArrayB.h"
     66#include "MGeomCam.h"
    6667#include "MRawRunHeader.h"
    6768#include "MRawEvtPixelIter.h"
     
    472473}
    473474
    474 Bool_t MRawEvtData::GetPixelContent(Float_t &val, Int_t idx, Float_t ratio, Int_t type) const
     475Bool_t MRawEvtData::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const
    475476{
    476477    MRawEvtPixelIter Next(const_cast<MRawEvtData*>(this));
     
    478479        return kFALSE;
    479480
    480     val = Next.GetSumHiGainSamples();
     481    val = Next.GetSumHiGainSamples()-(float)GetNumHiGainSamples()*fHiGainFadcSamples->GetArray()[0];
     482    val *= cam.GetPixRatio(idx);
     483
    481484    return kTRUE;
    482485}
  • trunk/MagicSoft/Mars/mraw/MRawEvtData.h

    r2200 r2207  
    6464    void ReadEvt(istream &fin);
    6565
    66     Bool_t GetPixelContent(Float_t &val, Int_t idx, Float_t ratio=1, Int_t type=0) const;
     66    Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
    6767    void   DrawPixelContent(Int_t num) const
    6868    {
  • trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc

    r2178 r2207  
    203203}
    204204
     205Byte_t MRawEvtPixelIter::GetNumMaxHiGainSample() const
     206{
     207    Byte_t max  = 0;
     208    Byte_t maxi = 0;
     209
     210    for (int i=0; i<fNumHiGainSamples; i++)
     211        if (fHiGainPos[i]>max)
     212        {
     213            max = fHiGainPos[i];
     214            maxi = i;
     215        }
     216
     217    return maxi;
     218}
     219
    205220// --------------------------------------------------------------------------
    206221//
  • trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.h

    r2178 r2207  
    8181    Float_t GetVarHiGainSamples() const;
    8282
     83    Byte_t GetNumMaxHiGainSample() const;
     84
    8385    Bool_t HasLoGain() const
    8486    {
  • trunk/MagicSoft/Mars/mraw/MRawFileRead.cc

    r2173 r2207  
    128128// Now the EvtHeader and EvtData containers are initialized.
    129129//
    130 Bool_t MRawFileRead::PreProcess(MParList *pList)
     130Int_t MRawFileRead::PreProcess(MParList *pList)
    131131{
    132132    //
     
    192192//  - the raw data information of one event is read
    193193//
    194 Bool_t MRawFileRead::Process()
     194Int_t MRawFileRead::Process()
    195195{
    196196    //
     
    236236//  if it doesn't match.
    237237//
    238 Bool_t MRawFileRead::PostProcess()
     238Int_t MRawFileRead::PostProcess()
    239239{
    240240    //
  • trunk/MagicSoft/Mars/mraw/MRawFileRead.h

    r2173 r2207  
    2929    ifstream       *fIn;            //! buffered input stream (file to read from)
    3030
     31    Int_t PreProcess(MParList *pList);
     32    Int_t Process();
     33    Int_t PostProcess();
     34
     35
    3136public:
    3237    MRawFileRead(const char *filename, const char *name=NULL, const char *title=NULL);
    3338    ~MRawFileRead();
    34 
    35     Bool_t PreProcess(MParList *pList);
    36     Bool_t Process();
    37     Bool_t PostProcess();
    3839
    3940    ClassDef(MRawFileRead, 0)   // Task to read the raw data binary file
  • trunk/MagicSoft/Mars/mraw/MRawFileWrite.cc

    r2173 r2207  
    109109// are created.
    110110//
    111 Bool_t MRawFileWrite::PreProcess (MParList *pList)
     111Int_t MRawFileWrite::PreProcess (MParList *pList)
    112112{
    113113    //
     
    231231// event should be filled in and fills  it into this tree.
    232232//
    233 Bool_t MRawFileWrite::Process()
     233Int_t MRawFileWrite::Process()
    234234{
    235235    //
  • trunk/MagicSoft/Mars/mraw/MRawFileWrite.h

    r2199 r2207  
    4141    ~MRawFileWrite();
    4242
    43     Bool_t PreProcess(MParList *pList);
    44     Bool_t Process();
     43    Int_t PreProcess(MParList *pList);
     44    Int_t Process();
    4545
    4646    ClassDef(MRawFileWrite, 0)  // Task to write the raw data containers to a root file
  • trunk/MagicSoft/Mars/mraw/Makefile

    r2178 r2207  
    2222#  connect the include files defined in the config.mk file
    2323#
    24 INCLUDES = -I. -I../mbase -I../MBase -I../mgui
     24INCLUDES = -I. -I../mbase -I../mgui -I../mgeom -I../MBase
    2525
    2626#------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.