CMS 3D CMS Logo

List of all members | Static Public Member Functions
DTExpandMap Class Reference

#include <DTExpandMap.h>

Static Public Member Functions

static void expandSteering (std::ifstream &file)
 

Detailed Description

Description: Class to build full readout map from compact map

Date
2009/03/19 12:00:00
Revision
1.1
Author
Paolo Ronchese INFN Padova

See header file for a description of this class.

Date
2009/03/26 14:11:04
Revision
1.1
Author
Paolo Ronchese INFN Padova

Definition at line 27 of file DTExpandMap.h.

Member Function Documentation

◆ expandSteering()

void DTExpandMap::expandSteering ( std::ifstream &  file)
static

Definition at line 52 of file DTExpandMap.cc.

52  {
53  std::vector<int> key;
54  int k1;
55  int k2;
56  int k3;
57  int k4;
58  int k5;
59  int v1;
60  int v2;
61  int v3;
62  int v4;
63  int v5;
64  int v6;
65 
66  std::vector<DTMapEntry> entryList;
67  while (file >> k1 >> k2 >> k3 >> k4 >> k5 >> v1 >> v2 >> v3 >> v4 >> v5 >> v6) {
68  std::vector<int> key;
69  key.push_back(k1);
70  key.push_back(k2);
71  key.push_back(k3);
72  key.push_back(k4);
73  key.push_back(k5);
74  DTMapEntry currentEntry(k1, k2, k3, k4, k5, v1, v2, v3, v4, v5, v6);
75  entryList.push_back(currentEntry);
76  }
77 
78  int ddu;
79  int ros;
80  int rch;
81  int tdc;
82  int tch;
83  int whe;
84  int sta;
85  int sec;
86  int rob;
87  int qua;
88  int lay;
89  int cel;
90  int mt1;
91  int mi1;
92  int mt2;
93  int mi2;
94  int def;
95  int wha;
96  int sea;
97  std::vector<DTMapEntry>::const_iterator iter = entryList.begin();
98  std::vector<DTMapEntry>::const_iterator iend = entryList.end();
99  std::vector<DTMapEntry>::const_iterator iros = entryList.end();
100  std::vector<DTMapEntry>::const_iterator irob = entryList.end();
101  while (iter != iend) {
102  const DTMapEntry& rosEntry(*iter++);
103  if (rosEntry.k1 > 0x3fffffff)
104  continue;
105  ddu = rosEntry.k1;
106  ros = rosEntry.k2;
107  whe = rosEntry.v1;
108  def = rosEntry.v2;
109  sec = rosEntry.v3;
110  rob = rosEntry.v4;
111  mt1 = rosEntry.v5;
112  mi1 = rosEntry.v6;
113  iros = entryList.begin();
114  while (iros != iend) {
115  wha = whe;
116  sea = sec;
117  const DTMapEntry& rchEntry(*iros++);
118  if ((rchEntry.k1 != mt1) || (rchEntry.k2 != mi1))
119  continue;
120  rch = rchEntry.k3;
121  if (rchEntry.v1 != def)
122  wha = rchEntry.v1;
123  sta = rchEntry.v2;
124  if (rchEntry.v3 != def)
125  sea = rchEntry.v3;
126  rob = rchEntry.v4;
127  mt2 = rchEntry.v5;
128  mi2 = rchEntry.v6;
129  irob = entryList.begin();
130  while (irob != iend) {
131  const DTMapEntry& robEntry(*irob++);
132  if ((robEntry.k1 != mt2) || (robEntry.k2 != mi2))
133  continue;
134  if (robEntry.k3 != rob) {
135  std::cout << "ROB mismatch " << rob << " " << robEntry.k3 << std::endl;
136  }
137  tdc = robEntry.k4;
138  tch = robEntry.k5;
139  qua = robEntry.v4;
140  lay = robEntry.v5;
141  cel = robEntry.v6;
142  std::cout << ddu << " " << ros << " " << rch << " " << tdc << " " << tch << " " << wha << " " << sta << " "
143  << sea << " " << qua << " " << lay << " " << cel << std::endl;
144  }
145  }
146  }
147 
148  return;
149 }

References gather_cfg::cout, spu::def(), geometryDiff::file, DTMapEntry::k1, DTMapEntry::k2, DTMapEntry::k3, DTMapEntry::k4, DTMapEntry::k5, crabWrapper::key, MT2Analyzer::mt2, fileinputsource_cfi::sec, DTMapEntry::v1, DTMapEntry::v2, DTMapEntry::v3, DTMapEntry::v4, DTMapEntry::v5, and DTMapEntry::v6.

gather_cfg.cout
cout
Definition: gather_cfg.py:144
geometryDiff.file
file
Definition: geometryDiff.py:13
MT2Analyzer.mt2
mt2
Definition: MT2Analyzer.py:251
fileinputsource_cfi.sec
sec
Definition: fileinputsource_cfi.py:94
spu::def
int def(FILE *, FILE *, int)
Definition: SherpackUtilities.cc:14
DTMapEntry
Definition: DTExpandMap.cc:27
crabWrapper.key
key
Definition: crabWrapper.py:19