StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StChargedPionBaseEv.cxx
1 // $Id: StChargedPionBaseEv.cxx,v 1.2 2010/09/02 02:46:34 perev Exp $
2 
3 #include "StChargedPionBaseEv.h"
4 
5 #include <utility>
6 using std::make_pair;
7 
8 ClassImp(StChargedPionBaseEv)
9 
10 // static member initialization
11 static std::pair<unsigned int, unsigned int> a[] = {
12  make_pair( 96011, 0x00000001),
13  make_pair( 96201, 0x00000002),
14  make_pair( 96211, 0x00000004),
15  make_pair( 96221, 0x00000008),
16  make_pair( 96233, 0x00000010),
17  make_pair(117001, 0x00000020),
18  make_pair(137213, 0x00000040),
19  make_pair(137221, 0x00000080),
20  make_pair(137222, 0x00000100),
21  make_pair(137585, 0x00000200),
22  make_pair(137611, 0x00000400),
23  make_pair(137622, 0x00000800),
24  make_pair(106011, 0x00001000),
25  make_pair(106201, 0x00002000),
26  make_pair(106211, 0x00004000),
27  make_pair(106221, 0x00008000),
28  make_pair(106233, 0x00010000),
29  make_pair(117402, 0x00020000),
30  make_pair(117211, 0x00040000),
31  make_pair(117212, 0x00080000),
32  make_pair(137262, 0x00100000),
33  make_pair(137271, 0x00200000),
34  make_pair(137272, 0x00400000),
35  make_pair(137273, 0x00800000),
36  make_pair(137641, 0x01000000),
37  make_pair(137652, 0x02000000),
38  // reuse some bits for transverse and first longitudinal running
39  make_pair(127212, 0x00080000),
40  make_pair(127213, 0x00000040),
41  make_pair(117221, 0x00000080),
42  make_pair(127221, 0x00000080),
43  make_pair(117585, 0x00000200),
44  make_pair(127585, 0x00000200),
45  make_pair(117611, 0x00000400),
46  make_pair(127611, 0x00000400),
47  make_pair(117622, 0x00000800),
48  make_pair(127622, 0x00000800),
49  make_pair(117262, 0x00100000),
50  make_pair(127262, 0x00100000),
51  make_pair(117271, 0x00200000),
52  make_pair(127271, 0x00200000),
53  make_pair(117641, 0x01000000),
54  make_pair(127641, 0x01000000),
55  make_pair(117652, 0x02000000),
56  make_pair(127652, 0x02000000)
57 };
58 
59 map<unsigned int, unsigned int>
60 StChargedPionBaseEv::mTriggerLookup(a, a + sizeof(a)/sizeof(a[0]) );
61 
62 unsigned int StChargedPionBaseEv::triggerBit(unsigned int trigId) {
63  map<unsigned int, unsigned int>::const_iterator it = mTriggerLookup.find(trigId);
64  if(it==mTriggerLookup.end()) return 0;
65  return it->second;
66 }
67 
68 /*****************************************************************************
69  * $Log: StChargedPionBaseEv.cxx,v $
70  * Revision 1.2 2010/09/02 02:46:34 perev
71  * Move variable a[] to static to avoid clash, bug #1993
72  *
73  * Revision 1.1 2008/07/17 17:06:29 kocolosk
74  * big-bang integration StChargedPionMcEvent framework
75  *
76  *****************************************************************************/