00001 #ifndef FILEREADOUTFORMAT_RUNPARAMETERSRECORD_H 00002 #define FILEREADOUTFORMAT_RUNPARAMETERSRECORD_H 00003 00004 /* 00005 * RunParametersRecord.h 00006 * FileReadoutFormat 00007 * 00008 * Created by Simon Patton on 7/18/10. 00009 * Copyright 2010 DayaBay Collaboration. All rights reserved. 00010 * 00011 */ 00012 00013 #include "FileReadoutFormat/FileBuffer.h" 00014 00015 namespace DybDaq { 00016 00017 class RunParametersRecord : public FileBuffer { 00018 00019 public: 00020 00024 RunParametersRecord(const unsigned int runNumber, 00025 const bool recordEnabled, 00026 const unsigned int triggerType, 00027 const unsigned int detectorMask, 00028 const FileTraits& traits); 00029 00033 RunParametersRecord(const DybDaq::ByteBuffer& byteBuffer, 00034 const FileTraits& traits); 00035 00039 virtual ~RunParametersRecord(); 00040 00044 virtual bool isMarked(unsigned int marker) const; 00045 00049 unsigned int runNumber() const; 00050 00054 bool recordEnabled() const; 00055 00059 unsigned int triggerType() const; 00060 00064 unsigned int detectorMask() const; 00065 00066 protected: 00067 00071 virtual unsigned int formatComponent() const; 00072 00073 private: 00074 00078 RunParametersRecord(); 00079 00083 RunParametersRecord(RunParametersRecord& rhs); 00084 00088 RunParametersRecord& operator=(RunParametersRecord& rhs); 00089 00093 void setRunNumber(const unsigned int runNumber); 00094 00098 void setRecordEnabled(const bool recordEnabled); 00099 00103 void setTriggerType(const unsigned int triggerType); 00104 00108 void setDetectorMask(const unsigned int detectorMask); 00109 }; 00110 00111 } 00112 00113 #endif // FILEREADOUTFORMAT_RUNPARAMETERSRECORD_H