39 std::string errorReport =
checkReadoutModuleValues(l_atlas_tb, l_barrel_ec, l_pos_neg, l_em_hec_fcal, l_rosId, l_rodFragId, l_rodCrate, l_rodSlot) ;
41 if( errorReport.length() != 0 ) {
43 msg << MSG::ERROR <<
" createReadoutModuleID called with parameters: "
44 << l_atlas_tb <<
", " << l_barrel_ec <<
", " << l_pos_neg <<
", " << l_em_hec_fcal
45 <<
", " << l_rosId <<
", " << l_rodFragId <<
", " << l_rodCrate <<
", " << l_rodSlot <<
endmsg;
46 msg << MSG::ERROR << errorReport <<
endmsg;
50 l_rodCrate = l_rodCrate-1;
63 std::string l_std_str =
"";
65 if( l_atlas_tb > 1 || l_atlas_tb < 0 ) {
66 l_std_str += std::string(
"atlas_tb out of range ,") ;
68 if( l_barrel_ec > 1 || l_barrel_ec < 0 ) {
69 l_std_str += std::string(
"barrel_ec out of range ,") ;
71 if( l_pos_neg > 1 || l_pos_neg < 0 ) {
72 l_std_str += std::string(
"pos_neg out of range ,") ;
74 if( l_em_hec_fcal > 2 || l_em_hec_fcal < 0 ) {
75 l_std_str += std::string(
"em_hec_fcal out of range ,") ;
78 if( l_barrel_ec == 0 && l_em_hec_fcal == 0 ) {
80 if( l_rosId > 27 || l_rosId < 0) {
81 l_std_str += std::string(
"rosId out of range ,") ;
83 if( l_rodFragId > 223 || l_rodFragId < 0) {
84 l_std_str += std::string(
"rodFragId out of range ,") ;
86 if( l_rodCrate > 4 || l_rodCrate < 1) {
87 l_std_str += std::string(
"rodCrate out of range ,") ;
89 if( l_rodSlot > 14 || l_rodSlot < 1) {
90 l_std_str += std::string(
"rodSlot out of range ,") ;
93 if( l_barrel_ec == 1 && l_em_hec_fcal == 0 ) {
95 if( l_rosId > 17 || l_rosId < 0) {
96 l_std_str += std::string(
"rosId out of range ,") ;
98 if( l_rodFragId > 137 || l_rodFragId < 0) {
99 l_std_str += std::string(
"rodFragId out of range ,") ;
101 if( l_rodCrate > 3 || l_rodCrate < 1) {
102 l_std_str += std::string(
"rodCrate out of range ,") ;
104 if( l_rodSlot > 13 || l_rodSlot < 1) {
105 l_std_str += std::string(
"rodSlot out of range ,") ;
108 if( l_barrel_ec == 1 && l_em_hec_fcal == 1 ) {
110 if( l_rosId > 2 || l_rosId < 0) {
111 l_std_str += std::string(
"rosId out of range ,") ;
113 if( l_rodFragId > 23 || l_rodFragId < 0) {
114 l_std_str += std::string(
"rodFragId out of range ,") ;
117 if( l_rodCrate > 2 || l_rodCrate < 1) {
118 l_std_str += std::string(
"rodCrate out of range ,") ;
120 if( l_rodSlot > 6 || l_rodSlot < 1) {
121 l_std_str += std::string(
"rodSlot out of range ,") ;
124 if( l_barrel_ec == 1 && l_em_hec_fcal == 2 ) {
126 if( l_rosId > 1 || l_rosId < 0) {
127 l_std_str += std::string(
"rosId out of range ,") ;
129 if( l_rodFragId > 13 || l_rodFragId < 0) {
130 l_std_str += std::string(
"rodFragId out of range ,") ;
132 if( l_rodCrate > 2 || l_rodCrate < 1) {
134 l_std_str += std::string(
"rodCrate out of range ,") ;
136 if( l_rodSlot > 4 || l_rodSlot < 1) {
137 l_std_str += std::string(
"rodSlot out of range ,") ;
static HWIdentifier createReadoutModuleID(int atlas_tb, int barrel_ec, int pos_neg, int em_hec_fcal, int rosId, int rodFragId, int rodCrate, int rodSlot)
create a HWIdentifier valid parameter values atlas_tb : 0 atlas , 1 test beam barrel_ec : 0 bar...