CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
DetectorDescription/Identifier/Identifier-01-02-15/Identifier/HltID.h
Go to the documentation of this file.
1#ifndef __HltID_h__
2#define __HltID_h__
3
4#include "Identifier/BesDetectorID.h"
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,
27 EMAX3, ECOST3, EPHI3 };
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
static bool is_tof_inf(const Identifier &id)
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)
static bool is_cgem_inf(const Identifier &id)
static bool is_energy(const Identifier &id)
static bool is_version(const Identifier &id)
static bool values_ok(const unsigned int detector, const unsigned int id_in_sub=0)
static bool is_ef_result(const Identifier &id)
Test for data type.
HltID(void)
constructor
static unsigned int getIntID(const unsigned int detector, const unsigned int id_in_sub=0)
static unsigned int id_sub_max(const Identifier &id)
~HltID(void)
destructor
static bool is_mdc_inf(const Identifier &id)
static bool is_number(const Identifier &id)
static bool is_ncon(const Identifier &id)
static unsigned int detector(const Identifier &id)
Values of different levels (failure returns 0)
static bool is_muc_inf(const Identifier &id)
static bool is_eventtype(const Identifier &id)
static bool is_con_inf(const Identifier &id)
static bool is_emc_inf(const Identifier &id)
static Identifier data_type_id(const unsigned int detector, const unsigned int id_in_sub=0)
For a single data.
static unsigned int id_sub(const Identifier &id)
static bool is_ef_result(const Identifier &id)
Test for data type.
static unsigned int detector(const Identifier &id)
Values of different levels (failure returns 0)
static bool is_algorithm(const Identifier &id)
static bool is_criteria(const Identifier &id)