22 #include "boost/shared_ptr.hpp"
40 const std::vector<std::string>& chInputStrings)
42 std::vector<L1GtObject> chInputObjectsV;
43 chInputObjectsV.reserve(chInputStrings.size());
47 for (std::vector<std::string>::const_iterator itObj =
48 chInputStrings.begin(); itObj != chInputStrings.end(); ++itObj) {
50 if ((*itObj) ==
"Mu") {
53 else if ((*itObj) ==
"NoIsoEG") {
56 else if ((*itObj) ==
"IsoEG") {
59 else if ((*itObj) ==
"CenJet") {
62 else if ((*itObj) ==
"ForJet") {
65 else if ((*itObj) ==
"TauJet") {
68 else if ((*itObj) ==
"ETM") {
71 else if ((*itObj) ==
"ETT") {
74 else if ((*itObj) ==
"HTT") {
77 else if ((*itObj) ==
"HTM") {
80 else if ((*itObj) ==
"JetCounts") {
83 else if ((*itObj) ==
"HfBitCounts") {
86 else if ((*itObj) ==
"HfRingEtSums") {
89 else if ((*itObj) ==
"TechTrig") {
92 else if ((*itObj) ==
"BPTX") {
95 else if ((*itObj) ==
"GtExternal") {
100 <<
"\nError: no such L1 GT object: " << (*itObj) <<
"\n"
101 <<
"\n Can not define the mapping of the L1 GT boards. \n"
106 chInputObjectsV.push_back(obj);
109 return chInputObjectsV;
121 std::vector<std::string> boardList =
122 parSet.
getParameter<std::vector<std::string> >(
"BoardList");
124 std::vector<int> boardIndexVec =
130 if (boardList.size() != boardIndexVec.size()) {
132 <<
"\nError: inconsistent length of board list and board indices.\n"
133 <<
"\n Can not define the mapping of the L1 GT boards. \n"
138 std::vector<int> boardPositionDaqRecord =
139 parSet.
getParameter<std::vector<int> >(
"BoardPositionDaqRecord");
141 if (boardList.size() != boardPositionDaqRecord.size()) {
143 <<
"\nError: inconsistent length of board list and board indices in GT DAQ record.\n"
144 <<
"\n Can not define the mapping of the L1 GT boards. \n"
149 std::vector<int> boardPositionEvmRecord =
150 parSet.
getParameter<std::vector<int> >(
"BoardPositionEvmRecord");
152 if (boardList.size() != boardPositionEvmRecord.size()) {
154 <<
"\nError: inconsistent length of board list and board indices in GT EVM record.\n"
155 <<
"\n Can not define the mapping of the L1 GT boards. \n"
160 std::vector<int> activeBoardsDaqRecord =
161 parSet.
getParameter<std::vector<int> >(
"ActiveBoardsDaqRecord");
163 if (boardList.size() != activeBoardsDaqRecord.size()) {
165 <<
"\nError: inconsistent length of board list and active boards in GT DAQ record.\n"
166 <<
"\n Can not define the mapping of the L1 GT boards. \n"
171 std::vector<int> activeBoardsEvmRecord =
172 parSet.
getParameter<std::vector<int> >(
"ActiveBoardsEvmRecord");
174 if (boardList.size() != activeBoardsEvmRecord.size()) {
176 <<
"\nError: inconsistent length of board list and active boards in GT EVM record.\n"
177 <<
"\n Can not define the mapping of the L1 GT boards. \n"
182 std::vector<int> boardSlotMap =
185 if (boardList.size() != boardSlotMap.size()) {
187 <<
"\nError: inconsistent length of board list and board - slot map.\n"
188 <<
"\n Can not define the mapping of the L1 GT boards. \n"
193 std::vector<int> boardHexNameMap =
194 parSet.
getParameter<std::vector<int> >(
"BoardHexNameMap");
196 if (boardList.size() != boardHexNameMap.size()) {
198 <<
"\nError: inconsistent length of board list and board name in hw record map.\n"
199 <<
"\n Can not define the mapping of the L1 GT boards. \n"
209 std::vector<std::string> cableList =
210 parSet.
getParameter<std::vector<std::string> >(
"CableList");
215 std::vector<int> cableToPsbMap =
216 parSet.
getParameter<std::vector<int> >(
"CableToPsbMap");
219 if (cableList.size() != cableToPsbMap.size()) {
221 <<
"\nError: inconsistent length of cable list and input to PSB list.\n"
222 <<
"\n Can not define the mapping of GCT quadruplets to GT PSBs.\n"
228 std::vector<edm::ParameterSet> psbInput = parSet.
getParameter<std::vector<
238 for (std::vector<std::string>::const_iterator
239 it = boardList.begin(); it != boardList.end(); ++it) {
243 if ( (*it) ==
"GTFE" ) {
245 }
else if ( (*it) ==
"FDL" ) {
247 }
else if ( (*it) ==
"PSB" ) {
249 }
else if ( (*it) ==
"GMT" ) {
251 }
else if ( (*it) ==
"TCS" ) {
253 }
else if ( (*it) ==
"TIM" ) {
257 <<
"\nError: no such board: " << (*it).c_str() <<
"\n"
258 <<
"\n Can not define the mapping of the L1 GT boards. \n"
264 int iBoard = boardIndexVec.at(posVec);
284 int boardSlot = boardSlotMap.at(posVec);
293 if (boardType ==
PSB) {
300 for (std::vector<std::string>::const_iterator
301 cIt = cableList.begin(); cIt != cableList.end(); ++cIt) {
304 if ( *cIt ==
"TechTr" ) {
306 }
else if ( *cIt ==
"IsoEGQ" ) {
308 }
else if ( *cIt ==
"NoIsoEGQ" ) {
310 }
else if ( *cIt ==
"CenJetQ" ) {
312 }
else if ( *cIt ==
"ForJetQ" ) {
314 }
else if ( *cIt ==
"TauJetQ" ) {
316 }
else if ( *cIt ==
"ESumsQ" ) {
318 }
else if ( *cIt ==
"JetCountsQ" ) {
320 }
else if ( *cIt ==
"MQB1" ) {
322 }
else if ( *cIt ==
"MQB2" ) {
324 }
else if ( *cIt ==
"MQF3" ) {
326 }
else if ( *cIt ==
"MQF4" ) {
328 }
else if ( *cIt ==
"MQB5" ) {
330 }
else if ( *cIt ==
"MQB6" ) {
332 }
else if ( *cIt ==
"MQF7" ) {
334 }
else if ( *cIt ==
"MQF8" ) {
336 }
else if ( *cIt ==
"MQB9" ) {
338 }
else if ( *cIt ==
"MQB10" ) {
340 }
else if ( *cIt ==
"MQF11" ) {
342 }
else if ( *cIt ==
"MQF12" ) {
344 }
else if ( *cIt ==
"Free" ) {
346 }
else if ( *cIt ==
"HfQ" ) {
351 <<
"\nError: no such quadruplet: " << (*cIt).c_str() <<
"\n"
352 <<
"\n Can not define the mapping of quadruplets to the L1 PSB boards.\n"
356 int psbIndex = cableToPsbMap.at(posCable);
362 <<
"\nError: too many cables for PSB_" << gtBoard.
gtBoardIndex()
364 <<
"Can not define the mapping of cables to L1 PSB boards. \n"
368 quadVec[iPsb] = psbQuad;
379 if (boardType ==
PSB) {
381 std::map<int, std::vector<L1GtObject> > inputPsbChannels;
383 std::vector<std::string> chStrings;
384 chStrings.reserve(2);
386 std::vector<L1GtObject> chObjects;
388 for (std::vector<edm::ParameterSet>::const_iterator itPSet =
389 psbInput.begin(); itPSet != psbInput.end(); ++itPSet) {
392 int slot = itPSet->getParameter<
int> (
"Slot");
394 if (slot == boardSlot) {
395 chStrings = itPSet->getParameter<std::vector<std::string> > (
398 inputPsbChannels[0] = chObjects;
402 chStrings = itPSet->getParameter<std::vector<std::string> > (
405 inputPsbChannels[1] = chObjects;
409 chStrings = itPSet->getParameter<std::vector<std::string> > (
412 inputPsbChannels[2] = chObjects;
416 chStrings = itPSet->getParameter<std::vector<std::string> > (
419 inputPsbChannels[3] = chObjects;
423 chStrings = itPSet->getParameter<std::vector<std::string> > (
426 inputPsbChannels[4] = chObjects;
430 chStrings = itPSet->getParameter<std::vector<std::string> > (
433 inputPsbChannels[5] = chObjects;
437 chStrings = itPSet->getParameter<std::vector<std::string> > (
440 inputPsbChannels[6] = chObjects;
444 chStrings = itPSet->getParameter<std::vector<std::string> > (
447 inputPsbChannels[7] = chObjects;
482 using namespace edm::es;
484 boost::shared_ptr<L1GtBoardMaps> pL1GtBoardMaps =
489 return pL1GtBoardMaps ;
T getParameter(std::string const &) const
void setGtBoardSlot(const int &)
void setGtBoardHexName(const int &)
void setGtBitEvmActiveBoards(const int &)
~L1GtBoardMapsTrivialProducer()
destructor
std::vector< L1GtObject > chInputObjects(const std::vector< std::string > &chInputStrings)
void setGtPositionEvmRecord(const int &)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
L1GtPsbQuad
quadruples sent to GT via PSB
std::vector< L1GtBoard > m_gtBoardMaps
L1 GT boards and their mapping.
L1GtBoardType
board types in GT
void setGtInputPsbChannels(const std::map< int, std::vector< L1GtObject > > &)
const int gtBoardIndex() const
get / set board index
void setGtBitDaqActiveBoards(const int &)
void setGtPositionDaqRecord(const int &)
L1GtBoardMapsTrivialProducer(const edm::ParameterSet &)
constructor
boost::shared_ptr< L1GtBoardMaps > produceBoardMaps(const L1GtBoardMapsRcd &)
public methods
static const int NumberCablesBoard
number of InfiniCables per board
void setGtQuadInPsb(const std::vector< L1GtPsbQuad > &)