/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/DetectorDescription/Identifier/Identifier-00-02-17/test/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

int main (  ) 

Definition at line 9 of file main.cxx.

References EmcID::barrel_ec(), EmcID::crystal_id(), HltID::data_type_id(), HltID::detector(), HltID::EMC, HltID::getDETECTOR_MAX(), EmcID::getENDCAP_EAST(), EmcID::getENDCAP_WEST(), HltID::getID_MDC_MAX(), EmcID::getPHI_ENDCAP_MAX(), HltID::id_sub(), HltID::id_sub_max(), HltID::is_algorithm(), EmcID::is_barrel(), HltID::is_ef_result(), HltID::is_energy(), HltID::is_eventtype(), HltID::is_mdc_inf(), EmcID::phi_module(), EmcID::theta_module(), and x.

00010 {
00011    Identifier id;
00012    id=0;
00013 
00014    
00015    int x=1,y=2,z=3;
00016 
00017    cout<<id;
00018 
00019    cout.width(8);
00020    cout.fill('*');
00021    cout<<"Hello"<<endl;
00022 
00023    cout<<"==============EmcID Test================="<<endl;
00024 
00025    id=EmcID::crystal_id(x,y,z);
00026 
00027    cout<<"Identifier id="<<id<<endl;
00028    
00029    cout<<"barrel_ec    ="<<EmcID::barrel_ec(id)<<endl;
00030    cout<<"theta_module ="<<EmcID::theta_module(id)<<endl;
00031    cout<<"phi_module   ="<<EmcID::phi_module(id)<<endl;
00032    cout<<"is barrel?    "<<EmcID::is_barrel(id)<<endl;
00033 
00034    for ( int theta=-5; theta<=10; theta++ )  {
00035      cout<<"PHI_MAX(theta="<<theta<<"):"<<EmcID::getPHI_ENDCAP_MAX(theta)<<endl;
00036    }
00037 
00038    cout<<"ENDCAP_EAST  ="<<EmcID::getENDCAP_EAST()<<endl;
00039    cout<<"ENDCAP_WEST  ="<<EmcID::getENDCAP_WEST()<<endl;
00040 
00041    cout<<"===============HltID Test================="<<endl;
00042 
00043    x=0;y=2;
00044    id=HltID::data_type_id(x,y);
00045    
00046    cout<<"Identifier id="<<id<<endl;
00047 
00048    cout<<"detector     ="<<HltID::detector(id)<<endl;
00049    cout<<"id_in_sub    ="<<HltID::id_sub(id)<<endl;
00050    cout<<"is ef_result? "<<HltID::is_ef_result(id)<<endl;
00051    cout<<"is eventtype? "<<HltID::is_eventtype(id)<<endl;
00052    cout<<"is energy?    "<<HltID::is_energy(id)<<endl;
00053    cout<<"is algorithm? "<<HltID::is_algorithm(id)<<endl;
00054    cout<<"is mdc inf?   "<<HltID::is_mdc_inf(id)<<endl;
00055 
00056    cout<<"EMC          ="<<HltID::EMC<<endl;
00057    cout<<"DETECTOR_MAX ="<<HltID::getDETECTOR_MAX()<<endl;
00058    cout<<"this id's max="<<HltID::id_sub_max(id)<<endl;
00059    cout<<"ID_MDC_MAX   ="<<HltID::getID_MDC_MAX()<<endl;
00060 
00061 }


Generated on Tue Nov 29 23:14:53 2016 for BOSS_7.0.2 by  doxygen 1.4.7