1 #include "DAQDataFormats/RawConfigurationNameV0.h" 2 #include "DAQDataFormats/BitFields.h" 3 #include <boost/format.hpp> 13 #include "DAQDataFormats/DataFormatFirst.inc" 14 #define CURRENT_CLASS RawConfigurationName 15 #define CURRENT_CLASS_VERSION 0 16 #define CURRENT_FIELDS_SUB_NAMESPACE rawconfname 17 #include "DAQDataFormats/DataFormatLast.inc" 72 const uint32_t
size = (name.size() - 1) / 4 + 1;
84 if(_shouldBufferBeInternal){
85 resizeInternalBuffer(total_block_size);
86 checkBufferInternalness();
93 for(uint32_t iword = 0; iword <
size ; ++iword){
94 for(uint32_t ichar_in_word = 0; ichar_in_word < 4; ++ichar_in_word){
99 if(ichar < name.size())
100 letter = name[ichar];
103 switch(ichar_in_word){
117 bool RawConfigurationName::setChar1(
const uint32_t letter,
const uint32_t word_number){
122 bool RawConfigurationName::setChar2(
const uint32_t letter,
const uint32_t word_number){
127 bool RawConfigurationName::setChar3(
const uint32_t letter,
const uint32_t word_number){
132 bool RawConfigurationName::setChar4(
const uint32_t letter,
const uint32_t word_number){
140 uint32_t RawConfigurationName::getName(
std::string& name)
const{
147 for(uint32_t iword = 0 ; iword < size_of_data ; ++iword){
148 for(uint32_t ichar_in_word = 0 ; ichar_in_word < 4 ; ++ichar_in_word){
150 uint32_t current_char = 0;
152 if (ichar_in_word == 0 )
154 else if (ichar_in_word == 1 )
156 else if (ichar_in_word == 2 )
158 else if (ichar_in_word == 3 )
162 name += (char)current_char;
171 uint32_t RawConfigurationName::getChar1(
const uint32_t word_number)
const {
176 uint32_t RawConfigurationName::getChar2(
const uint32_t word_number)
const {
181 uint32_t RawConfigurationName::getChar3(
const uint32_t word_number)
const {
186 uint32_t RawConfigurationName::getChar4(
const uint32_t word_number)
const {
196 os<<
boost::format(
"\n---RawConfigurationName----------------------------------------------------size=%u\n") %
sizeofdata();
198 printBuffer(os,
true,
true,
false,
false,
false,
"\n",1);
202 os<<
"Name = \""<<name<<
"\"\n";
214 _Buffer = (
void*)pointer;
215 _shouldBufferBeInternal = isInternalBuffer();
229 void* buffer_new = readDataGeneral(buffer, header_size, 0);
235 buffer_new = readDataGeneral(buffer_new,
sizeofdata() - header_size, header_size);
237 checkBufferInternalness();
#define EXECUTE_FUNCTION(FULLFUNCTIONNAME)
Execute and return the delegate.
#define DEEPCOPY_GET_AND_SET(FUNC)
#define VERSION_NAMESPACE
#define ZEROOUT_GET(FUNC)
#define DEEPCOPY_GET(FUNC)
::xsd::cxx::tree::buffer< char > buffer
#define ZEROOUT_GET_AND_SET(FUNC)
#define RETURN_FUNCTION(FULLFUNCTIONNAME)
#define BITFIELDGET(block, mask, shift)
std::string format(const int32_t &value, const int &ndigits=8)
#define BITFIELDSET(block, data, mask, shift)
#define PRINT_ON_DEBUG(x)