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

In This Package:

FadcTraits.h
Go to the documentation of this file.
00001 #ifndef FADCREADOUTFORMAT_FADCTRAITS_H
00002 #define FADCREADOUTFORMAT_FADCTRAITS_H
00003 
00004 /*
00005  *  FadcTraits.h
00006  *  FadcReadoutFormat
00007  *
00008  *  Created by Simon Patton on 9/2/10.
00009  *  Copyright 2010 DayaBay Collaboration. All rights reserved.
00010  *
00011  */
00012 
00013 #include "DaqReadoutFormat/DaqTraits.h"
00014 
00015 namespace DybDaq {
00016     
00017     class FadcTraits : public DaqTraits {
00018         
00019     public:
00020         
00024         static const unsigned int kHead;
00025         
00029         static const unsigned int kData;
00030         
00034         static const unsigned int kFoot;
00035         
00039         static const unsigned int kHeadTriggerNumber;
00040         
00041         // FadcHead
00042         
00046         static const unsigned int kMajorVersion;
00047         
00051         static const unsigned int kMinorVersion;
00052         
00056         static const unsigned int kTriggerType;
00057         
00061         static const unsigned int kNoData;
00062 
00063         // Improvements to 1.2
00064         
00068         static const unsigned int kHeadMarker;
00069         
00073         static const unsigned int kAdcDataMarker;
00074         
00078         static const unsigned int kFootMarker;
00079         
00080         // Added in 1.5
00081 
00085         static const unsigned int kProtectionStatus;
00086         
00090         static const unsigned int kScaleEnabled;
00091         
00095         static const unsigned int kDuringPrevious;
00096         
00097         // For FadcData
00098         
00102         static const unsigned int kChannelId;
00103         
00107         static const unsigned int kHighDataByte;
00108         
00112         static const unsigned int kMiddleDataByte;
00113         
00117         static const unsigned int kLowDataByte;
00118 
00119         // Added in FadcData to support v2
00120 
00124         static const unsigned int kChannelHeadMarker;
00125 
00129         static const unsigned int kChannelHeadCheck;
00130 
00134         static const unsigned int kChannelFootMarker;
00135 
00139         static const unsigned int kChannelFootCheck;
00140 
00144         static const unsigned int kSample1;
00145 
00149         static const unsigned int kSample2;
00150 
00154         static const unsigned int kSample3;
00155 
00159         static const unsigned int kSample4;
00160 
00161         // FadcFoot
00162         
00166         static const unsigned int kFootTriggerNumber;
00167         
00171         static const unsigned int kFootDataLength;
00172         
00176         static const FadcTraits& defaultTraits();
00177         
00181         static const FadcTraits* readTraits(const char*& buffer);
00182         
00186         virtual ~FadcTraits();
00187         
00191         virtual unsigned int illegalMarker() const;
00192         
00196         virtual unsigned int illegalField() const;
00197         
00201         virtual unsigned int triggerTypeEnd() const = 0;
00202         
00206         virtual const char* triggerTypeAsString(unsigned int triggerType) const;
00207         
00211         virtual unsigned int headSize() const = 0;
00212         
00216         virtual unsigned int dataSize() const = 0;
00217         
00221         virtual unsigned int footSize() const = 0;
00222         
00226         virtual void initializeHead(char* buffer) const = 0;
00227         
00231         virtual void initializeData(char* buffer) const = 0;
00232         
00236         virtual void initializeFoot(char* buffer) const = 0;
00237         
00238     protected:
00239         
00243         FadcTraits();
00244         
00248         virtual const char** triggerTypeStrings() const = 0;
00249         
00250     private:
00251         
00255         FadcTraits(FadcTraits& rhs);
00256         
00260         FadcTraits& operator=(FadcTraits& rhs);
00261         
00262     };
00263     
00264 }
00265 
00266 #endif // FADCREADOUTFORMAT_FADCTRAITS_H
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:52:58 for FadcReadoutFormat by doxygen 1.7.4