CMS 3D CMS Logo

RPCAMCLinkEvent.h
Go to the documentation of this file.
1 #ifndef EventFilter_RPCRawToDigi_RPCAMCLinkEvent_h
2 #define EventFilter_RPCRawToDigi_RPCAMCLinkEvent_h
3 
5 {
6 public:
7  static unsigned int const group_mask_ = 0x7000;
8  static unsigned int const level_mask_ = 0x0700;
9  static unsigned int const event_mask_ = 0x00ff;
10 
11  static unsigned int const not_set_ = 0x0000;
12 
13  static unsigned int const fed_ = 0x1000;
14  static unsigned int const amc_ = 0x2000;
15  static unsigned int const input_ = 0x3000;
16 
17  static unsigned int const debug_ = 0x0100;
18  static unsigned int const info_ = 0x0200;
19  static unsigned int const warn_ = 0x0300;
20  static unsigned int const error_ = 0x0400;
21  static unsigned int const fatal_ = 0x0500;
22 
23 public:
24  static unsigned int getGroup(unsigned int id);
25  static unsigned int getLevel(unsigned int id);
26  static unsigned int getEvent(unsigned int id);
27 
28  static unsigned int getId(unsigned int event, unsigned int group = not_set_, unsigned int level = not_set_);
29 };
30 
31 inline unsigned int RPCAMCLinkEvent::getGroup(unsigned int id)
32 {
33  return (id & group_mask_);
34 }
35 
36 inline unsigned int RPCAMCLinkEvent::getLevel(unsigned int id)
37 {
38  return (id & level_mask_);
39 }
40 
41 inline unsigned int RPCAMCLinkEvent::getEvent(unsigned int id)
42 {
43  return (id & event_mask_);
44 }
45 
46 inline unsigned int RPCAMCLinkEvent::getId(unsigned int event, unsigned int group, unsigned int level)
47 {
48  return ((event & event_mask_) | (group & group_mask_) | (level & level_mask_));
49 }
50 
51 #endif // EventFilter_RPCRawToDigi_RPCAMCLinkEvent_h
static unsigned int const group_mask_
static unsigned int getId(unsigned int event, unsigned int group=not_set_, unsigned int level=not_set_)
static unsigned int const amc_
static unsigned int const warn_
static unsigned int const event_mask_
static unsigned int const not_set_
static unsigned int const error_
static unsigned int const debug_
static unsigned int const fatal_
static unsigned int const input_
static unsigned int const level_mask_
static unsigned int getEvent(unsigned int id)
static unsigned int getLevel(unsigned int id)
static unsigned int const fed_
static unsigned int getGroup(unsigned int id)
static unsigned int const info_
Definition: event.py:1