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

In This Package:

CbltTraits.h
Go to the documentation of this file.
00001 #ifndef CBLTREADOUTFORMAT_CBLTTRAITS_H
00002 #define CBLTREADOUTFORMAT_CBLTTRAITS_H
00003 
00004 /*
00005  *  CbltTraits.h
00006  *  CbltReadoutFormat
00007  *
00008  *  Created by Simon Patton on 7/21/10.
00009  *  Copyright 2010 DayaBay Collaboration. All rights reserved.
00010  *
00011  */
00012 
00013 #include "DaqReadoutFormat/DaqTraits.h"
00014 
00015 namespace DybDaq {
00016     
00017     class CbltTraits : public DaqTraits {
00018         
00019     public:
00020         
00024         static const unsigned int kHead;
00025         
00029         static const unsigned int kBody;
00030         
00034         static const unsigned int kFoot;
00035         
00039         static const unsigned int kHeadModuleAddress;
00040         
00044         static const unsigned int kHeadModuleType;
00045         
00049         static const unsigned int kFootModuleAddress;
00050         
00054         static const unsigned int kFootDataLength;
00055         
00059         static const unsigned int kMajorVersion;
00060         
00064         static const unsigned int kMinorVersion;
00065         
00066         // Enumeration of supported modules.
00067         
00071         static const unsigned int kFeeModule;
00072         
00076         static const unsigned int kFadcModule;
00077         
00081         static const unsigned int kLtbModule;
00082         
00086         static const unsigned int kRpcRomModule;
00087         
00091         static const unsigned int kRpcRtmModule;
00092         
00096         static const unsigned int kMtbModule;
00097         
00101         static const CbltTraits& defaultTraits();
00102         
00106         static const CbltTraits* readTraits(const char*& buffer);
00107         
00111         virtual ~CbltTraits();
00112         
00116         virtual unsigned int illegalMarker() const;
00117         
00121         virtual unsigned int illegalField() const;
00122         
00126         virtual unsigned int moduleType(unsigned int module) const;
00127         
00131         virtual const char* moduleTypeAsString(unsigned int moduleType) const;
00132         
00136         virtual unsigned int headSize() const = 0;
00137         
00141         virtual unsigned int footSize() const = 0;
00142         
00146         virtual void initializeHead(char* buffer) const = 0;
00147         
00151         virtual void initializeFoot(char* buffer) const = 0;
00152         
00153     protected:
00154         
00158         CbltTraits();
00159         
00163         virtual unsigned int maxModuleType() const = 0;
00164         
00168         virtual const unsigned int* moduleTypes() const = 0;
00169         
00173         virtual const char** moduleTypeStrings() const = 0;
00174         
00175     private:
00176         
00180         CbltTraits(CbltTraits& rhs);
00181         
00185         CbltTraits& operator=(CbltTraits& rhs);
00186         
00187     };
00188     
00189 }
00190 
00191 #endif // CBLTREADOUTFORMAT_CBLTTRAITS_H
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:53:11 for CbltReadoutFormat by doxygen 1.7.4