1#include "Identifier/HltID.h"
11 const int nemc,
const int nmuc ) {
12 uint32_t subid =
id & ( HltID::DETECTOR_MASK | HltID::ID_SUB_MASK );
40 if ( id_in_sub > ID_HLT_MAX )
return false;
43 if ( id_in_sub > ID_MDC_MAX )
return false;
46 if ( id_in_sub > ID_TOF_MAX )
return false;
49 if ( id_in_sub > ID_EMC_MAX )
return false;
52 if ( id_in_sub > ID_MUC_MAX )
return false;
54 case CON:
return true;
break;
55 default:
return false;
break;
63 unsigned int pos = (
id.get_value() & HltID::DETECTOR_MASK ) >> HltID::DETECTOR_INDEX;
64 return ( pos ==
HLT ) ? true :
false;
68 unsigned int pos = (
id.get_value() & HltID::DETECTOR_MASK ) >> HltID::DETECTOR_INDEX;
69 unsigned int no = (
id.get_value() & HltID::ID_SUB_MASK ) >> HltID::ID_SUB_INDEX;
70 return ( ( pos ==
HLT ) && ( no ==
EVENTTYPE ) ) ? true :
false;
74 unsigned int pos = (
id.get_value() & HltID::DETECTOR_MASK ) >> HltID::DETECTOR_INDEX;
75 unsigned int no = (
id.get_value() & HltID::ID_SUB_MASK ) >> HltID::ID_SUB_INDEX;
76 return ( ( pos ==
HLT ) && ( no ==
ALGORITHM ) ) ? true :
false;
80 unsigned int pos = (
id.get_value() & HltID::DETECTOR_MASK ) >> HltID::DETECTOR_INDEX;
81 unsigned int no = (
id.get_value() & HltID::ID_SUB_MASK ) >> HltID::ID_SUB_INDEX;
82 return ( ( pos ==
HLT ) && ( no ==
CRITERIA ) ) ? true :
false;
86 unsigned int pos = (
id.get_value() & HltID::DETECTOR_MASK ) >> HltID::DETECTOR_INDEX;
87 unsigned int no = (
id.get_value() & HltID::ID_SUB_MASK ) >> HltID::ID_SUB_INDEX;
88 return ( ( pos ==
HLT ) && ( no ==
VERSION ) ) ? true :
false;
92 unsigned int pos = (
id.get_value() & HltID::DETECTOR_MASK ) >> HltID::DETECTOR_INDEX;
93 unsigned int no = (
id.get_value() & HltID::ID_SUB_MASK ) >> HltID::ID_SUB_INDEX;
94 return ( ( pos ==
HLT ) && ( no ==
ENERGY ) ) ? true :
false;
98 unsigned int pos = (
id.get_value() & HltID::DETECTOR_MASK ) >> HltID::DETECTOR_INDEX;
99 unsigned int no = (
id.get_value() & HltID::ID_SUB_MASK ) >> HltID::ID_SUB_INDEX;
100 return ( ( pos ==
HLT ) && ( no ==
NUMSUB ) ) ? true :
false;
104 unsigned int pos = (
id.get_value() & HltID::DETECTOR_MASK ) >> HltID::DETECTOR_INDEX;
105 unsigned int no = (
id.get_value() & HltID::ID_SUB_MASK ) >> HltID::ID_SUB_INDEX;
106 return ( ( pos ==
CON ) && ( no ==
NUMCON ) ) ? true :
false;
110 unsigned int pos = (
id.get_value() & HltID::DETECTOR_MASK ) >> HltID::DETECTOR_INDEX;
111 return ( pos ==
MDC ) ? true :
false;
115 unsigned int pos = (
id.get_value() & HltID::DETECTOR_MASK ) >> HltID::DETECTOR_INDEX;
116 return ( pos ==
TOF ) ? true :
false;
120 unsigned int pos = (
id.get_value() & HltID::DETECTOR_MASK ) >> HltID::DETECTOR_INDEX;
121 return ( pos ==
EMC ) ? true :
false;
125 unsigned int pos = (
id.get_value() & HltID::DETECTOR_MASK ) >> HltID::DETECTOR_INDEX;
126 return ( pos ==
MUC ) ? true :
false;
130 unsigned int pos = (
id.get_value() & HltID::DETECTOR_MASK ) >> HltID::DETECTOR_INDEX;
131 return ( pos ==
CON ) ? true :
false;
136 return ( (
id.get_value() & HltID::DETECTOR_MASK ) >> HltID::DETECTOR_INDEX );
141 return (
id.get_value() & HltID::ID_SUB_MASK ) >> HltID::ID_SUB_INDEX;
147 else if (
is_mdc_inf(
id ) ) {
return ID_MDC_MAX; }
148 else if (
is_tof_inf(
id ) ) {
return ID_TOF_MAX; }
149 else if (
is_emc_inf(
id ) ) {
return ID_EMC_MAX; }
150 else if (
is_muc_inf(
id ) ) {
return ID_MUC_MAX; }
static const unsigned int HLT_ID
static const unsigned int HLT_INDEX
static bool is_ncon(const Identifier &id)
static bool is_tof_inf(const Identifier &id)
static unsigned int getID_HLT_MAX()
static bool is_version(const Identifier &id)
static bool is_con_inf(const Identifier &id)
static bool is_ef_result(const Identifier &id)
Test for data type.
static bool is_eventtype(const Identifier &id)
static Identifier data_type_id(const unsigned int detector, const unsigned int id_in_sub=0)
For a single data.
static Identifier convert(const unsigned int id, const int nmdc=0, const int ntof=0, const int nemc=0, const int nmuc=0)
convert global id to sub-id(Identifier)
static unsigned int detector(const Identifier &id)
Values of different levels (failure returns 0).
static bool is_algorithm(const Identifier &id)
static bool is_muc_inf(const Identifier &id)
static bool is_criteria(const Identifier &id)
static unsigned int getIntID(const unsigned int detector, const unsigned int id_in_sub=0)
static unsigned int id_sub_max(const Identifier &id)
static bool is_emc_inf(const Identifier &id)
static bool is_number(const Identifier &id)
static bool is_mdc_inf(const Identifier &id)
static unsigned int id_sub(const Identifier &id)
static bool values_ok(const unsigned int detector, const unsigned int id_in_sub=0)
static bool is_energy(const Identifier &id)