00001 /* Raw Record Format: Definitions for raw record format 00002 * 00003 * Created By: dandwyer@caltech.edu 2009/7/10 00004 */ 00005 00006 #ifndef RAWRECORDFORMAT_H 00007 #define RAWRECORDFORMAT_H 00008 00009 namespace DayaBay { 00010 00011 namespace RawRecord_v06 { 00012 00013 namespace RecordFormat { 00014 00015 namespace Record { 00016 static const unsigned int typeLine = 0; 00017 static const unsigned int sizeLine = 1; 00018 static const unsigned int minimumSize = 2; 00019 } 00020 00021 namespace FileStart { 00022 static const unsigned int type = 0x1234aaaa; 00023 static const unsigned int fileVersionLine = 2; 00024 static const unsigned int fileNumberLine = 3; 00025 static const unsigned int dateLine = 4; 00026 static const unsigned int timeLine = 5; 00027 static const unsigned int sizeLimitDataBlocksLine = 6; 00028 static const unsigned int sizeLimitMBLine = 7; 00029 } 00030 00031 namespace FileName { 00032 static const unsigned int type = 0x1234aabb; 00033 static const unsigned int appNameLengthLine = 2; 00034 static const unsigned int appNameLine = 3; 00035 } 00036 00037 namespace Metadata { 00038 static const unsigned int type = 0x1234aabc; 00039 static const unsigned int entriesLine = 2; 00040 } 00041 00042 namespace RunParameters { 00043 static const unsigned int type = 0x1234bbbb; 00044 static const unsigned int runNumberLine = 2; 00045 static const unsigned int reconstructionEnabledLine = 3; 00046 static const unsigned int triggerTypeLine = 4; 00047 static const unsigned int detectorMaskLine = 5; 00048 } 00049 00050 namespace CalibrationParameters { 00051 static const unsigned int type = 0x1234bbdd; 00052 static const unsigned int detectorIdLine = 2; 00053 static const unsigned int axisLine = 3; 00054 static const unsigned int sourceIdLine = 4; 00055 static const unsigned int zPositionLine = 5; 00056 static const unsigned int durationLine = 6; 00057 static const unsigned int ledFrequencyLine = 7; 00058 static const unsigned int ltbModeLine = 8; 00059 } 00060 00061 namespace DataSeparator { 00062 static const unsigned int type = 0x1234cccc; 00063 static const unsigned int blockNumberLine = 2; 00064 static const unsigned int blockSizeLine = 3; 00065 static const unsigned int dataLine = 4; 00066 } 00067 00068 namespace FileEnd { 00069 static const unsigned int type = 0x1234dddd; 00070 static const unsigned int dateLine = 2; 00071 static const unsigned int timeLine = 3; 00072 static const unsigned int eventsInFileLine = 4; 00073 static const unsigned int dataInFileLine = 5; 00074 static const unsigned int eventsInRunLine = 6; 00075 static const unsigned int dataInRunLine = 7; 00076 static const unsigned int statusLine = 8; 00077 static const unsigned int endLine = 9; 00078 static const unsigned int end = 0x1234eeee; 00079 } 00080 00081 } 00082 00083 } 00084 00085 // Define changes to record format here 00086 /* 00087 00088 namespace RawRecord_v07 { 00089 namespace RecordFormat { 00090 // Only need to define the items that have changed in the record format 00091 } 00092 } 00093 00094 */ 00095 00096 00097 } 00098 00099 #endif // RAWRECORDFORMAT_H