BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/Identifier/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
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,
27 EMAX3, ECOST3, EPHI3 };
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
static bool is_tof_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.
Definition: HltID.cxx:67
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)
Definition: HltID.cxx:140
static bool is_muc_inf(const Identifier &id)
static bool is_hlt_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 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 bool is_criteria(const Identifier &id)