CMS 3D CMS Logo

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

#include <DTCompactMapPluginHandler.h>

Inheritance diagram for DTCompactMapPluginHandler:
DTCompactMapAbstractHandler

Public Member Functions

virtual DTReadOutMappingexpandMap (const DTReadOutMapping &compMap)
 expand compact map More...
 
virtual ~DTCompactMapPluginHandler ()
 
- Public Member Functions inherited from DTCompactMapAbstractHandler
virtual ~DTCompactMapAbstractHandler ()
 

Static Public Member Functions

static void build ()
 build static object More...
 
- Static Public Member Functions inherited from DTCompactMapAbstractHandler
static
DTCompactMapAbstractHandler
getInstance ()
 get static object More...
 

Private Member Functions

 DTCompactMapPluginHandler ()
 
 DTCompactMapPluginHandler (const DTCompactMapPluginHandler &x)
 
const DTCompactMapPluginHandleroperator= (const DTCompactMapPluginHandler &x)
 

Additional Inherited Members

- Protected Member Functions inherited from DTCompactMapAbstractHandler
 DTCompactMapAbstractHandler ()
 
- Static Protected Attributes inherited from DTCompactMapAbstractHandler
static
DTCompactMapAbstractHandler
instance = 0
 

Detailed Description

Description: Class to hold configuration identifier for chambers

Date:
2011/02/08 15:46:42
Revision:
1.1
Author
Paolo Ronchese INFN Padova

Definition at line 33 of file DTCompactMapPluginHandler.h.

Constructor & Destructor Documentation

DTCompactMapPluginHandler::~DTCompactMapPluginHandler ( )
virtual

Destructor

Definition at line 46 of file DTCompactMapPluginHandler.cc.

46  {
47 }
DTCompactMapPluginHandler::DTCompactMapPluginHandler ( )
private

Constructor

Definition at line 33 of file DTCompactMapPluginHandler.cc.

Referenced by build().

33  {
34 // std::cout << "===================================" << std::endl;
35 // std::cout << "= =" << std::endl;
36 // std::cout << "= new DTCompactMapPluginHandler =" << std::endl;
37 // std::cout << "= =" << std::endl;
38 // std::cout << "===================================" << std::endl;
39 // if ( instance == 0 ) instance = this;
40 }
DTCompactMapPluginHandler::DTCompactMapPluginHandler ( const DTCompactMapPluginHandler x)
private

Member Function Documentation

void DTCompactMapPluginHandler::build ( )
static

build static object

Operations

Definition at line 53 of file DTCompactMapPluginHandler.cc.

References DTCompactMapPluginHandler(), and DTCompactMapAbstractHandler::instance.

Referenced by DTCompactMapHandlerFactory::DTCompactMapHandlerFactory().

53  {
55 }
static DTCompactMapAbstractHandler * instance
DTReadOutMapping * DTCompactMapPluginHandler::expandMap ( const DTReadOutMapping compMap)
virtual

expand compact map

Reimplemented from DTCompactMapAbstractHandler.

Definition at line 58 of file DTCompactMapPluginHandler.cc.

References DTReadOutMapping::begin(), DTReadOutGeometryLink::cellId, DTReadOutGeometryLink::channelId, gather_cfg::cout, DTReadOutGeometryLink::dduId, def, DTReadOutMapping::end(), DTReadOutMapping::insertReadOutGeometryLink(), DTReadOutGeometryLink::layerId, DTReadOutMapping::mapCellTdc(), DTReadOutMapping::mapRobRos(), DTReadOutGeometryLink::robId, DTReadOutGeometryLink::rosId, DTReadOutGeometryLink::sectorId, DTReadOutGeometryLink::slId, DTReadOutGeometryLink::stationId, AlCaHLTBitMon_QueryRunRegistry::string, DTReadOutGeometryLink::tdcId, and DTReadOutGeometryLink::wheelId.

58  {
59  std::vector<DTReadOutGeometryLink> entryList;
60  DTReadOutMapping::const_iterator compIter = compMap.begin();
61  DTReadOutMapping::const_iterator compIend = compMap.end();
62  while ( compIter != compIend ) entryList.push_back( *compIter++ );
63 
65  rosMap = "expand_";
66  rosMap += compMap.mapRobRos();
68  tdcMap = "expand_";
69  tdcMap += compMap.mapCellTdc();
70  DTReadOutMapping* fullMap = new DTReadOutMapping( tdcMap, rosMap );
71  int ddu;
72  int ros;
73  int rch;
74  int tdc;
75  int tch;
76  int whe;
77  int sta;
78  int sec;
79  int rob;
80  int qua;
81  int lay;
82  int cel;
83  int mt1;
84  int mi1;
85  int mt2;
86  int mi2;
87  int def;
88  int wha;
89  int sea;
90  std::vector<DTReadOutGeometryLink>::const_iterator iter = entryList.begin();
91  std::vector<DTReadOutGeometryLink>::const_iterator iend = entryList.end();
92  std::vector<DTReadOutGeometryLink>::const_iterator iros = entryList.end();
93  std::vector<DTReadOutGeometryLink>::const_iterator irob = entryList.end();
94  while ( iter != iend ) {
95  const DTReadOutGeometryLink& rosEntry( *iter++ );
96  if ( rosEntry.dduId > 0x3fffffff ) continue;
97  ddu = rosEntry.dduId;
98  ros = rosEntry.rosId;
99  whe = rosEntry.wheelId;
100  def = rosEntry.stationId;
101  sec = rosEntry.sectorId;
102  rob = rosEntry.slId;
103  mt1 = rosEntry.layerId;
104  mi1 = rosEntry.cellId;
105  iros = entryList.begin();
106  while ( iros != iend ) {
107  wha = whe;
108  sea = sec;
109  const DTReadOutGeometryLink& rchEntry( *iros++ );
110  if ( ( rchEntry.dduId != mt1 ) ||
111  ( rchEntry.rosId != mi1 ) ) continue;
112  rch = rchEntry.robId;
113  if ( rchEntry.wheelId != def ) wha = rchEntry.wheelId;
114  sta = rchEntry.stationId;
115  if ( rchEntry.sectorId != def ) sea = rchEntry.sectorId;
116  rob = rchEntry.slId;
117  mt2 = rchEntry.layerId;
118  mi2 = rchEntry.cellId;
119  irob = entryList.begin();
120  while ( irob != iend ) {
121  const DTReadOutGeometryLink& robEntry( *irob++ );
122  if ( ( robEntry.dduId != mt2 ) ||
123  ( robEntry.rosId != mi2 ) ) continue;
124  if ( robEntry.robId != rob ) {
125  std::cout << "ROB mismatch " << rob << " "
126  << robEntry.robId << std::endl;
127  }
128  tdc = robEntry.tdcId;
129  tch = robEntry.channelId;
130  qua = robEntry.slId;
131  lay = robEntry.layerId;
132  cel = robEntry.cellId;
133  fullMap->insertReadOutGeometryLink( ddu, ros, rch, tdc, tch,
134  wha, sta, sea,
135  qua, lay, cel );
136 
137  }
138  }
139  }
140  return fullMap;
141 }
const_iterator end() const
std::vector< DTReadOutGeometryLink >::const_iterator const_iterator
Access methods to the connections.
const std::string & mapCellTdc() const
access parent maps identifiers
const_iterator begin() const
int insertReadOutGeometryLink(int dduId, int rosId, int robId, int tdcId, int channelId, int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId)
insert connection
const std::string & mapRobRos() const
tuple cout
Definition: gather_cfg.py:121
JetCorrectorParameters::Definitions def
Definition: classes.h:12
const DTCompactMapPluginHandler& DTCompactMapPluginHandler::operator= ( const DTCompactMapPluginHandler x)
private