CMS 3D CMS Logo

DBSpecToDetUnit Class Reference

#include <CondFormats/RPCObjects/interface/DBSpecToDetUnit.h>

List of all members.

Public Member Functions

uint32_t operator() (const ChamberLocationSpec &location, const FebLocationSpec &feb)


Detailed Description

Definition at line 8 of file DBSpecToDetUnit.h.


Member Function Documentation

uint32_t DBSpecToDetUnit::operator() ( const ChamberLocationSpec location,
const FebLocationSpec feb 
)

Definition at line 12 of file DBSpecToDetUnit.cc.

References GeomDetEnumerators::barrel, ChamberLocationSpec::barrelOrEndcap, RPCDetId::buildfromDB(), ChamberLocationSpec::chamberLocationName, debug, edm::MessageDrop::debugEnabled, ChamberLocationSpec::diskOrWheel, edm::MessageDrop::instance(), ChamberLocationSpec::layer, FebLocationSpec::localEtaPartition, LogDebug, DetId::rawId(), ChamberLocationSpec::sector, and ChamberLocationSpec::subsector.

00014 {
00015   static bool debug = edm::MessageDrop::instance()->debugEnabled;
00016   // REGION
00017   int region = -2;
00018   bool barrel = (ch.barrelOrEndcap=="Barrel");
00019   if (barrel) region = 0;
00020   else if (ch.diskOrWheel<0) region = -1;
00021   else if (ch.diskOrWheel>0) region = 1;
00022 
00023   //ROLL
00024   string nroll = feb.localEtaPartition;
00025 
00026   // build RPCdetId
00027   try {
00028     RPCDetId dn;
00029     dn.buildfromDB(region, ch.diskOrWheel, ch.layer, ch.sector, 
00030                    ch.subsector, nroll, ch.chamberLocationName);
00031     return dn.rawId();
00032   } 
00033   catch(...) {
00034     if (debug) LogDebug ("CondFormas/DBSpecToDetInit") 
00035       <<" Problem with RPCDetId, got exception!! " 
00036       <<"DB Chamber "<<ch.chamberLocationName<<" roll "<<nroll;
00037     return 0;
00038   }
00039 }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:17:40 2009 for CMSSW by  doxygen 1.5.4