StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
EztTrigBlob.cxx
1 /*********************************************************************
2  * $Id: EztTrigBlob.cxx,v 1.2 2004/11/29 15:55:07 mvl Exp $
3  *********************************************************************
4  * container for FULL STAR trigger data, requires Akio's calss to unpack it
5  */
6 
7 #include <TArrayC.h>
8 #include <TObjArray.h>
9 
10 #include "EztTrigBlob.h"
11 ClassImp(EztTrigBlob)
12 
13 
14 //--------------------------------------------------
15 //
16 //--------------------------------------------------
18  trgd=new TArrayC ;
19  trgid=new TArrayC ;
20  clear();
21 }
22 
23 //--------------------------------------------------
24 //
25 //--------------------------------------------------
26 EztTrigBlob :: ~EztTrigBlob() {
27  delete trgd;
28  delete trgid;
29 }
30 
31 
32 //--------------------------------------------------
33 //
34 //--------------------------------------------------
35 void EztTrigBlob :: clear() {
36  trgd->Reset();
37  trgid->Reset();
38  version=0;
39 }
40 
41 
42 //--------------------------------------------------
43 //--------------------------------------------------
44 void EztTrigBlob :: print(int k, FILE *fd) const{
45  fprintf(fd,"EztTrigBlob::print() c-struct version=%d",version);
46  fprintf(fd," size of banks: trgd=%d trgid=%d\n",trgd->GetSize(),trgid->GetSize());
47  if(k<=0) return;
48  Char_t *d0=trgd->GetArray();
49  unsigned char *d=(unsigned char *)d0;
50  printf("Hex Dump of trgd\n");
51  int i;
52  for(i=0;i<trgd->GetSize();i++) {
53  if((i%8)==0) printf(" ");
54  if((i%24)==0) printf("\n");
55  printf("%02x ",d[i]);
56  }
57 
58 }
59 
60