BOSS 7.1.2
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
21 enum SubID {HLT =0,MDC,TOF,EMC,MUC,CON};
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 };
29 enum ConData{ NCON =0x500 };
30
31 /// convert global id to sub-id(Identifier)
32 static Identifier convert(const unsigned int id,const int nmdc=0,const int ntof=0,
33 const int nemc=0,const int nmuc=0);
34
35 /// For a single data
36 static Identifier data_type_id (const unsigned int detector,const unsigned int id_in_sub=0);
37 static unsigned int getIntID (const unsigned int detector,const unsigned int id_in_sub=0);
38 static bool values_ok (const unsigned int detector, const unsigned int id_in_sub=0);
39
40 /// Test for data type
41 static bool is_ef_result (const Identifier& id);
42 static bool is_eventtype (const Identifier& id);
43 static bool is_algorithm (const Identifier& id);
44 static bool is_criteria (const Identifier& id);
45 static bool is_version (const Identifier& id);
46 static bool is_energy (const Identifier& id);
47 static bool is_number (const Identifier& id);
48 static bool is_ncon (const Identifier& id);
49
50 static bool is_mdc_inf (const Identifier& id);
51 static bool is_tof_inf (const Identifier& id);
52 static bool is_emc_inf (const Identifier& id);
53 static bool is_muc_inf (const Identifier& id);
54 static bool is_con_inf (const Identifier& id);
55 static bool is_hlt_inf (const Identifier& id){ return is_ef_result(id);};
56
57 /// Values of different levels (failure returns 0)
58 static unsigned int detector (const Identifier& id) ;
59 static unsigned int id_sub (const Identifier& id) ;
60
61 static unsigned int id_sub_max (const Identifier& id) ;
62
63 static unsigned int getID_MDC_MAX (){return ID_MDC_MAX;};
64 static unsigned int getID_TOF_MAX (){return ID_TOF_MAX;};
65 static unsigned int getID_EMC_MAX (){return ID_EMC_MAX;};
66 static unsigned int getID_MUC_MAX (){return ID_MUC_MAX;};
67 static unsigned int getID_HLT_MAX (){return ID_HLT_MAX;};
68
69 static unsigned int getDETECTOR_MIN(){return DETECTOR_MIN;};
70 static unsigned int getDETECTOR_MAX(){return DETECTOR_MAX;};
71 //static unsigned int getHLT() {return HLT;};
72 //static unsigned int getMDC() {return MDC;};
73 //static unsigned int getTOF() {return TOF;};
74 //static unsigned int getEMC() {return EMC;};
75 //static unsigned int getMUC() {return MUC;};
76 //static unsigned int getCON() {return CON;};
77
78 private:
79 static const unsigned int DETECTOR_INDEX = 8;
80 static const unsigned int DETECTOR_MASK = 0x00000F00;
81
82 static const unsigned int ID_SUB_INDEX = 0;
83 static const unsigned int ID_SUB_MASK = 0x000000FF;
84 static const unsigned int ID_MDC_MAX = 19; //20
85 static const unsigned int ID_TOF_MAX = 4; //5
86 static const unsigned int ID_EMC_MAX = 21; //22
87 static const unsigned int ID_MUC_MAX = 2; //3
88 static const unsigned int ID_HLT_MAX = 5; //6
89
90 static const unsigned int DETECTOR_MAX = 5;
91 static const unsigned int DETECTOR_MIN = 0;
92};
93
94#endif
Definition HltID.h:9
static bool is_ncon(const Identifier &id)
Definition HltID.cxx:108
static unsigned int getID_MUC_MAX()
Definition HltID.h:66
static bool is_tof_inf(const Identifier &id)
Definition HltID.cxx:119
static unsigned int getID_HLT_MAX()
Definition HltID.h:67
static bool is_version(const Identifier &id)
Definition HltID.cxx:90
ConData
Definition HltID.h:29
@ NCON
Definition HltID.h:29
static unsigned int getID_EMC_MAX()
Definition HltID.h:65
static bool is_con_inf(const Identifier &id)
Definition HltID.cxx:134
SubID
Definition HltID.h:21
@ EMC
Definition HltID.h:21
@ MUC
Definition HltID.h:21
@ TOF
Definition HltID.h:21
@ HLT
Definition HltID.h:21
@ MDC
Definition HltID.h:21
@ CON
Definition HltID.h:21
static bool is_ef_result(const Identifier &id)
Test for data type.
Definition HltID.cxx:67
static bool is_eventtype(const Identifier &id)
Definition HltID.cxx:72
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:172
~HltID(void)
destructor
Definition HltID.cxx:8
static unsigned int getDETECTOR_MIN()
Definition HltID.h:69
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 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)
Definition HltID.cxx:12
static unsigned int detector(const Identifier &id)
Values of different levels (failure returns 0)
Definition HltID.cxx:140
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:55
static unsigned int getDETECTOR_MAX()
Definition HltID.h:70
static bool is_algorithm(const Identifier &id)
Definition HltID.cxx:78
static bool is_muc_inf(const Identifier &id)
Definition HltID.cxx:129
@ 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:63
static bool is_criteria(const Identifier &id)
Definition HltID.cxx:84
static unsigned int getID_TOF_MAX()
Definition HltID.h:64
static unsigned int getIntID(const unsigned int detector, const unsigned int id_in_sub=0)
Definition HltID.cxx:181
static unsigned int id_sub_max(const Identifier &id)
Definition HltID.cxx:150
static bool is_emc_inf(const Identifier &id)
Definition HltID.cxx:124
Identifier::size_type size_type
Definition HltID.h:11
static bool is_number(const Identifier &id)
Definition HltID.cxx:102
MucData
Definition HltID.h:28
@ NMUC
Definition HltID.h:28
static bool is_mdc_inf(const Identifier &id)
Definition HltID.cxx:114
static unsigned int id_sub(const Identifier &id)
Definition HltID.cxx:145
static bool values_ok(const unsigned int detector, const unsigned int id_in_sub=0)
Definition HltID.cxx:34
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:96
unsigned int size_type
Definition Identifier.h:28
unsigned int value_type
Definition Identifier.h:27