Changeset 19330


Ignore:
Timestamp:
10/30/18 15:34:34 (6 years ago)
Author:
tbretz
Message:
Moved magic numbers to an enum, changed hasMagicNumber into the block length (273 floats for raw data and 312 data for THIN data)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mcorsika/MCorsikaFormat.h

    r18532 r19330  
    1919
    2020public:
    21     static const unsigned int kSyncMarker;
    22     static const unsigned int kMagicNumber;
     21    enum
     22    {
     23        kBlockLengthRaw  = 0x00005994, // Raw Corsika without Thinning
     24        kBlockLengthThin = 0x00006660, // Raw Corsika with Thinning
     25
     26        kSyncMarker  = 0xd41f8a37,     // EventIO
     27
     28        kRUNH = 0x484e5552, // "RUNH"
     29        kRUNE = 0x454e5552, // "RUNE"
     30        kEVTH = 0x48545645, // "EVTH"
     31        kEVTE = 0x45545645, // "EVTE"
     32    };
    2333
    2434   MCorsikaFormat(std::istream * in)
     
    4656{
    4757private:
    48    bool fHasMagicNumber;
     58   uint32_t fBlockLength;
    4959
    5060public:
    51    MCorsikaFormatRaw(std::istream * in, bool h)
    52         : MCorsikaFormat(in), fHasMagicNumber(h) {}
     61   MCorsikaFormatRaw(std::istream * in, const uint32_t &bl)
     62        : MCorsikaFormat(in), fBlockLength(bl) {}
    5363
    5464   Bool_t NextBlock(Int_t   readState, Int_t & blockType, Int_t & blockVersion,
Note: See TracChangeset for help on using the changeset viewer.