Changeset 18571 for trunk/Mars/mmc


Ignore:
Timestamp:
09/03/16 20:41:39 (8 years ago)
Author:
tbretz
Message:
Implemented a sanity check in SetupFits for the container name.
Location:
trunk/Mars/mmc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mmc/MMcEvt.cxx

    r18556 r18571  
    259259Bool_t MMcEvt::SetupFits(fits &fin)
    260260{
     261    if (fName!="MMcEvt")
     262    {
     263        *fLog << err << "ERROR - SetupFits only supported if name equals MMcEvt." << endl;
     264        return kFALSE;
     265    }
     266
    261267    if (!fin.SetRefAddress("MMcEvt.fEvtNumber",         fEvtNumber        ))  return kFALSE;
    262268    if (!fin.SetRefAddress("MMcEvt.fThick0",            fThick0           ))  return kFALSE;
  • trunk/Mars/mmc/MMcEvtBasic.cc

    r18557 r18571  
    237237Bool_t MMcEvtBasic::SetupFits(fits &fin)
    238238{
     239    if (ClassName()==TString("MMcEvtBasic") && fName!="MMcEvtBasic")
     240    {
     241        *fLog << err << "ERROR - SetupFits only supported if name equals MMcEvtBasic." << endl;
     242        return kFALSE;
     243    }
     244
    239245    //if (!fin.SetRefAddress("MMcEvtBasic.fPartId",         fPartId        ))  return kFALSE;
    240246    if (!fin.SetRefAddress("MMcEvtBasic.fEnergy",         fEnergy        ))  return kFALSE;
Note: See TracChangeset for help on using the changeset viewer.