/* * VetrocWordInterface.hh * * Created on: Nov 7, 2017 * Author: Hovanes Egiyan */ #ifndef VETROCAPP_SRC_VETROCWORDINTERFACE_HH_ #define VETROCAPP_SRC_VETROCWORDINTERFACE_HH_ #include #include #include #include #include #include #include #include #include "boost148/boost/assign.hpp" class VetrocWordInterface { public: enum dataType { BlockHeaderType = 0, BlockTrailerType, EventHeaderType, TriggerTimeType, TDCHitType = 8, Profiler2DType, Profiler1DType, EmptyModuleType = 14, FillerWordType = 15, UndefinedType }; protected: static std::map dataTypeNames; public: VetrocWordInterface() { } virtual ~VetrocWordInterface() { } static std::map& getDataTypeName() { return dataTypeNames; } static std::string getDataTypeName( const dataType type ) { if ( dataTypeNames.count( type ) > 0 ) { return dataTypeNames[type]; } else { return ""; } } virtual dataType getType() const { return UndefinedType; } virtual dataType getTypeFromBits() const { return UndefinedType; } virtual unsigned long getBlockNumber() const { return 0; } virtual unsigned long getBlockSize() const { return 0; } virtual unsigned long getEventNumber() const { return 5; } virtual uint32_t getScalerCounts() const { return 0; } virtual uint32_t getBinID() const { return 0; } virtual uint32_t getBinX() const { return 0; } virtual uint32_t getBinY() const { return 0; } virtual uint32_t getTriggerTime() const { return 0; } virtual bool isAcceidental() const { return false; } virtual bool isDataTypeDefinition() const { return false; } virtual bool isDataTypeDefinitionFromBits() const = 0; }; #endif /* VETROCAPP_SRC_VETROCWORDINTERFACE_HH_ */