Subversion Repositories f9daq

Compare Revisions

Ignore whitespace Rev 109 → Rev 110

/praktikum/lc2277/README
0,0 → 1,7
1. pozeni v terminalu z
f9daq@f9labnb01:~/lc2277$ mioni.sh
2. analiza podatkov oziroma ponovno histogramiranje v root
root [0] .x read.C("datoteka.dat")
3. izpis histograma v txt obliki
for (int i=0;i<128;i++) printf("%d %d\n", ch2->GetBinCenter(i+1), ch2->GetBinContent(i+1));
 
/praktikum/lc2277/daqusb.C
304,6 → 304,10
int nb=d->event(data,BSIZE);
//tmulk();
// zapis v datoteko
if (nb<0){
ieve--;
continue;
}
hdr[1]=nb+4*sizeof(int);
hdr[2]=time(NULL);
hdr[3]=ieve;
317,10 → 321,14
events = data[0];
evsize = data[ib++]&0xffff;
if (ieve %100 == 0) printf("nb=%d Event:%d events=%d EvSize:%d\n",nb, ieve, events, evsize);
if (evsize<2) {
ieve--;
continue;
}
for (int i=0;i<evsize;i++) {
//if (debug) printf("%d\t%08x\n", ib, data[ib]);
if (data[ib]== END_MARKER) break;
if (i%2==0) {
if (ib%2==0) {
unsigned short word1 =data[ib ]&0xFFFF;
unsigned short word2 =data[ib+1]&0xFFFF;
unsigned short tdc = word1;