StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
L2pedResults2006.h
1 #ifndef L2PEDRESULTS2006_H
2 #define L2PEDRESULTS2006_H
3 
4 /*********************************************************************
5  * $Id: L2pedResults2006.h,v 1.2 2008/01/17 01:57:33 kocolosk Exp $
6  * \author Jan Balewski, IUCF, 2006
7  *********************************************************************
8  * Descripion:
9  * Output container for pedestal algo in L2
10  * stored in the trigger data
11  *********************************************************************
12  */
13 
14 
15 struct L2pedOutInt0 { // 4 bytes
16  unsigned char decision; /* meaning of bits:
17  0-2 :free
18  3,4 : seenBtow, seenEtow data block
19  5: free
20  6: pedSubtraction ON/OFF
21  7: free
22  */
23  unsigned char free;
24  unsigned short kTick; /* CPU ticks used for this event in kTicks,
25  2^32-1=overflow, */
26 };
27 
28 
29 struct L2pedResults2006 { // all output bits lump together
30  struct L2pedOutInt0 int0;
31 };
32 
33 //---------------
34 #define GET_OB(x,n) ( (x & 1 << n)!=0) // get one bit
35 //---------------
36 inline void L2pedResults2006_print(struct L2pedResults2006 *p) {
37  if(p==0) {printf("print L2pedResults2006() - NULL pointer ????\n"); return;}
38  unsigned int x=p->int0.decision;
39  printf("L2pedResults2006(): bemcIn=%d eemcIn=%d , pedSubtr=%d \n", GET_OB(x,3), GET_OB(x,4), GET_OB(x,6));
40  printf(" used CPU kTicks=%d \n", p->int0.kTick);
41 
42 };
43 #undef GET_OB
44 #endif
45 /**********************************************************************
46  $Log: L2pedResults2006.h,v $
47  Revision 1.2 2008/01/17 01:57:33 kocolosk
48  inline printing functions
49 
50  Revision 1.1 2007/10/11 00:33:25 balewski
51  L2algo added
52 
53  Revision 1.7 2006/03/28 19:46:51 balewski
54  ver16b, in l2new
55 
56  Revision 1.6 2006/03/11 17:08:35 balewski
57  now CVS comments should work
58 
59 */
60