Ignore:
Timestamp:
02/15/05 18:44:43 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mjobs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc

    r6466 r6500  
    357357    MRawFileRead rawread(NULL);
    358358
     359    MRead *read = 0;
    359360    switch (GetDataFlag())
    360361    {
    361     case kIsUseRawData:
    362         rawread.AddFiles(fSequence.IsValid() ? iter : *fRuns);
    363         break;
    364     case kIsUseMC:
    365         readmc.AddFiles(fSequence.IsValid() ? iter : *fRuns);
    366         break;
    367     case kIsUseRootData:
    368         readreal.AddFiles(fSequence.IsValid() ? iter : *fRuns);
    369         break;
    370     }
     362    case kIsUseRawData:  read = &rawread;  break;
     363    case kIsUseMC:       read = &readmc;   break;
     364    case kIsUseRootData: read = &readreal; break;
     365    }
     366    read->AddFiles(fSequence.IsValid() ? iter : *fRuns);
     367
     368    const TString fname(Form("%s{s/_D_/_Y_}{s/.raw$/.root}", fPathOut.Data()));
     369
     370    // Write the special MC tree
     371    MWriteRootFile writemc(2, fname, fOverwrite?"RECREATE":"NEW");
     372    writemc.SetName("WriteMC");
     373    writemc.AddContainer("MMcEvtBasic", "MonteCarlo");
     374
     375    // Skips empty MC events (Not necessary, but faster!)
     376    MContinue contmc("MRawEvtData.GetNumPixels<0.5", "ContEmptyMC");
    371377
    372378    MPointingPosInterpolate pextr;
     
    563569
    564570    // The second rule is for the case reading raw-files!
    565     MWriteRootFile write(2, Form("%s{s/_D_/_Y_}{s/.raw$/.root}", fPathOut.Data()), fOverwrite?"RECREATE":"NEW");
     571    MWriteRootFile write(2, fname, fOverwrite?"RECREATE":"NEW");
    566572    // Run Header
    567573    write.AddContainer("MRawRunHeader",             "RunHeaders");
     
    682688
    683689    // Now setup main tasklist
    684     switch (GetDataFlag())
    685     {
    686     case kIsUseRawData:
    687         tlist.AddToList(&rawread);
    688         break;
    689     case kIsUseMC:
    690         tlist.AddToList(&readmc);
    691         break;
    692     case kIsUseRootData:
    693         tlist.AddToList(&readreal);
    694         break;
    695     }
    696     //tlist.AddToList(IsUseRawData() ? (MTask*)&rawread : (MTask*)&readreal);
     690    tlist.AddToList(read);
     691    if (IsUseMC())
     692        tlist.AddToList(&writemc);
     693    tlist.AddToList(&contmc);
     694
    697695    if (IsUseRootData())
    698696      tlist2.AddToList(&pextr);
  • trunk/MagicSoft/Mars/mjobs/MJStar.cc

    r6459 r6500  
    273273        write.AddContainer("MMcConfigRunHeader",   "RunHeaders");
    274274        write.AddContainer("MMcCorsikaRunHeader",  "RunHeaders");
     275        write.AddCopySource("MonteCarlo");
    275276    }
    276277    else
Note: See TracChangeset for help on using the changeset viewer.