Changeset 14792


Ignore:
Timestamp:
Jan 28, 2013, 10:55:44 AM (7 years ago)
Author:
lyard
Message:
Added fits output for MC data
Location:
trunk/Mars
Files:
6 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/datacenter/scripts/runceres

    r10041 r14792  
    1 #!/bin/sh
     1#!/bin/bash
    22#
    33# ========================================================================
  • trunk/Mars/mcore/fits.h

    r14484 r14792  
    66#define uint64_t ULong64_t
    77#define uint8_t  UChar_t
     8#define uint32_t UInt_t
    89#else
    910#include <stdint.h>
     
    415416
    416417#ifdef __CINT__
    417     typedef map<string, void*> Pointers;
     418    typedef char Pointers[56];
    418419#else
    419420    typedef unordered_map<string, void*> Pointers;
  • trunk/Mars/mcore/ofits.h

    r14199 r14792  
    253253
    254254        if (!entry.check())
    255             return false;
    256 
     255        {//ETIENNE
     256            //looks like something went wrong. Maybe entry is too long ?
     257            //try to remove the comment
     258            entry.comment = "";
     259            if (!entry.check())
     260                return false;
     261            gLog << "WARNING: removed comment from over-sized entry " << key << endl;
     262        }
    257263        fKeys.push_back(entry);
    258264        return true;
  • trunk/Mars/mfileio/FileIOLinkDef.h

    r9527 r14792  
    1818#pragma link C++ class MWriteAsciiFile+;
    1919#pragma link C++ class MWriteRootFile+;
     20#pragma link C++ class MWriteFitsFile+;
    2021
    2122#endif
  • trunk/Mars/mfileio/Makefile

    r11873 r14792  
    3030           MWriteFile.cc \
    3131           MWriteAsciiFile.cc \
    32            MWriteRootFile.cc
     32           MWriteRootFile.cc \
     33           MWriteFitsFile.cc \
     34           MTopFitsGroup.cc \
     35           MFitsArray.cc
    3336
    3437############################################################
  • trunk/Mars/mjobs/MJSimulation.cc

    r9931 r14792  
    7878#include "MImgCleanStd.h"
    7979#include "MWriteRootFile.h"
     80#include "MWriteFitsFile.h"
    8081
    8182#include "MSimMMCS.h"
     
    243244    write.AddContainer("IncidentAngle",       "Events", kFALSE);
    244245}
    245 
     246//FIXME Etienne. I'm doing the same for fits and root. I probably should adapt somehow
     247void 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);
     261}
    246262Bool_t MJSimulation::Process(const MArgs &args, const MSequence &seq)
    247263{
     
    528544    MWriteRootFile write4a( 2, rule4, fOverwrite?"RECREATE":"NEW", "Star file");
    529545    MWriteRootFile write4b( 2, rule4, fOverwrite?"RECREATE":"NEW", "Star file");
    530     MWriteRootFile write3a( 2, rule3, fOverwrite?"RECREATE":"NEW", "Camera file");
     546    MWriteFitsFile write3a( 2, rule3, fOverwrite?"RECREATE":"NEW", "Camera file");
    531547    MWriteRootFile write3b( 2, rule3, fOverwrite?"RECREATE":"NEW", "Camera file");
    532548    MWriteRootFile write2a( 2, rule2, fOverwrite?"RECREATE":"NEW", "Signal file");
     
    534550    MWriteRootFile write1a( 2, rule1, fOverwrite?"RECREATE":"NEW", "Reflector file");
    535551    MWriteRootFile write1b( 2, rule1, fOverwrite?"RECREATE":"NEW", "Reflector file");
     552
     553    write3a.VetoColumn("MParameterD.fVal");
     554    write3a.VetoColumn("MCorsikaEvtHeader.fEvtNumber");
     555    write3a.VetoColumn("MCorsikaEvtHeader.fNumReuse");
     556    write3a.VetoColumn("MCorsikaEvtHeader.fTotalEnergy");
     557    write3a.VetoColumn("MCorsikaEvtHeader.fStartAltitude");
     558    write3a.VetoColumn("MCorsikaEvtHeader.fFirstTargetNum");
     559    write3a.VetoColumn("MCorsikaEvtHeader.fFirstInteractionHeight");
     560    write3a.VetoColumn("MCorsikaEvtHeader.fMomentumX");
     561    write3a.VetoColumn("MCorsikaEvtHeader.fMomentumY");
     562    write3a.VetoColumn("MCorsikaEvtHeader.fMomentumZ");
     563    write3a.VetoColumn("MCorsikaEvtHeader.fAz");
     564    write3a.VetoColumn("MCorsikaEvtHeader.fWeightedNumPhotons");
     565    write3a.VetoColumn("MCorsikaEvtHeader.fZd");
     566    write3a.VetoColumn("MCorsikaEvtHeader.fAd");
     567    write3a.VetoColumn("MCorsikaEvtHeader.fX");
     568    write3a.VetoColumn("MCorsikaEvtHeader.fY");
     569    write3a.VetoColumn("MCorsikaEvtHeader.fWeightNumPhotons");
     570    write3a.VetoColumn("MMcEvt.fEvtNumber");
     571    write3a.VetoColumn("MMcEvt.fThick0");
     572    write3a.VetoColumn("MMcEvt.fFirstTarget");
     573    write3a.VetoColumn("MMcEvt.fZFirstInteraction");
     574    write3a.VetoColumn("MMcEvt.fCoreD");
     575    write3a.VetoColumn("MMcEvt.fCoreX");
     576    write3a.VetoColumn("MMcEvt.fCoreY");
     577    write3a.VetoColumn("MMcEvt.fTimeFirst");
     578    write3a.VetoColumn("MMcEvt.fTimeLast");
     579    write3a.VetoColumn("MMcEvt.fLongiNmax");
     580    write3a.VetoColumn("MMcEvt.fLongit0");
     581    write3a.VetoColumn("MMcEvt.fLongitmax");
     582    write3a.VetoColumn("MMcEvt.fLongia");
     583    write3a.VetoColumn("MMcEvt.fLongib");
     584    write3a.VetoColumn("MMcEvt.fLongic");
     585    write3a.VetoColumn("MMcEvt.fLongichi2");
     586    write3a.VetoColumn("MMcEvt.fPhotIni");
     587    write3a.VetoColumn("MMcEvt.fPassPhotAtm");
     588    write3a.VetoColumn("MMcEvt.fPassPhotRef");
     589    write3a.VetoColumn("MMcEvt.fPassPhotCone");
     590    write3a.VetoColumn("MMcEvt.fPhotElfromShower");
     591    write3a.VetoColumn("MMcEvt.fPhotElinCamera");
     592    write3a.VetoColumn("MMcEvt.fElecCphFraction");
     593    write3a.VetoColumn("MMcEvt.fMuonCphFraction");
     594    write3a.VetoColumn("MMcEvt.fOtherCphFraction");
     595    write3a.VetoColumn("MMcEvt.fFadcTimeJitter");
     596    write3a.VetoColumn("MMcEvt.fEventReuse");
     597    write3a.VetoColumn("MRawEvtData.fHiGainPixId");
     598//    write3a.VetoColumn("MRawEvtData.fHiGainFadcSamples");
     599    write3a.VetoColumn("MRawEvtData.fLoGainPixId");
     600    write3a.VetoColumn("MRawEvtData.fLoGainFadcSamples");
     601    write3a.VetoColumn("MRawEvtData.fABFlags");
     602    write3a.VetoColumn("MRawEvtData.fStartCells");
     603    write3a.VetoColumn("MRawEvtData.fNumBytesPerSample");
     604    write3a.VetoColumn("MRawEvtData.fIsSigned");
     605//    write3a.VetoColumn("MRawEvtHeader.fDAQEvtNumber"); //EventNum ?
     606    write3a.VetoColumn("MRawEvtHeader.fNumTrigLvl1");
     607    write3a.VetoColumn("MRawEvtHeader.fNumTrigLvl2");
     608    write3a.VetoColumn("MRawEvtHeader.fTrigPattern");
     609    write3a.VetoColumn("MRawEvtHeader.fNumLoGainOn");
     610
     611    write3a.SetBytesPerSample("Data", 2);
    536612
    537613    write1a.SetName("WriteRefData");
  • trunk/Mars/mjobs/MJSimulation.h

    r9609 r14792  
    1111class MSequence;
    1212class MWriteRootFile;
     13class MWriteFitsFile;
    1314
    1415class MJSimulation : public MJob
     
    3132    void SetupHist(MHn &hist) const;
    3233    void SetupCommonFileStructure(MWriteRootFile &write) const;
     34    void SetupCommonFileStructure(MWriteFitsFile& write) const;
    3335
    3436public:
  • trunk/Mars/mraw/MRawEvtData.h

    r14447 r14792  
    3030
    3131    MArrayS *fHiGainPixId;        //-> list of pixel IDs of hi gain channel
    32     MArrayB *fHiGainFadcSamples;  //-> list of hi gain samples of all pixels (ordering: see fHiGainPixId)
     32    MArrayB *fHiGainFadcSamples;  //-> list of hi gain samples of all pixels (ordering: see fHiGainPixId) [fits: unit=mV ; name = Data]
    3333
    3434    MArrayS *fLoGainPixId;        //-> list of pixel IDs of lo gain channel
  • trunk/Mars/mraw/MRawEvtHeader.h

    r14447 r14792  
    5353    MTime   *fTime;            //! object to store the time in (ReadEvt)
    5454
    55     UInt_t   fDAQEvtNumber;    // Number of Event
     55    UInt_t   fDAQEvtNumber;    // Number of Event [fits: name=EventNum]
    5656
    5757    UInt_t   fNumTrigLvl1;     // Number of 1st level tiggers between 2 events
Note: See TracChangeset for help on using the changeset viewer.