/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

EventTraits.h
Go to the documentation of this file.
00001 #ifndef EVENTREADOUTFORMAT_EVENTTRAITS_H
00002 #define EVENTREADOUTFORMAT_EVENTTRAITS_H
00003 
00004 /*
00005  *  EventTraits.h
00006  *  EventReadoutFormat
00007  *
00008  *  Created by Simon Patton on 7/19/10.
00009  *  Copyright 2010 DayaBay Collaboration. All rights reserved.
00010  *
00011  */
00012 
00013 #include "DaqReadoutFormat/DaqTraits.h"
00014 
00015 namespace DybDaq {
00016 
00017 class EventTraits : public DaqTraits {
00018 
00019 public:
00020 
00021     // Block constants.
00022 
00026     static const unsigned int kEventHeader;
00027 
00031     static const unsigned int kRomHeader;
00032 
00033     // For All Headers.
00034 
00038     static const unsigned int kMarker;
00039 
00040     // For Event Header.
00041 
00045     static const unsigned int kMajorVersion;
00046 
00050     static const unsigned int kMinorVersion;
00051 
00055     static const unsigned int kEventHeaderSize;
00056 
00060     static const unsigned int kEventTotalSize;
00061 
00065     static const unsigned int kEventSite;
00066 
00070     static const unsigned int kEventDetector;
00071 
00075     static const unsigned int kEventRun;
00076 
00080     static const unsigned int kEventNumber;
00081 
00085     static const unsigned int kEventDataType;
00086 
00090     static const unsigned int kCbltWrapping;
00091 
00095     static const unsigned int kRawCblt;
00096 
00100     static const unsigned int kLtbMismatch;
00101 
00105     static const unsigned int kInvalidData;
00106 
00107     // Added in 0.7
00108 
00112     static const unsigned int kRpcSortDisabled;
00113 
00117     static const unsigned int kDataSortTimeout;
00118 
00119     // For Rom Fragment.
00120 
00124     static const unsigned int kRomHeaderSize;
00125 
00129     static const unsigned int kRomTotalSize;
00130 
00134     static const unsigned int kRomSite;
00135 
00139     static const unsigned int kRomDetector;
00140 
00144     static const unsigned int kRomModuleType;
00145 
00149     static const unsigned int kRomSlot;
00150 
00151     // Enumeration of supported modules.
00152 
00156     static const unsigned int kFeeModule;
00157 
00161     static const unsigned int kFadcModule;
00162 
00166     static const unsigned int kLtbModule;
00167 
00171     static const unsigned int kRpcRomModule;
00172 
00176     static const unsigned int kRpcRtmModule;
00177 
00181     static const unsigned int kMtbModule;
00182 
00186     static const EventTraits& defaultTraits();
00187 
00191     static const EventTraits* readTraits(const char*& buffer);
00192 
00196     virtual ~EventTraits();
00197 
00201     virtual unsigned int illegalMarker() const;
00202 
00206     virtual unsigned int illegalField() const;
00207 
00211     virtual unsigned int headerSize(const unsigned int marker) const = 0;
00212 
00216     virtual void initializeHeader(const unsigned int marker,
00217                                   char* buffer) const = 0;
00218 
00222     const char* siteAsString(const unsigned int site) const;
00223 
00227     const char* detectorAsString(const unsigned int detector) const;
00228 
00232     const char* dataTypeAsString(const unsigned int dataType) const;
00233 
00237     unsigned int moduleType(const unsigned int module) const;
00238 
00242     const char* moduleTypeAsString(const unsigned int moduleType) const;
00243 
00244 protected:
00245 
00249     EventTraits();
00250 
00254     virtual unsigned int maxSite() const = 0;
00255 
00259     virtual const char** siteStrings() const = 0;
00260 
00264     virtual unsigned int maxDetector() const = 0;
00265 
00269     virtual const char** detectorStrings() const = 0;
00270 
00274     virtual unsigned int maxDataType() const = 0;
00275 
00279     virtual const char** dataTypeStrings() const = 0;
00280 
00284     virtual unsigned int maxModuleType() const = 0;
00285 
00289     virtual const unsigned int* moduleTypes() const = 0;
00290 
00294     virtual const char** moduleTypeStrings() const = 0;
00295 
00296 private:
00297 
00301     EventTraits(EventTraits& rhs);
00302 
00306     EventTraits& operator=(EventTraits& rhs);
00307 
00308 };
00309 
00310 }
00311 
00312 #endif // EVENTREADOUTFORMAT_EVENTTRAITS_H
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:53:15 for EventReadoutFormat by doxygen 1.7.4