StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
L2pedResults2012.h
1 #ifndef L2PEDRESULTS2012_H
2 #define L2PEDRESULTS2012_H
3 
4 /*********************************************************************
5  * $Id: L2pedResults2012.h,v 1.1 2011/10/18 15:11:44 jml 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 L2pedResults2012 { // all output bits lump together
30  enum{mySizeChar=4};
31  struct L2pedOutInt0 int0;
32 };
33 
34 //---------------
35 #define GET_OB(x,n) ( (x & 1 << n)!=0) // get one bit
36 //---------------
37 inline void L2pedResults2012_print(struct L2pedResults2012 *p) {
38  if(p==0) {printf("print L2pedResults2012() - NULL pointer ????\n"); return;}
39  unsigned int x=p->int0.decision;
40  printf("L2pedResults2012(): bemcIn=%d eemcIn=%d , pedSubtr=%d \n", GET_OB(x,3), GET_OB(x,4), GET_OB(x,6));
41  printf(" used CPU kTicks=%d \n", p->int0.kTick);
42 
43 };
44 #undef GET_OB
45 #endif
46 /**********************************************************************
47  $Log: L2pedResults2012.h,v $
48  Revision 1.1 2011/10/18 15:11:44 jml
49  adding 2012 algorithms
50 
51  Revision 1.1 2010/04/17 17:14:37 pibero
52  *** empty log message ***
53 
54  Revision 1.2 2008/01/17 01:57:33 kocolosk
55  inline printing functions
56 
57  Revision 1.1 2007/10/11 00:33:25 balewski
58  L2algo added
59 
60  Revision 1.7 2006/03/28 19:46:51 balewski
61  ver16b, in l2new
62 
63  Revision 1.6 2006/03/11 17:08:35 balewski
64  now CVS comments should work
65 
66 */
67