Changeset 1032 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
11/06/01 13:27:04 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r1031 r1032  
    11                                                                  -*-*- END -*-*-
    22 2001/11/06: Thomas Bretz
     3
     4   * Makefile.conf.linux, Makefile.conf.linux-gnu:
     5     - removed -g flag
    36
    47   * mraw/MRawCrateArray.[h,cc]:
     
    1316     - changed so, that the arrays are dreed and allocated only
    1417       as less as possible
     18     - removed (by comment) AddPixel
    1519
    1620   * mraw/MRawFileRead.[h,cc]:
     
    2327     - removed '.' from Branch names (each tree contains only one master
    2428       branch with equal subbranches)
     29
     30   * macros/readCT1.C:
     31     - fixed a small bug
     32
     33   * manalysis/MCerPhotCalc.cc:
     34     - removed Clear from Process (done by Reset now)
     35
     36   * manalysis/MCerPhotEvt.[h,cc]:
     37     - added reset-function
     38     - some small changes to the code layout
     39
     40   * mmc/MMcFadcHeader.[h,cc], mmc/MMcTrig.[h,cc]:
     41     - chenged constructor to support fName and fTitle
     42
     43   * mbase/MReadTree.cc:
     44     - removes '.' from a branch name now before searching/creating the object
    2545
    2646
  • trunk/MagicSoft/Mars/Makefile.conf.linux

    r1018 r1032  
    2020#
    2121
    22 OPTIM    = -O2 -Wall -fno-rtti -fno-exceptions -fPIC -Wtraditional -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs 
    23 DEBUG    = -g
     22OPTIM    = -O2 -Wall -fno-rtti -fno-exceptions -fPIC -Wtraditional -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs
     23DEBUG    =
    2424ARCHDEF  = -D__LINUX__
    2525
  • trunk/MagicSoft/Mars/Makefile.conf.linux-gnu

    r1018 r1032  
    2121
    2222OPTIM    = -O2 -Wall -fno-rtti -fno-exceptions -fPIC -Wtraditional -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs
    23 DEBUG    = -g
     23DEBUG    =
    2424ARCHDEF  = -D__LINUX__
    2525
  • trunk/MagicSoft/Mars/macros/readCT1.C

    r948 r1032  
    3232    MTaskList   tlist;
    3333
    34     plist->AddToList(&geomcam);
    35     plist->AddToList(&hillas);
    36     plist->AddToList(&tlist);
     34    plist.AddToList(&geomcam);
     35    plist.AddToList(&hillas);
     36    plist.AddToList(&tlist);
    3737
    38     MCT1ReadAscii read("CT1_99_off1.dat");
     38    MCT1ReadAscii read("data/CT1_97_off1.dat");
    3939    MImgCleanStd  clean;
    4040    MHillasCalc   hcalc;
     
    5454    Int_t icount = 0;
    5555    MCamDisplay display(&geomcam);
    56         display.DrawPhotNum(&phevt);
    57 
     56    display.Draw();
    5857
    5958    while (read.Process())
  • trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc

    r1010 r1032  
    6262
    6363    AddToBranchList("fHiGainPixId");
    64     //AddToBranchList("fLoGainPixId");
     64    AddToBranchList("fLoGainPixId");
    6565    AddToBranchList("fHiGainFadcSamples");
    66     //AddToBranchList("fLoGainFadcSamples");
     66    AddToBranchList("fLoGainFadcSamples");
     67
    6768}
    6869
     
    7778//  - MCerPhotEvt
    7879//
    79 Bool_t MCerPhotCalc::PreProcess( MParList *pList )
     80Bool_t MCerPhotCalc::PreProcess(MParList *pList)
    8081{
    8182    fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData");
     
    107108Bool_t MCerPhotCalc::Process()
    108109{
    109     fCerPhotEvt->Clear();
    110 
    111110    MRawEvtPixelIter pixel(fRawEvt);
    112111
    113112    while (pixel.Next())
    114113    {
     114
    115115        const UInt_t pixid = pixel.GetPixelId();
    116116
  • trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc

    r1003 r1032  
    4444MCerPhotEvt::MCerPhotEvt(const char *name, const char *title) : fNumPixels(0)
    4545{
    46 
    47   fName  = name  ? name  : "MCerPhotEvt";
    48   fTitle = title ? title : "(Number of Photon)-Event Information";
    49  
    50   fPixels = new TClonesArray ("MCerPhotPix", 577) ;
    51 
    52   //
    53   // FIXME: is this really necessary?
    54   //
    55   fPixels->Clear();
     46    fName  = name  ? name  : "MCerPhotEvt";
     47    fTitle = title ? title : "(Number of Photon)-Event Information";
     48
     49    fPixels = new TClonesArray ("MCerPhotPix", 577);
     50
     51    //
     52    // FIXME: is this really necessary?
     53    //
     54    Reset();
    5655}
    5756
     
    8281{
    8382    // TClonesArray -> 'operator new with placement' should be used
     83
     84    fPixels->ExpandCreate(fNumPixels);
    8485    new ((*fPixels)[fNumPixels++]) MCerPhotPix(id, nph, err);
    8586}
     
    8990// reset counter and delete netries in list.
    9091//
    91 void MCerPhotEvt::Clear(Option_t *)
     92void MCerPhotEvt::Reset()
    9293{
    9394    fNumPixels = 0;
    94     fPixels->Clear();
     95//    fPixels->Delete();
    9596}
    9697
     
    108109        << endl ;
    109110
    110     for (Int_t il=0; il<entries; il++ )
    111         (*this)[il].Print();
     111    for (Int_t i=0; i<entries; i++ )
     112        (*this)[i].Print();
    112113}
    113114
     
    120121    const Int_t entries = fPixels->GetEntries();
    121122
    122     for (Int_t il=0; il<entries; il++)
    123     {
    124         if (id == (*this)[il].GetPixId())
     123    for (Int_t i=0; i<entries; i++)
     124    {
     125        if (id == (*this)[i].GetPixId())
    125126            return kTRUE;
    126127    }
     
    137138    const Int_t entries = fPixels->GetEntries();
    138139
    139     for (Int_t il=0; il<entries; il++)
    140     {
    141         MCerPhotPix &pix = (*this)[il];
     140    for (Int_t i=0; i<entries; i++)
     141    {
     142        const MCerPhotPix &pix = (*this)[i];
    142143
    143144        if (id == pix.GetPixId() && pix.IsPixelUsed())
     
    156157    const Int_t entries = fPixels->GetEntries();
    157158
    158     for (Int_t il=0; il<entries; il++)
    159     {
    160         MCerPhotPix &pix = (*this)[il];
     159    for (Int_t i=0; i<entries; i++)
     160    {
     161        const MCerPhotPix &pix = (*this)[i];
    161162
    162163        if (id == pix.GetPixId() && pix.IsCorePixel())
     
    178179    Float_t minval = (*this)[0].GetNumPhotons();
    179180
    180     Float_t testval;
    181181    for (UInt_t i=1; i<fNumPixels; i++)
    182182    {
    183         testval = (*this)[i].GetNumPhotons();
     183        const Float_t testval = (*this)[i].GetNumPhotons();
    184184
    185185        if (testval < minval)
     
    201201    Float_t maxval = (*this)[0].GetNumPhotons();
    202202
    203     Float_t testval;
    204203    for (UInt_t i=1; i<fNumPixels; i++)
    205204    {
    206         testval = (*this)[i].GetNumPhotons();
     205        const Float_t testval = (*this)[i].GetNumPhotons();
    207206
    208207        if (testval > maxval)
  • trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h

    r1014 r1032  
    2121    ~MCerPhotEvt() { delete fPixels; }
    2222
    23     void Draw(Option_t* option = "");
    24 
    2523    UInt_t GetNumPixels() const { return fNumPixels; }
    26 
    27     void AddPixel(Int_t id, Float_t nph, Float_t err);
    28 
    29     void Clear(Option_t *opt=NULL);
    30     void Print(Option_t *opt=NULL) const;
     24    void   AddPixel(Int_t id, Float_t nph, Float_t err);
    3125
    3226    Bool_t  IsPixelExisting(Int_t id) const;
     
    4034    MCerPhotPix &operator[](int i) const { return *(MCerPhotPix*)(fPixels->At(i)); }
    4135
     36    void Reset();
     37
     38    void Draw(Option_t* option = "");
     39    void Print(Option_t *opt=NULL) const;
     40    void Clear(Option_t *opt=NULL) { Reset(); }
     41
    4242    ClassDef(MCerPhotEvt, 1)    // class for an event containing cerenkov photons
    4343};
  • trunk/MagicSoft/Mars/mbase/MReadTree.cc

    r1030 r1032  
    302302    {
    303303        //
    304         // Get Name of Branch
    305         //
    306         const char *name = branch->GetName();
     304        // Get Name of Branch and Object
     305        //
     306        const char *bname = branch->GetName();
     307
     308        TString oname(bname);
     309
     310        if (oname.EndsWith("."))
     311            oname.Remove(oname.Length()-1);
    307312
    308313        //
    309314        // Check if enabeling the branch is allowed
    310315        //
    311         if (fVetoList->FindObject(name))
     316        if (fVetoList->FindObject(oname))
    312317        {
    313             *fLog << "Master branch " << name << " has veto... skipped." << endl;
     318            *fLog << "Master branch " << bname << " has veto... skipped." << endl;
    314319            DisableSubBranches(branch);
    315320            continue;
     
    326331        // check if object is existing in the list
    327332        //
    328         *pcont=pList->FindCreateObj(name);
     333        *pcont=pList->FindCreateObj(oname);
    329334
    330335        if (!*pcont)
     
    334339            // we cannot proceed reading this branch
    335340            //
    336             *fLog << dbginf << "Warning: Class '" << name << "' not existing in dictionary. Branch skipped." << endl;
     341            *fLog << dbginf << "Warning: Class '" << oname << "' not existing in dictionary. Branch skipped." << endl;
    337342            DisableSubBranches(branch);
    338343            continue;
     
    343348        // the actual branch should be stored - enable branch.
    344349        //
    345         fChain->SetBranchAddress(name, pcont);
    346 
    347         *fLog << "Master branch address " << name << " setup for reading." << endl;
     350        fChain->SetBranchAddress(bname, pcont);
     351        *fLog << "Master branch address " << bname << " setup for reading." << endl;
     352
     353        //*fLog << "Branch " << bname << " autodel: " << (int)branch->IsAutoDelete() << endl;
     354        branch->SetAutoDelete();
    348355
    349356        num++;
  • trunk/MagicSoft/Mars/mraw/MRawEvtData.cc

    r1031 r1032  
    350350    fPosInArray = 0;
    351351}
    352 
     352/*
    353353// --------------------------------------------------------------------------
    354354//
     
    370370    if (nSamp && ns!=nSamp)
    371371    {
    372         *fLog << "RawEvtData::FillPixel: Error, number of samples in ";
     372        *fLog << "RawEvtData::AddPixel: Error, number of samples in ";
    373373        *fLog << "TArrayC doesn't match actual number" << endl;
    374374        return;
     
    395395    arrsam->AddAt((Byte_t*)data->GetArray(), arrsam->GetSize()-ns, ns);
    396396}
    397 
     397*/
    398398// --------------------------------------------------------------------------
    399399//
  • trunk/MagicSoft/Mars/mraw/MRawEvtData.h

    r1031 r1032  
    5252    void DeletePixels(Bool_t flag=kFALSE);
    5353    void ResetPixels() { DeletePixels(kTRUE); }
    54     void AddPixel(UShort_t nOfPixel, TArrayC *data, Bool_t lflag=kFALSE);
     54    // void AddPixel(UShort_t nOfPixel, TArrayC *data, Bool_t lflag=kFALSE);
    5555
    5656    Byte_t   GetNumHiGainSamples() const;
Note: See TracChangeset for help on using the changeset viewer.