CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Static Public Member Functions | Private Member Functions
LogicID Class Reference

#include <LogicID.h>

Static Public Member Functions

static EcalLogicID getEcalLogicID (const char *name, const int id1=EcalLogicID::NULLID, const int id2=EcalLogicID::NULLID, const int id3=EcalLogicID::NULLID) throw ( std::runtime_error )
 

Private Member Functions

 LogicID ()
 
 ~LogicID ()
 

Detailed Description

Definition at line 17 of file LogicID.h.

Constructor & Destructor Documentation

LogicID::LogicID ( )
inlineprivate

Definition at line 116 of file LogicID.h.

116 {}; // Hidden to force static use
LogicID::~LogicID ( )
inlineprivate

Definition at line 117 of file LogicID.h.

117 {}; // Hidden to force static use

Member Function Documentation

static EcalLogicID LogicID::getEcalLogicID ( const char *  name,
const int  id1 = EcalLogicID::NULLID,
const int  id2 = EcalLogicID::NULLID,
const int  id3 = EcalLogicID::NULLID 
)
throw (std::runtime_error
)
inlinestatic

Definition at line 29 of file LogicID.h.

References EcalLogicID::NULLID, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by EcalBarrelMonitorClient::endRunDb(), EcalEndcapMonitorClient::endRunDb(), EcalEndcapMonitorClient::writeDb(), and EcalBarrelMonitorClient::writeDb().

32  {
33 
34  // EcalBarrel
35 
36  if( strcmp(name, "EB") == 0 ) {
37  return( EcalLogicID( "EB",
38  1000000000UL ) );
39  }
40  if( strcmp(name, "EB_crystal_number") == 0 ) {
41  return( EcalLogicID( "EB_crystal_number",
42  1011000000UL+10000*id1+id2,
43  id1,
44  id2 ) );
45  }
46  if( strcmp(name, "EB_trigger_tower") == 0 ) {
47  return( EcalLogicID( "EB_trigger_tower",
48  1021000000UL+10000*id1+id2,
49  id1,
50  id2 ) );
51  }
52  if( strcmp(name, "EB_mem_channel") == 0 ) {
53  return( EcalLogicID( "EB_mem_channel",
54  1191000000UL+10000*id1+id2,
55  id1,
56  id2 ) );
57  }
58  if( strcmp(name, "EB_mem_TT") == 0 ) {
59  return( EcalLogicID( "EB_mem_TT",
60  1181000000UL+10000*id1+id2,
61  id1,
62  id2 ) );
63  }
64  if( strcmp(name, "EB_LM_PN") == 0 ) {
65  return( EcalLogicID( "EB_LM_PN",
66  1131000000UL+10000*id1+id2,
67  id1,
68  id2 ) );
69  }
70 
71  // EcalEndcap
72 
73  if( strcmp(name, "EE") == 0 ) {
74  return( EcalLogicID( "EE",
75  2000000000UL ) );
76  }
77  if( strcmp(name, "EE_crystal_number") == 0 ) {
78  return( EcalLogicID( "EE_crystal_number",
79  2010000000UL+1000000*((id1>=1&&id1<=9)?2:0)+1000*int(id2/1000)+int(id2%1000),
80  (id1>=1&&id1<=9)?+1:-1,
81  int(id2/1000),
82  int(id2%1000) ) );
83  }
84  if( strcmp(name, "EE_readout_tower") == 0 ) {
85  return( EcalLogicID( "EE_readout_tower",
86  2110000000UL+100*((id1>=1&&id1<=9)?(646+(id1-1)):(601+(id1-10)))+id2,
87  ((id1>=1&&id1<=9)?(646+(id1-1)):(601+(id1-10))),
88  id2 ) );
89  }
90  if( strcmp(name, "EE_mem_channel") == 0 ) {
91  return( EcalLogicID( "EE_mem_channel",
92  100*((id1>=1&&id1<=9)?(646+(id1-1)):(601+(id1-10)))+id2,
93  ((id1>=1&&id1<=9)?(646+(id1-1)):(601+(id1-10))),
94  id2 ) );
95  }
96  if( strcmp(name, "EE_mem_TT") == 0 ) {
97  return( EcalLogicID( "EE_mem_TT",
98  100*((id1>=1&&id1<=9)?(646+(id1-1)):(601+(id1-10)))+id2,
99  ((id1>=1&&id1<=9)?(646+(id1-1)):(601+(id1-10))),
100  id2 ) );
101  }
102  if( strcmp(name, "EE_LM_PN") == 0 ) {
103  return( EcalLogicID( "EE_LM_PN",
104  100*((id1>=1&&id1<=9)?(646+(id1-1)):(601+(id1-10)))+id2,
105  ((id1>=1&&id1<=9)?(646+(id1-1)):(601+(id1-10))),
106  id2 ) );
107  }
108 
109  throw( std::runtime_error( "Unknown 'name': " + std::string( name ) ) );
110  return( EcalLogicID( std::string( "" ), EcalLogicID::NULLID ) );
111 
112 }
static const int NULLID
Definition: EcalLogicID.h:42