CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
main.cxx File Reference
#include <iostream>
#include "Identifier/Identifier.h"
#include "Identifier/EmcID.h"
#include "Identifier/HltID.h"

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 9 of file DetectorDescription/Identifier/Identifier-01-02-15/test/main.cxx.

10{
11 Identifier id;
12 id=0;
13
14
15 int x=1,y=2,z=3;
16
17 cout<<id;
18
19 cout.width(8);
20 cout.fill('*');
21 cout<<"Hello"<<endl;
22
23 cout<<"==============EmcID Test================="<<endl;
24
25 id=EmcID::crystal_id(x,y,z);
26
27 cout<<"Identifier id="<<id<<endl;
28
29 cout<<"barrel_ec ="<<EmcID::barrel_ec(id)<<endl;
30 cout<<"theta_module ="<<EmcID::theta_module(id)<<endl;
31 cout<<"phi_module ="<<EmcID::phi_module(id)<<endl;
32 cout<<"is barrel? "<<EmcID::is_barrel(id)<<endl;
33
34 for ( int theta=-5; theta<=10; theta++ ) {
35 cout<<"PHI_MAX(theta="<<theta<<"):"<<EmcID::getPHI_ENDCAP_MAX(theta)<<endl;
36 }
37
38 cout<<"ENDCAP_EAST ="<<EmcID::getENDCAP_EAST()<<endl;
39 cout<<"ENDCAP_WEST ="<<EmcID::getENDCAP_WEST()<<endl;
40
41 cout<<"===============HltID Test================="<<endl;
42
43 x=0;y=2;
44 id=HltID::data_type_id(x,y);
45
46 cout<<"Identifier id="<<id<<endl;
47
48 cout<<"detector ="<<HltID::detector(id)<<endl;
49 cout<<"id_in_sub ="<<HltID::id_sub(id)<<endl;
50 cout<<"is ef_result? "<<HltID::is_ef_result(id)<<endl;
51 cout<<"is eventtype? "<<HltID::is_eventtype(id)<<endl;
52 cout<<"is energy? "<<HltID::is_energy(id)<<endl;
53 cout<<"is algorithm? "<<HltID::is_algorithm(id)<<endl;
54 cout<<"is mdc inf? "<<HltID::is_mdc_inf(id)<<endl;
55
56 cout<<"EMC ="<<HltID::EMC<<endl;
57 cout<<"DETECTOR_MAX ="<<HltID::getDETECTOR_MAX()<<endl;
58 cout<<"this id's max="<<HltID::id_sub_max(id)<<endl;
59 cout<<"ID_MDC_MAX ="<<HltID::getID_MDC_MAX()<<endl;
60
61}
Double_t x[10]
static Identifier crystal_id(const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
For a single crystal.
Definition EmcID.cxx:71
static unsigned int getENDCAP_WEST()
Definition EmcID.cxx:151
static unsigned int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0)
Definition EmcID.cxx:38
static bool is_barrel(const Identifier &id)
Test for barrel.
Definition EmcID.cxx:32
static unsigned int getENDCAP_EAST()
Definition EmcID.cxx:141
static unsigned int theta_module(const Identifier &id)
Definition EmcID.cxx:43
static unsigned int getPHI_ENDCAP_MAX(const unsigned int theta)
Definition EmcID.cxx:115
static unsigned int phi_module(const Identifier &id)
Definition EmcID.cxx:48
@ EMC
Definition HltID.h:21
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
static Identifier data_type_id(const unsigned int detector, const unsigned int id_in_sub=0)
For a single data.
Definition HltID.cxx:186
static unsigned int detector(const Identifier &id)
Values of different levels (failure returns 0)
Definition HltID.cxx:151
static unsigned int getDETECTOR_MAX()
Definition HltID.h:74
static bool is_algorithm(const Identifier &id)
Definition HltID.cxx:84
static unsigned int getID_MDC_MAX()
Definition HltID.h:66
static unsigned int id_sub_max(const Identifier &id)
Definition HltID.cxx:161
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 is_energy(const Identifier &id)
Definition HltID.cxx:102