7 #define MAX_HOSTNAME_LEN 25 12 std::vector<bool>& l1_bits,
14 uint32 adler_chksum,
const char* host_name):
15 buf_((
uint8*)buf),size_(size)
27 uint32 l1_count = l1_bits.size();
29 pos = pos +
sizeof(
uint32);
32 uint32 l1_sz = l1_bits.size();
33 if (l1_sz != 0) l1_sz = 1 + ((l1_sz-1)/8);
35 uint8* pos_end = pos + l1_sz;
36 memset(pos,0x00, pos_end-pos);
39 pos[
i/8] |= (v << (
i&0x07));
45 pos = pos +
sizeof(
uint32);
47 uint32 hlt_sz = hlt_bit_count;
48 if (hlt_sz != 0) hlt_sz = 1+ ((hlt_sz-1)/4);
51 pos =
std::copy(hlt_bits, hlt_bits+hlt_sz, pos);
55 pos = pos +
sizeof(
uint32);
63 assert(host_name_len < 0x00ff);
65 *pos++ = host_name_len;
68 uint32 real_len = strlen(host_name);
69 if(real_len < host_name_len) {
71 memset(hostname_2use,
'\0',host_name_len);
72 memcpy(hostname_2use,host_name,real_len);
73 memcpy(pos,hostname_2use,host_name_len);
75 memcpy(pos,host_name,host_name_len);
EventMsgBuilder(void *buf, uint32 size, uint32 run, uint64 event, uint32 lumi, uint32 outModId, uint32 droppedEventsCount, std::vector< bool > &l1_bits, uint8 *hlt_bits, uint32 hlt_bit_count, uint32 adler32_chksum, const char *host_name)
void setEventLength(uint32 len)
void setOrigDataSize(uint32)
def convert(infile, ofile)