CMS 3D CMS Logo

DTConfigManager Class Reference

DTTPG Configuration manager Includes config classes for every single chip. More...

#include <L1TriggerConfig/DTTPGConfig/interface/DTConfigManager.h>

List of all members.

Public Types

typedef std::map< DTChamberId,
innerBtiMap
BtiMap
typedef std::map< DTBtiId,
DTConfigBti
innerBtiMap
typedef std::map< DTTracoId,
DTConfigTraco
innerTracoMap
typedef std::map< DTSectCollId,
DTConfigSectColl
SectCollMap
typedef std::map< DTChamberId,
innerTracoMap
TracoMap
typedef std::map< DTChamberId,
DTConfigTrigUnit
TrigUnitMap
typedef std::map< DTChamberId,
DTConfigTSPhi
TSPhiMap
typedef std::map< DTChamberId,
DTConfigTSTheta
TSThetaMap

Public Member Functions

 DTConfigManager ()
 Constructor.
int getBXOffset () const
 Get BX Offset.
DTConfigBtigetDTConfigBti (DTBtiId) const
 Get desired BTI configuration.
const std::map< DTBtiId,
DTConfigBti > & 
getDTConfigBtiMap (DTChamberId) const
 Get desired BTI configuration map for a given DTChamber.
DTConfigSectCollgetDTConfigSectColl (DTSectCollId) const
 Get desired SectorCollector configuration.
DTConfigTracogetDTConfigTraco (DTTracoId) const
 Get desired TRACO configuration.
const std::map< DTTracoId,
DTConfigTraco > & 
getDTConfigTracoMap (DTChamberId) const
 Get desired TRACO configuration map for a given DTChamber.
DTConfigTrigUnitgetDTConfigTrigUnit (DTChamberId) const
 Get desired Trigger Unit configuration.
DTConfigTSPhigetDTConfigTSPhi (DTChamberId) const
 Get desired Trigger Server Phi configuration.
DTConfigTSThetagetDTConfigTSTheta (DTChamberId) const
 Get desired Trigger Server Theta configuration.
bool getDTTPGDebug () const
 Get global debug flag.
void setDTConfigBti (DTBtiId, DTConfigBti)
 Set DTConfigBti for desired chip.
void setDTConfigSectColl (DTSectCollId sectcollid, DTConfigSectColl conf)
 Set DTConfigSectColl for desired chip.
void setDTConfigTraco (DTTracoId, DTConfigTraco)
 Set DTConfigTraco for desired chip.
void setDTConfigTrigUnit (DTChamberId chambid, DTConfigTrigUnit conf)
 Set DTConfigTrigUnit for desired chip.
void setDTConfigTSPhi (DTChamberId chambid, DTConfigTSPhi conf)
 Set DTConfigTSPhi for desired chip.
void setDTConfigTSTheta (DTChamberId chambid, DTConfigTSTheta conf)
 Set DTConfigTSTheta for desired chip.
void setDTTPGDebug (bool debug)
 SetGlobalDebug flag.
 ~DTConfigManager ()
 Destructor.

Private Attributes

BtiMap my_btimap
int my_bxoffset
bool my_dttpgdebug
SectCollMap my_sectcollmap
TracoMap my_tracomap
TrigUnitMap my_trigunitmap
TSPhiMap my_tsphimap
TSThetaMap my_tsthetamap


Detailed Description

DTTPG Configuration manager Includes config classes for every single chip.

Author:
C. Battilana april 07 : SV DTConfigTrigUnit added april 07 : CB Removed DTGeometry dependecies

Definition at line 46 of file DTConfigManager.h.


Member Typedef Documentation

typedef std::map<DTChamberId,innerBtiMap> DTConfigManager::BtiMap

Definition at line 52 of file DTConfigManager.h.

typedef std::map<DTBtiId,DTConfigBti> DTConfigManager::innerBtiMap

Definition at line 50 of file DTConfigManager.h.

typedef std::map<DTTracoId,DTConfigTraco> DTConfigManager::innerTracoMap

Definition at line 51 of file DTConfigManager.h.

typedef std::map<DTSectCollId,DTConfigSectColl> DTConfigManager::SectCollMap

Definition at line 57 of file DTConfigManager.h.

typedef std::map<DTChamberId,innerTracoMap> DTConfigManager::TracoMap

Definition at line 53 of file DTConfigManager.h.

typedef std::map<DTChamberId,DTConfigTrigUnit> DTConfigManager::TrigUnitMap

Definition at line 56 of file DTConfigManager.h.

typedef std::map<DTChamberId,DTConfigTSPhi> DTConfigManager::TSPhiMap

Definition at line 55 of file DTConfigManager.h.

typedef std::map<DTChamberId,DTConfigTSTheta> DTConfigManager::TSThetaMap

Definition at line 54 of file DTConfigManager.h.


Constructor & Destructor Documentation

DTConfigManager::DTConfigManager (  ) 

Constructor.

Definition at line 36 of file DTConfigManager.cc.

00036                                 {
00037 
00038 }

DTConfigManager::~DTConfigManager (  ) 

Destructor.

Definition at line 44 of file DTConfigManager.cc.

References my_btimap, my_sectcollmap, my_tracomap, my_trigunitmap, my_tsphimap, and my_tsthetamap.

00044                                  {
00045 
00046   my_sectcollmap.clear();
00047   my_trigunitmap.clear();
00048   my_tsphimap.clear();
00049   my_tsthetamap.clear();
00050   my_tracomap.clear();
00051   my_btimap.clear();
00052 
00053 }


Member Function Documentation

int DTConfigManager::getBXOffset (  )  const

Get BX Offset.

Definition at line 211 of file DTConfigManager.cc.

References DTConfigSectColl::CoarseSync(), getDTConfigBti(), getDTConfigSectColl(), and DTConfigBti::ST().

Referenced by DTTrig::getBXOffset().

00211                                        {
00212 
00213   int ST = static_cast<int>(getDTConfigBti(DTBtiId(1,1,1,1,1))->ST());
00214   int coarse = getDTConfigSectColl(DTSectCollId(1,1))->CoarseSync(1);
00215   return (ST/2 + ST%2 + coarse); //CB check this function!
00216 
00217 }

DTConfigBti * DTConfigManager::getDTConfigBti ( DTBtiId  btiid  )  const

Get desired BTI configuration.

Definition at line 59 of file DTConfigManager.cc.

References DTBtiId::bti(), DTSuperLayerId::chamberId(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), my_btimap, DTChamberId::sector(), DTBtiId::sector(), DTBtiId::SLId(), DTChamberId::station(), DTBtiId::station(), DTBtiId::superlayer(), DTBtiId::wheel(), and DTChamberId::wheel().

Referenced by getBXOffset().

00059                                                                 {
00060   
00061   DTChamberId chambid = btiid.SLId().chamberId();
00062   BtiMap::const_iterator biter1 = my_btimap.find(chambid);
00063   if (biter1 == my_btimap.end()){
00064     std::cout << "DTConfigManager::getConfigBti : Chamber (" << chambid.wheel()
00065               << "," << chambid.sector()
00066               << "," << chambid.station() 
00067               << ") not found, return 0" << std::endl;
00068     return 0;
00069   }
00070   
00071   innerBtiMap::const_iterator biter2 = (*biter1).second.find(btiid);
00072   if (biter2 == (*biter1).second.end()){
00073     std::cout << "DTConfigManager::getConfigBti : BTI (" << btiid.wheel()
00074               << "," << btiid.sector()
00075               << "," << btiid.station()
00076               << "," << btiid.superlayer()
00077               << "," << btiid.bti()
00078               << ") not found, return 0" << std::endl;
00079     return 0;
00080   }
00081   return const_cast<DTConfigBti*>(&(*biter2).second);
00082 
00083 }  

const std::map< DTBtiId, DTConfigBti > & DTConfigManager::getDTConfigBtiMap ( DTChamberId  chambid  )  const

Get desired BTI configuration map for a given DTChamber.

Definition at line 85 of file DTConfigManager.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), my_btimap, DTChamberId::sector(), DTChamberId::station(), and DTChamberId::wheel().

Referenced by DTBtiCard::setConfig().

00085                                                                                                {
00086   
00087   BtiMap::const_iterator biter = my_btimap.find(chambid);
00088   if (biter == my_btimap.end()){
00089     std::cout << "DTConfigManager::getConfigBtiMap : Chamber (" << chambid.wheel()
00090               << "," << chambid.sector()
00091               << "," << chambid.station() 
00092               << ") not found, return a reference to the end of the map" << std::endl;
00093   }
00094   
00095   return (*biter).second;
00096 
00097 }

DTConfigSectColl * DTConfigManager::getDTConfigSectColl ( DTSectCollId  scid  )  const

Get desired SectorCollector configuration.

Definition at line 183 of file DTConfigManager.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), my_sectcollmap, DTSectCollId::sector(), and DTSectCollId::wheel().

Referenced by getBXOffset(), and DTSectColl::setConfig().

00183                                                                               {
00184   
00185   SectCollMap::const_iterator sciter = my_sectcollmap.find(scid);
00186   if (sciter == my_sectcollmap.end()){
00187     std::cout << "DTConfigManager::getConfigSectColl : SectorCollector (" << scid.wheel()
00188               << "," << scid.sector() 
00189               << ") not found, return 0" << std::endl;
00190     return 0;
00191   }
00192 
00193   return const_cast<DTConfigSectColl*>(&(*sciter).second);
00194 
00195 }

DTConfigTraco * DTConfigManager::getDTConfigTraco ( DTTracoId  tracoid  )  const

Get desired TRACO configuration.

Definition at line 99 of file DTConfigManager.cc.

References DTTracoId::ChamberId(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), my_tracomap, DTTracoId::sector(), DTChamberId::sector(), DTTracoId::station(), DTChamberId::station(), DTTracoId::traco(), DTChamberId::wheel(), and DTTracoId::wheel().

00099                                                                         {
00100   
00101   DTChamberId chambid = tracoid.ChamberId();
00102   TracoMap::const_iterator titer1 = my_tracomap.find(chambid);
00103   if (titer1 == my_tracomap.end()){
00104     std::cout << "DTConfigManager::getConfigTraco : Chamber (" << chambid.wheel()
00105               << "," << chambid.sector()
00106               << "," << chambid.station() 
00107               << ") not found, return 0" << std::endl;
00108     return 0;
00109   }
00110   
00111   innerTracoMap::const_iterator titer2 = (*titer1).second.find(tracoid);
00112   if (titer2 == (*titer1).second.end()){
00113     std::cout << "DTConfigManager::getConfigTraco : TRACO (" << tracoid.wheel()
00114               << "," << tracoid.sector()
00115               << "," << tracoid.station()
00116               << "," << tracoid.traco()
00117               << ") not found, return a reference to the end of the map" << std::endl;
00118     return 0;
00119   }
00120   return const_cast<DTConfigTraco*>(&(*titer2).second);
00121 
00122 }

const std::map< DTTracoId, DTConfigTraco > & DTConfigManager::getDTConfigTracoMap ( DTChamberId  chambid  )  const

Get desired TRACO configuration map for a given DTChamber.

Definition at line 124 of file DTConfigManager.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), my_tracomap, DTChamberId::sector(), DTChamberId::station(), and DTChamberId::wheel().

Referenced by DTTracoCard::setConfig().

00124                                                                                                      {
00125   
00126   TracoMap::const_iterator titer = my_tracomap.find(chambid);
00127   if (titer == my_tracomap.end()){
00128     std::cout << "DTConfigManager::getConfigTracoMap : Chamber (" << chambid.wheel()
00129               << "," << chambid.sector()
00130               << "," << chambid.station() 
00131               << ") not found, return 0" << std::endl;
00132   }
00133 
00134   return (*titer).second;
00135 
00136 }

DTConfigTrigUnit * DTConfigManager::getDTConfigTrigUnit ( DTChamberId  chambid  )  const

Get desired Trigger Unit configuration.

Definition at line 168 of file DTConfigManager.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), my_trigunitmap, DTChamberId::sector(), DTChamberId::station(), and DTChamberId::wheel().

Referenced by DTBtiCard::setConfig().

00168                                                                                 {
00169   
00170    TrigUnitMap::const_iterator tuiter = my_trigunitmap.find(chambid);
00171    if (tuiter == my_trigunitmap.end()){
00172      std::cout << "DTCOnfigManager::getConfigTrigUnit : Chamber (" << chambid.wheel()
00173               << "," << chambid.sector()
00174               << "," << chambid.station() 
00175               << ") not found, return 0" << std::endl;
00176      return 0;
00177    }
00178 
00179    return const_cast<DTConfigTrigUnit*>(&(*tuiter).second);
00180 
00181 }

DTConfigTSPhi * DTConfigManager::getDTConfigTSPhi ( DTChamberId  chambid  )  const

Get desired Trigger Server Phi configuration.

Definition at line 153 of file DTConfigManager.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), my_tsphimap, DTChamberId::sector(), DTChamberId::station(), and DTChamberId::wheel().

Referenced by DTTSPhi::setConfig().

00153                                                                           {
00154   
00155   TSPhiMap::const_iterator phiter = my_tsphimap.find(chambid);
00156   if (phiter == my_tsphimap.end()){
00157     std::cout << "DTConfigManager::getConfigTSPhi : Chamber (" << chambid.wheel()
00158               << "," << chambid.sector()
00159               << "," << chambid.station() 
00160               << ") not found, return 0" << std::endl;
00161     return 0;
00162   }
00163 
00164   return const_cast<DTConfigTSPhi*>(&(*phiter).second);
00165 
00166 }

DTConfigTSTheta * DTConfigManager::getDTConfigTSTheta ( DTChamberId  chambid  )  const

Get desired Trigger Server Theta configuration.

Definition at line 138 of file DTConfigManager.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), my_tsthetamap, DTChamberId::sector(), DTChamberId::station(), and DTChamberId::wheel().

Referenced by DTTSTheta::setConfig().

00138                                                                               {
00139  
00140   TSThetaMap::const_iterator thiter = my_tsthetamap.find(chambid);
00141   if (thiter == my_tsthetamap.end()){
00142     std::cout << "DTConfigManager::getConfigTSTheta : Chamber (" << chambid.wheel()
00143               << "," << chambid.sector()
00144               << "," << chambid.station() 
00145               << ") not found, return 0" << std::endl;
00146     return 0;
00147   }
00148   
00149   return const_cast<DTConfigTSTheta*>(&(*thiter).second);
00150 
00151 }

bool DTConfigManager::getDTTPGDebug (  )  const [inline]

Get global debug flag.

Definition at line 110 of file DTConfigManager.h.

References my_dttpgdebug.

Referenced by DTTracoCard::setConfig(), and DTBtiCard::setConfig().

00110 { return my_dttpgdebug; };

void DTConfigManager::setDTConfigBti ( DTBtiId  btiid,
DTConfigBti  conf 
)

Set DTConfigBti for desired chip.

Definition at line 197 of file DTConfigManager.cc.

References DTSuperLayerId::chamberId(), my_btimap, and DTBtiId::SLId().

Referenced by DTConfigTrivialProducer::buildManager().

00197                                                                   {
00198 
00199   DTChamberId chambid = btiid.SLId().chamberId();
00200   my_btimap[chambid][btiid] = conf;
00201 
00202 }  

void DTConfigManager::setDTConfigSectColl ( DTSectCollId  sectcollid,
DTConfigSectColl  conf 
) [inline]

Set DTConfigSectColl for desired chip.

Definition at line 107 of file DTConfigManager.h.

References my_sectcollmap.

Referenced by DTConfigTrivialProducer::buildManager().

00107 { my_sectcollmap[sectcollid] = conf; };

void DTConfigManager::setDTConfigTraco ( DTTracoId  tracoid,
DTConfigTraco  conf 
)

Set DTConfigTraco for desired chip.

Definition at line 204 of file DTConfigManager.cc.

References DTTracoId::ChamberId(), and my_tracomap.

Referenced by DTConfigTrivialProducer::buildManager().

00204                                                                           {
00205 
00206   DTChamberId chambid = tracoid.ChamberId();
00207   my_tracomap[chambid][tracoid] = conf;
00208 
00209 }  

void DTConfigManager::setDTConfigTrigUnit ( DTChamberId  chambid,
DTConfigTrigUnit  conf 
) [inline]

Set DTConfigTrigUnit for desired chip.

Definition at line 104 of file DTConfigManager.h.

References my_trigunitmap.

Referenced by DTConfigTrivialProducer::buildManager().

00104 { my_trigunitmap[chambid] = conf; };

void DTConfigManager::setDTConfigTSPhi ( DTChamberId  chambid,
DTConfigTSPhi  conf 
) [inline]

Set DTConfigTSPhi for desired chip.

Definition at line 101 of file DTConfigManager.h.

References my_tsphimap.

Referenced by DTConfigTrivialProducer::buildManager().

00101 { my_tsphimap[chambid] = conf; };

void DTConfigManager::setDTConfigTSTheta ( DTChamberId  chambid,
DTConfigTSTheta  conf 
) [inline]

Set DTConfigTSTheta for desired chip.

Definition at line 98 of file DTConfigManager.h.

References my_tsthetamap.

Referenced by DTConfigTrivialProducer::buildManager().

00098 { my_tsthetamap[chambid] = conf; };

void DTConfigManager::setDTTPGDebug ( bool  debug  )  [inline]

SetGlobalDebug flag.

Definition at line 113 of file DTConfigManager.h.

References my_dttpgdebug.

Referenced by DTConfigTrivialProducer::buildManager().

00113 { my_dttpgdebug = debug; };


Member Data Documentation

BtiMap DTConfigManager::my_btimap [private]

Definition at line 122 of file DTConfigManager.h.

Referenced by getDTConfigBti(), getDTConfigBtiMap(), setDTConfigBti(), and ~DTConfigManager().

int DTConfigManager::my_bxoffset [private]

Definition at line 129 of file DTConfigManager.h.

bool DTConfigManager::my_dttpgdebug [private]

Definition at line 130 of file DTConfigManager.h.

Referenced by getDTTPGDebug(), and setDTTPGDebug().

SectCollMap DTConfigManager::my_sectcollmap [private]

Definition at line 127 of file DTConfigManager.h.

Referenced by getDTConfigSectColl(), setDTConfigSectColl(), and ~DTConfigManager().

TracoMap DTConfigManager::my_tracomap [private]

Definition at line 123 of file DTConfigManager.h.

Referenced by getDTConfigTraco(), getDTConfigTracoMap(), setDTConfigTraco(), and ~DTConfigManager().

TrigUnitMap DTConfigManager::my_trigunitmap [private]

Definition at line 126 of file DTConfigManager.h.

Referenced by getDTConfigTrigUnit(), setDTConfigTrigUnit(), and ~DTConfigManager().

TSPhiMap DTConfigManager::my_tsphimap [private]

Definition at line 125 of file DTConfigManager.h.

Referenced by getDTConfigTSPhi(), setDTConfigTSPhi(), and ~DTConfigManager().

TSThetaMap DTConfigManager::my_tsthetamap [private]

Definition at line 124 of file DTConfigManager.h.

Referenced by getDTConfigTSTheta(), setDTConfigTSTheta(), and ~DTConfigManager().


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