CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
HltID.h
Go to the documentation of this file.
1#ifndef __HltID_h__
2#define __HltID_h__
3
5//#include <string>
6//#include <assert.h>
7
8class HltID : public BesDetectorID
9{
10 public:
13
14 /// constructor
15 HltID(void);
16
17 /// destructor
18 ~HltID(void);
19
24 enum TofData{ NTOF =0x200, DELTAT, DELTAPHI };
25 enum EmcData{ NEMC =0x300, ETOT, EBAR, EEND, EBAL, EEAST, EWEST, NSEC, NSHW,
28 enum MucData{ NMUC =0x400 };
31 enum ConData{ NCON =0x600 };
32
33 /// convert global id to sub-id(Identifier)
34 static Identifier convert(const unsigned int id,const int nmdc=0,const int ncgem=0,const int ntof=0,
35 const int nemc=0,const int nmuc=0);
36
37 /// For a single data
38 static Identifier data_type_id (const unsigned int detector,const unsigned int id_in_sub=0);
39 static unsigned int getIntID (const unsigned int detector,const unsigned int id_in_sub=0);
40 static bool values_ok (const unsigned int detector, const unsigned int id_in_sub=0);
41
42 /// Test for data type
43 static bool is_ef_result (const Identifier& id);
44 static bool is_eventtype (const Identifier& id);
45 static bool is_algorithm (const Identifier& id);
46 static bool is_criteria (const Identifier& id);
47 static bool is_version (const Identifier& id);
48 static bool is_energy (const Identifier& id);
49 static bool is_number (const Identifier& id);
50 static bool is_ncon (const Identifier& id);
51
52 static bool is_mdc_inf (const Identifier& id);
53 static bool is_cgem_inf (const Identifier& id);
54 static bool is_tof_inf (const Identifier& id);
55 static bool is_emc_inf (const Identifier& id);
56 static bool is_muc_inf (const Identifier& id);
57 static bool is_con_inf (const Identifier& id);
58 static bool is_hlt_inf (const Identifier& id){ return is_ef_result(id);};
59
60 /// Values of different levels (failure returns 0)
61 static unsigned int detector (const Identifier& id) ;
62 static unsigned int id_sub (const Identifier& id) ;
63
64 static unsigned int id_sub_max (const Identifier& id) ;
65
66 static unsigned int getID_MDC_MAX (){return ID_MDC_MAX;};
67 static unsigned int getID_CGEM_MAX (){return ID_CGEM_MAX;};
68 static unsigned int getID_TOF_MAX (){return ID_TOF_MAX;};
69 static unsigned int getID_EMC_MAX (){return ID_EMC_MAX;};
70 static unsigned int getID_MUC_MAX (){return ID_MUC_MAX;};
71 static unsigned int getID_HLT_MAX (){return ID_HLT_MAX;};
72
73 static unsigned int getDETECTOR_MIN(){return DETECTOR_MIN;};
74 static unsigned int getDETECTOR_MAX(){return DETECTOR_MAX;};
75 //static unsigned int getHLT() {return HLT;};
76 //static unsigned int getMDC() {return MDC;};
77 //static unsigned int getCGEM() {return CGEM;};
78 //static unsigned int getTOF() {return TOF;};
79 //static unsigned int getEMC() {return EMC;};
80 //static unsigned int getMUC() {return MUC;};
81 //static unsigned int getCON() {return CON;};
82
83 private:
84 static const unsigned int DETECTOR_INDEX = 8;
85 static const unsigned int DETECTOR_MASK = 0x00000F00;
86
87 static const unsigned int ID_SUB_INDEX = 0;
88 static const unsigned int ID_SUB_MASK = 0x000000FF;
89 static const unsigned int ID_MDC_MAX = 19; //20
90 static const unsigned int ID_CGEM_MAX = 19; //20
91 static const unsigned int ID_TOF_MAX = 4; //5
92 static const unsigned int ID_EMC_MAX = 21; //22
93 static const unsigned int ID_MUC_MAX = 2; //3
94 static const unsigned int ID_HLT_MAX = 5; //6
95
96 static const unsigned int DETECTOR_MAX = 5;
97 static const unsigned int DETECTOR_MIN = 0;
98};
99
100#endif
Definition HltID.h:9
static bool is_ncon(const Identifier &id)
Definition HltID.cxx:114
static unsigned int getID_MUC_MAX()
Definition HltID.h:70
static bool is_tof_inf(const Identifier &id)
Definition HltID.cxx:130
static unsigned int getID_HLT_MAX()
Definition HltID.h:71
static bool is_version(const Identifier &id)
Definition HltID.cxx:96
ConData
Definition HltID.h:31
@ NCON
Definition HltID.h:31
static unsigned int getID_CGEM_MAX()
Definition HltID.h:67
static unsigned int getID_EMC_MAX()
Definition HltID.h:69
static bool is_con_inf(const Identifier &id)
Definition HltID.cxx:145
static bool is_cgem_inf(const Identifier &id)
Definition HltID.cxx:125
SubID
Definition HltID.h:21
@ EMC
Definition HltID.h:21
@ MUC
Definition HltID.h:21
@ CGEM
Definition HltID.h:21
@ TOF
Definition HltID.h:21
@ HLT
Definition HltID.h:21
@ MDC
Definition HltID.h:21
@ CON
Definition HltID.h:21
CgemData
Definition HltID.h:29
@ SPMAX1
Definition HltID.h:29
@ NCGEM
Definition HltID.h:29
@ STRKHIT2
Definition HltID.h:30
@ SPHI2
Definition HltID.h:30
@ STRKSHIT2
Definition HltID.h:30
@ SACOL
Definition HltID.h:30
@ SVR1
Definition HltID.h:29
@ SVZ1
Definition HltID.h:29
@ SVZ2
Definition HltID.h:30
@ SPHI1
Definition HltID.h:29
@ SPMAX2
Definition HltID.h:30
@ SCOST2
Definition HltID.h:30
@ STRKHIT1
Definition HltID.h:29
@ STRKSHIT1
Definition HltID.h:29
@ SNTRK
Definition HltID.h:29
@ SVR2
Definition HltID.h:30
@ SCOST1
Definition HltID.h:29
static bool is_ef_result(const Identifier &id)
Test for data type.
Definition HltID.cxx:73
static bool is_eventtype(const Identifier &id)
Definition HltID.cxx:78
HltID(void)
constructor
Definition HltID.cxx:5
static Identifier data_type_id(const unsigned int detector, const unsigned int id_in_sub=0)
For a single data.
Definition HltID.cxx:186
~HltID(void)
destructor
Definition HltID.cxx:8
static unsigned int getDETECTOR_MIN()
Definition HltID.h:73
EmcData
Definition HltID.h:25
@ ECOST2
Definition HltID.h:26
@ EMAX3
Definition HltID.h:27
@ EMAX2
Definition HltID.h:26
@ EEND
Definition HltID.h:25
@ ECOST1
Definition HltID.h:26
@ EWEST
Definition HltID.h:25
@ ECOST3
Definition HltID.h:27
@ NSEC
Definition HltID.h:25
@ NSHW
Definition HltID.h:25
@ EPHI3
Definition HltID.h:27
@ EACOL
Definition HltID.h:26
@ NEMC
Definition HltID.h:25
@ EEAST
Definition HltID.h:25
@ EBAL
Definition HltID.h:25
@ EPHI2
Definition HltID.h:26
@ EMAX12
Definition HltID.h:26
@ EBAR
Definition HltID.h:25
@ ETOT
Definition HltID.h:25
@ EPHI1
Definition HltID.h:26
@ EMAX1
Definition HltID.h:26
@ EACOP
Definition HltID.h:26
static unsigned int detector(const Identifier &id)
Values of different levels (failure returns 0)
Definition HltID.cxx:151
MdcData
Definition HltID.h:22
@ TRKHIT1
Definition HltID.h:22
@ PMAX2
Definition HltID.h:23
@ PMAX1
Definition HltID.h:22
@ COST2
Definition HltID.h:23
@ VR1
Definition HltID.h:22
@ TRKSHIT1
Definition HltID.h:22
@ VZ1
Definition HltID.h:22
@ PHI1
Definition HltID.h:22
@ ACOL
Definition HltID.h:23
@ COST1
Definition HltID.h:22
@ NMDC
Definition HltID.h:22
@ PHI2
Definition HltID.h:23
@ NTRK
Definition HltID.h:22
@ VR2
Definition HltID.h:23
@ TRKHIT2
Definition HltID.h:23
@ TRKSHIT2
Definition HltID.h:23
@ VZ2
Definition HltID.h:23
static bool is_hlt_inf(const Identifier &id)
Definition HltID.h:58
static unsigned int getDETECTOR_MAX()
Definition HltID.h:74
static bool is_algorithm(const Identifier &id)
Definition HltID.cxx:84
static bool is_muc_inf(const Identifier &id)
Definition HltID.cxx:140
@ DELTAPHI
Definition HltID.h:24
@ DELTAT
Definition HltID.h:24
@ NTOF
Definition HltID.h:24
Identifier::value_type value_type
Definition HltID.h:12
static unsigned int getID_MDC_MAX()
Definition HltID.h:66
static bool is_criteria(const Identifier &id)
Definition HltID.cxx:90
static unsigned int getID_TOF_MAX()
Definition HltID.h:68
static unsigned int getIntID(const unsigned int detector, const unsigned int id_in_sub=0)
Definition HltID.cxx:195
static unsigned int id_sub_max(const Identifier &id)
Definition HltID.cxx:161
static bool is_emc_inf(const Identifier &id)
Definition HltID.cxx:135
Identifier::size_type size_type
Definition HltID.h:11
static bool is_number(const Identifier &id)
Definition HltID.cxx:108
MucData
Definition HltID.h:28
@ NMUC
Definition HltID.h:28
static bool is_mdc_inf(const Identifier &id)
Definition HltID.cxx:120
static unsigned int id_sub(const Identifier &id)
Definition HltID.cxx:156
static bool values_ok(const unsigned int detector, const unsigned int id_in_sub=0)
Definition HltID.cxx:37
static Identifier convert(const unsigned int id, const int nmdc=0, const int ncgem=0, const int ntof=0, const int nemc=0, const int nmuc=0)
convert global id to sub-id(Identifier)
Definition HltID.cxx:12
Header
Definition HltID.h:20
@ ALGORITHM
Definition HltID.h:20
@ NUMCON
Definition HltID.h:20
@ CRITERIA
Definition HltID.h:20
@ VERSION
Definition HltID.h:20
@ NUMSUB
Definition HltID.h:20
@ EVENTTYPE
Definition HltID.h:20
@ ENERGY
Definition HltID.h:20
static bool is_energy(const Identifier &id)
Definition HltID.cxx:102
unsigned int size_type
Definition Identifier.h:28
unsigned int value_type
Definition Identifier.h:27