32 unsigned long long timebits, coarse_timestamp, fine_timestamp;
33 unsigned int word1, word2;
61 word2 = (
unsigned int) SubeventData[2*i];
62 fine_timestamp = (word2 >> 2) & 0x3f;
64 if (fine_timestamp <= 32)
67 word1 = (
unsigned int) SubeventData[2*i+1];
68 clockID = (word1 >> 30) & 0
x3;
70 p[
k] = (word1 >> 26) & 0xf;
71 if ( p[k] ==3) p[
k]=2;
72 else if ( p[k] ==2) p[
k]=3;
76 timebits = (word1 >> 18) & 0x7;
77 coarse_timestamp = timebits << 36;
78 timebits = (word1 & 0xfffc) >> 2;
79 coarse_timestamp += timebits << 22;
80 timebits = (word2 >> 18);
81 coarse_timestamp += timebits << 8;
82 coarse_timestamp += (word2 >> 8) & 0xff;
83 d_time[
k] = (coarse_timestamp - clockID)*18 - (fine_timestamp);
115 if ( strcmp(what,
"SAMPLES") == 0 )
120 if ( strcmp(what,
"BLOCKID") == 0 )
122 if ( ich < 0 || ich >=
samples)
return 0;
126 if ( strcmp(what,
"CRYSTALID") == 0 )
128 if ( ich < 0 || ich >=
samples)
return 0;
141 if ( ich < 0 || ich >=
samples)
return 0;
150 if ( ich < 0 || ich >=
samples)
return 0;
159 int is =
iValue(0,
"SAMPLES");
163 os <<
" sample B id C id time ( " << is <<
" Samples )" << std::endl;
165 for ( i = 0; i < is ; i++)
167 int prec = os.precision();
169 os << std::setw(5) << i <<
" | ";
171 os << std::setw(4) <<
iValue(i,
"BLOCKID") <<
" ";
172 os << std::setw(4) <<
iValue(i,
"CRYSTALID") <<
" ";
175 os << std::setw(24) << std::setprecision(24) <<
dValue(i)
176 << std::setprecision(prec) ;