4 #include "EEfeeDataBlock.h"
5 #include "EEfeeRawEvent.h"
7 #include "EEfeeRawEvent.h"
17 block=
new TClonesArray(
"EEfeeDataBlock",10);
26 EEfeeRawEvent :: ~EEfeeRawEvent() {
35 void EEfeeRawEvent :: clear(){
45 void EEfeeRawEvent :: print(
int flag)
const{
46 printf(
"\nEEfeeRawEvent ID=%d with DataBlock entered=%d of %d\n",
47 ID,block->GetEntries(),block->GetSize());
50 for(i=0;i<block->GetEntries();i++) {
69 TClonesArray &Block=*block;
70 int nB=Block.GetEntries();
81 int EEfeeRawEvent::getNGoodBlock() {
84 for(ic=0;ic<block->GetEntries();ic++) {
86 if(!b->isValid())
continue;
99 int EEfeeRawEvent::maskWrongCrates(
long timeStamp,
unsigned headToken, HeadVer headVersion) {
107 if(timeStamp< 1068744930) {
108 printf(
" maskWrongCrates() not implemented for time stamp : %ld / %s",timeStamp,ctime((
const time_t *)& timeStamp));
113 int listA[]={1,2,3,4,5,6};
114 int listB[]={1,2,3,4,5,6,84,85,86};
115 int listC[]={1,2,3,4,5,6,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,
116 18,17,16,30,29,28,27,26,25,24,23,22,21,20,19,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
118 int listD[]={1,2,3,4,5,6,100,101,102,103,1,2,3,4,1,2,3,4,1,2,3,4};
122 if (timeStamp< 1068761131)
123 { list=listA; dim=
sizeof(listA)/
sizeof(
int); }
124 else if (timeStamp< 1070474417 )
125 { list=listB; dim=
sizeof(listB)/
sizeof(
int); }
126 else if (timeStamp< 1093360000 )
127 { list=listC; dim=
sizeof(listC)/
sizeof(
int); }
129 { list=listD; dim=
sizeof(listD)/
sizeof(
int); }
135 for(ic=0;ic<block->GetEntries();ic++) {
157 switch (headVersion) {
159 sick =b->isHeadValid(headToken,list[ic],lenCount,trigCommand,errFlag);
162 sick=b->isHeadValid(headToken,list[ic],errFlag,lenCount,trigCommand);
166 if(ic<6) errFlag=4;
else errFlag=9;
167 sick=b->isHeadValid(headToken,list[ic],trigCommand,errFlag,lenCount);
188 void EEfeeRawEvent :: maskBEMC(){
191 for(
int ic=22;ic<block->GetEntries();ic++) {
202 UShort_t EEfeeRawEvent::getValue(
int crateID,
int channel)
const {
204 for(i=0;i<block->GetEntries();i++) {
206 if( crateID!=b->getCrateID())
continue;
207 int nd=b->getValidDataLen();
210 UShort_t*
data=b->getData();
211 return data[channel];