#include "BeamData.h"#include <OnlineUtil/rawBlockIds.h>#include <OnlineUtil/rdChecksum.h>#include <OnlineUtil/rototalk.h>#include <OnlineUtil/rawBeamDataBlockLayout.h>#include <map>#include <string>#include <vector>#include <cassert>#include <iostream>#include <cstdio>#include <unistd.h>Go to the source code of this file.
Classes | |
| struct | Header |
| struct | HeaderBlock |
| class | BeamDataImp |
| struct | BeamDataImp::DeviceData |
Functions | |
| int | make_block_id (int majorid, int minorid=0) |
| string | secnsec2filename (int sec, int nsec) |
|
||||||||||||
|
Definition at line 28 of file BeamData.cc. Referenced by BeamDataImp::create_block(). 00029 {
00030 int cfns=(1<<1) + (1<<0);
00031 int csf = 0;
00032 return (csf << 28) + (cfns<<24) + (majorid<<8) + (minorid<<0);
00033 }
|
|
||||||||||||
|
Definition at line 184 of file BeamData.cc. Referenced by BeamData::open_file(). 00185 {
00186 const int nspersec = 1000000000;
00187 while (nsec<0) {
00188 nsec += nspersec;
00189 sec -= 1;
00190 }
00191 while (nsec >= nspersec) {
00192 nsec -= nspersec;
00193 sec -= 1;
00194 }
00195
00196 time_t atime = sec;
00197 struct tm *ptm = gmtime(&atime);
00198 int dat = (1900+ptm->tm_year)*10000+(1+ptm->tm_mon)*100+ptm->tm_mday;
00199 if (dat>19700000) dat %= 1000000;
00200 int tim = ptm->tm_hour*10000 + ptm->tm_min*100 + ptm->tm_sec;
00201
00202 char buf[80];
00203 snprintf(buf,80,"B%6.6d_%6.6d.mbeam.root",dat,tim);
00204 string fname = buf;
00205 return fname;
00206 }
|
1.3.9.1