Changeset 2516 for trunk


Ignore:
Timestamp:
11/15/03 18:01:32 (21 years ago)
Author:
moralejo
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2515 r2516  
    33
    44                                                 -*-*- END OF LINE -*-*-
     5 2003/11/15: Thomas Bretz, Abelardo Moralejo
     6
     7   * mhist/MH.h:
     8     - added fSerialNumber data member
     9
     10   * mhist/MFillH.cc:
     11     - distribute serial number to the MH object to be filled
     12
     13   * mranforest/MHRanForest.cc, mhist/MHHadronness.cc:
     14     - added serial number to the MMcEvt container (does nothing unless
     15       SetSerialNumber has been called for the corresponding MFillH)
     16       This is intended to allow the use of Random Forest with MC
     17       multi-telescope files.
     18
     19   * NEWS:
     20     - updated.
     21
    522 2003/11/14: Abelardo Moralejo
    623
  • trunk/MagicSoft/Mars/NEWS

    r2507 r2516  
    22 *** Version <cvs>
    33
    4 
     4   - adapted Random Forest classes to allow the use with MC
     5     multi-telescope files which can be produced with the coming
     6     camera version 0.7.
    57
    68 *** Version 0.8.2 (2003/11/10)
  • trunk/MagicSoft/Mars/mhist/MFillH.cc

    r2448 r2516  
    436436    // Now we have the histogram container available. Try to Setup Fill.
    437437    //
     438    fH->SetSerialNumber(GetSerialNumber());
    438439    if (!fH->SetupFill(pList))
    439440    {
  • trunk/MagicSoft/Mars/mhist/MH.h

    r2416 r2516  
    1919class MH : public MParContainer
    2020{
     21private:
     22    Byte_t fSerialNumber;
     23
    2124public:
    2225    MH(const char *name=NULL, const char *title=NULL);
     26
     27
     28    virtual void SetSerialNumber(Byte_t num) { fSerialNumber = num; }
     29    Byte_t  GetSerialNumber() const { return fSerialNumber; }
     30    TString AddSerialNumber(const char *str) const { TString s(str); if (fSerialNumber==0) return s; s += ";"; s += fSerialNumber; return s; }
     31    TString AddSerialNumber(const TString &str) const { return AddSerialNumber((const char*)str); }
     32
    2333
    2434    Bool_t OverwritesDraw(TClass *cls=NULL) const;
     
    8494    static TObject *FindObjectInPad(const char *name, TVirtualPad *pad=NULL);
    8595
    86     ClassDef(MH, 0) //A base class for Mars histograms
     96    ClassDef(MH, 1) //A base class for Mars histograms
    8797};
    8898
  • trunk/MagicSoft/Mars/mhist/MHHadronness.cc

    r2414 r2516  
    154154    if (!fMatrix)
    155155    {
    156         fMcEvt = (MMcEvt*)plist->FindObject("MMcEvt");
     156        fMcEvt = (MMcEvt*)plist->FindObject(AddSerialNumber("MMcEvt"));
    157157        if (!fMcEvt)
    158158        {
    159             *fLog << err << dbginf << "MMcEvt not found... aborting." << endl;
     159            TString str = AddSerialNumber("MMcEvt");
     160            str += " not found... aborting.";
     161           *fLog << err << dbginf << str << endl;
    160162            return kFALSE;
    161163        }
     
    563565
    564566    fMatrix = mat;
    565     fMap = fMatrix->AddColumn("MMcEvt.fPartId");
     567
     568    TString str = AddSerialNumber("MMcEvt");
     569    str += ".fPartId";
     570
     571    fMap = fMatrix->AddColumn(str);
    566572}
    567573
  • trunk/MagicSoft/Mars/mranforest/MHRanForest.cc

    r2296 r2516  
    8787Bool_t MHRanForest::SetupFill(const MParList *plist)
    8888{
    89     fMcEvt = (MMcEvt*)plist->FindObject("MMcEvt");
     89    fMcEvt = (MMcEvt*)plist->FindObject(AddSerialNumber("MMcEvt"));
    9090    if (!fMcEvt)
    9191    {
    92         *fLog << err << dbginf << "MMcEvt not found... aborting." << endl;
     92        TString str =  AddSerialNumber("MMcEvt");
     93        str += " not found... aborting.";
     94        *fLog << err << dbginf << str << endl;
    9395        return kFALSE;
    9496    }
Note: See TracChangeset for help on using the changeset viewer.