Changeset 17737 for trunk/Mars/mjobs


Ignore:
Timestamp:
04/29/14 19:50:09 (11 years ago)
Author:
tbretz
Message:
Unified the two SetupCommonFileStructure.
Location:
trunk/Mars/mjobs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mjobs/MJSimulation.cc

    r17663 r17737  
    229229}
    230230
    231 void MJSimulation::SetupCommonFileStructure(MWriteRootFile &write) const
     231template<class T>
     232void MJSimulation::SetupCommonFileStructure(T &write) const
    232233{
    233234    // Common run headers
     
    243244    write.AddContainer("MMcEvt",              "Events");
    244245    write.AddContainer("IncidentAngle",       "Events", kFALSE);
    245 }
    246 //FIXME Etienne. I'm doing the same for fits and root. I probably should adapt somehow
    247 void MJSimulation::SetupCommonFileStructure(MWriteFitsFile& write) const
    248 {
    249     // Common run headers
    250     write.AddContainer("MMcCorsikaRunHeader", "RunHeaders", kFALSE);
    251     write.AddContainer("MCorsikaRunHeader",   "RunHeaders", kFALSE);
    252     write.AddContainer("MRawRunHeader",       "RunHeaders");
    253     write.AddContainer("MGeomCam",            "RunHeaders");
    254     write.AddContainer("MMcRunHeader",        "RunHeaders");
    255 
    256     // Common events
    257     write.AddContainer("MCorsikaEvtHeader",   "Events", kFALSE);
    258     write.AddContainer("MRawEvtHeader",       "Events");
    259     write.AddContainer("MMcEvt",              "Events");
    260     write.AddContainer("IncidentAngle",       "Events", kFALSE);
     246    write.AddContainer("MPointingPos",        "Events", kFALSE);
    261247}
    262248
  • trunk/Mars/mjobs/MJSimulation.h

    r17148 r17737  
    3232    Bool_t CheckEnvLocal();
    3333
     34    template<class T>
     35    void SetupCommonFileStructure(T &write) const;
     36
    3437    void SetupHist(MHn &hist) const;
    35     void SetupCommonFileStructure(MWriteRootFile &write) const;
    36     void SetupCommonFileStructure(MWriteFitsFile& write) const;
    3738    void SetupHeaderKeys(MWriteFitsFile& write, MRawRunHeader &header) const;
    3839    void SetupVetoColumns(MWriteFitsFile& write) const;
Note: See TracChangeset for help on using the changeset viewer.