00001 #ifndef L2PEDRESULTS2012_H 00002 #define L2PEDRESULTS2012_H 00003 00004 /********************************************************************* 00005 * $Id: L2pedResults2012.h,v 1.1 2011/10/18 15:11:44 jml Exp $ 00006 * \author Jan Balewski, IUCF, 2006 00007 ********************************************************************* 00008 * Descripion: 00009 * Output container for pedestal algo in L2 00010 * stored in the trigger data 00011 ********************************************************************* 00012 */ 00013 00014 00015 struct L2pedOutInt0 { // 4 bytes 00016 unsigned char decision; /* meaning of bits: 00017 0-2 :free 00018 3,4 : seenBtow, seenEtow data block 00019 5: free 00020 6: pedSubtraction ON/OFF 00021 7: free 00022 */ 00023 unsigned char free; 00024 unsigned short kTick; /* CPU ticks used for this event in kTicks, 00025 2^32-1=overflow, */ 00026 }; 00027 00028 00029 struct L2pedResults2012 { // all output bits lump together 00030 enum{mySizeChar=4}; 00031 struct L2pedOutInt0 int0; 00032 }; 00033 00034 //--------------- 00035 #define GET_OB(x,n) ( (x & 1 << n)!=0) // get one bit 00036 //--------------- 00037 inline void L2pedResults2012_print(struct L2pedResults2012 *p) { 00038 if(p==0) {printf("print L2pedResults2012() - NULL pointer ????\n"); return;} 00039 unsigned int x=p->int0.decision; 00040 printf("L2pedResults2012(): bemcIn=%d eemcIn=%d , pedSubtr=%d \n", GET_OB(x,3), GET_OB(x,4), GET_OB(x,6)); 00041 printf(" used CPU kTicks=%d \n", p->int0.kTick); 00042 00043 }; 00044 #undef GET_OB 00045 #endif 00046 /********************************************************************** 00047 $Log: L2pedResults2012.h,v $ 00048 Revision 1.1 2011/10/18 15:11:44 jml 00049 adding 2012 algorithms 00050 00051 Revision 1.1 2010/04/17 17:14:37 pibero 00052 *** empty log message *** 00053 00054 Revision 1.2 2008/01/17 01:57:33 kocolosk 00055 inline printing functions 00056 00057 Revision 1.1 2007/10/11 00:33:25 balewski 00058 L2algo added 00059 00060 Revision 1.7 2006/03/28 19:46:51 balewski 00061 ver16b, in l2new 00062 00063 Revision 1.6 2006/03/11 17:08:35 balewski 00064 now CVS comments should work 00065 00066 */ 00067
1.5.9