36 std::vector<L1GtObject>
chInputObjects(
const std::vector<std::string>& chInputStrings) {
37 std::vector<L1GtObject> chInputObjectsV;
38 chInputObjectsV.reserve(chInputStrings.size());
42 for (std::vector<std::string>::const_iterator itObj = chInputStrings.begin(); itObj != chInputStrings.end();
44 if ((*itObj) ==
"Mu") {
46 }
else if ((*itObj) ==
"NoIsoEG") {
48 }
else if ((*itObj) ==
"IsoEG") {
50 }
else if ((*itObj) ==
"CenJet") {
52 }
else if ((*itObj) ==
"ForJet") {
54 }
else if ((*itObj) ==
"TauJet") {
56 }
else if ((*itObj) ==
"ETM") {
58 }
else if ((*itObj) ==
"ETT") {
60 }
else if ((*itObj) ==
"HTT") {
62 }
else if ((*itObj) ==
"HTM") {
64 }
else if ((*itObj) ==
"JetCounts") {
66 }
else if ((*itObj) ==
"HfBitCounts") {
68 }
else if ((*itObj) ==
"HfRingEtSums") {
70 }
else if ((*itObj) ==
"TechTrig") {
72 }
else if ((*itObj) ==
"BPTX") {
74 }
else if ((*itObj) ==
"GtExternal") {
77 throw cms::Exception(
"Configuration") <<
"\nError: no such L1 GT object: " << (*itObj) <<
"\n" 78 <<
"\n Can not define the mapping of the L1 GT boards. \n" 82 chInputObjectsV.push_back(
obj);
85 return chInputObjectsV;
96 std::vector<std::string> boardList = parSet.
getParameter<std::vector<std::string> >(
"BoardList");
98 std::vector<int> boardIndexVec = parSet.
getParameter<std::vector<int> >(
"BoardIndex");
103 if (boardList.size() != boardIndexVec.size()) {
104 throw cms::Exception(
"Configuration") <<
"\nError: inconsistent length of board list and board indices.\n" 105 <<
"\n Can not define the mapping of the L1 GT boards. \n" 110 std::vector<int> boardPositionDaqRecord = parSet.
getParameter<std::vector<int> >(
"BoardPositionDaqRecord");
112 if (boardList.size() != boardPositionDaqRecord.size()) {
114 <<
"\nError: inconsistent length of board list and board indices in GT DAQ record.\n" 115 <<
"\n Can not define the mapping of the L1 GT boards. \n" 120 std::vector<int> boardPositionEvmRecord = parSet.
getParameter<std::vector<int> >(
"BoardPositionEvmRecord");
122 if (boardList.size() != boardPositionEvmRecord.size()) {
124 <<
"\nError: inconsistent length of board list and board indices in GT EVM record.\n" 125 <<
"\n Can not define the mapping of the L1 GT boards. \n" 130 std::vector<int> activeBoardsDaqRecord = parSet.
getParameter<std::vector<int> >(
"ActiveBoardsDaqRecord");
132 if (boardList.size() != activeBoardsDaqRecord.size()) {
134 <<
"\nError: inconsistent length of board list and active boards in GT DAQ record.\n" 135 <<
"\n Can not define the mapping of the L1 GT boards. \n" 140 std::vector<int> activeBoardsEvmRecord = parSet.
getParameter<std::vector<int> >(
"ActiveBoardsEvmRecord");
142 if (boardList.size() != activeBoardsEvmRecord.size()) {
144 <<
"\nError: inconsistent length of board list and active boards in GT EVM record.\n" 145 <<
"\n Can not define the mapping of the L1 GT boards. \n" 150 std::vector<int> boardSlotMap = parSet.
getParameter<std::vector<int> >(
"BoardSlotMap");
152 if (boardList.size() != boardSlotMap.size()) {
153 throw cms::Exception(
"Configuration") <<
"\nError: inconsistent length of board list and board - slot map.\n" 154 <<
"\n Can not define the mapping of the L1 GT boards. \n" 159 std::vector<int> boardHexNameMap = parSet.
getParameter<std::vector<int> >(
"BoardHexNameMap");
161 if (boardList.size() != boardHexNameMap.size()) {
163 <<
"\nError: inconsistent length of board list and board name in hw record map.\n" 164 <<
"\n Can not define the mapping of the L1 GT boards. \n" 171 std::vector<std::string> cableList = parSet.
getParameter<std::vector<std::string> >(
"CableList");
176 std::vector<int> cableToPsbMap = parSet.
getParameter<std::vector<int> >(
"CableToPsbMap");
178 if (cableList.size() != cableToPsbMap.size()) {
179 throw cms::Exception(
"Configuration") <<
"\nError: inconsistent length of cable list and input to PSB list.\n" 180 <<
"\n Can not define the mapping of GCT quadruplets to GT PSBs.\n" 185 std::vector<edm::ParameterSet> psbInput = parSet.
getParameter<std::vector<edm::ParameterSet> >(
"PsbInput");
193 for (std::vector<std::string>::const_iterator
it = boardList.begin();
it != boardList.end(); ++
it) {
196 if ((*
it) ==
"GTFE") {
198 }
else if ((*
it) ==
"FDL") {
200 }
else if ((*
it) ==
"PSB") {
202 }
else if ((*
it) ==
"GMT") {
204 }
else if ((*
it) ==
"TCS") {
206 }
else if ((*
it) ==
"TIM") {
209 throw cms::Exception(
"Configuration") <<
"\nError: no such board: " << (*it).c_str() <<
"\n" 210 <<
"\n Can not define the mapping of the L1 GT boards. \n" 216 int iBoard = boardIndexVec.at(posVec);
236 int boardSlot = boardSlotMap.at(posVec);
245 if (boardType ==
PSB) {
251 for (std::vector<std::string>::const_iterator cIt = cableList.begin(); cIt != cableList.end(); ++cIt) {
252 if (*cIt ==
"TechTr") {
254 }
else if (*cIt ==
"IsoEGQ") {
256 }
else if (*cIt ==
"NoIsoEGQ") {
258 }
else if (*cIt ==
"CenJetQ") {
260 }
else if (*cIt ==
"ForJetQ") {
262 }
else if (*cIt ==
"TauJetQ") {
264 }
else if (*cIt ==
"ESumsQ") {
266 }
else if (*cIt ==
"JetCountsQ") {
268 }
else if (*cIt ==
"MQB1") {
270 }
else if (*cIt ==
"MQB2") {
272 }
else if (*cIt ==
"MQF3") {
274 }
else if (*cIt ==
"MQF4") {
276 }
else if (*cIt ==
"MQB5") {
278 }
else if (*cIt ==
"MQB6") {
280 }
else if (*cIt ==
"MQF7") {
282 }
else if (*cIt ==
"MQF8") {
284 }
else if (*cIt ==
"MQB9") {
286 }
else if (*cIt ==
"MQB10") {
288 }
else if (*cIt ==
"MQF11") {
290 }
else if (*cIt ==
"MQF12") {
292 }
else if (*cIt ==
"Free") {
294 }
else if (*cIt ==
"HfQ") {
299 <<
"\nError: no such quadruplet: " << (*cIt).c_str() <<
"\n" 300 <<
"\n Can not define the mapping of quadruplets to the L1 PSB boards.\n" 304 int psbIndex = cableToPsbMap.at(posCable);
309 <<
"\nError: too many cables for PSB_" << gtBoard.
gtBoardIndex() <<
"\n\n " 310 <<
"Can not define the mapping of cables to L1 PSB boards. \n" 313 quadVec[iPsb] = psbQuad;
322 if (boardType ==
PSB) {
323 std::map<int, std::vector<L1GtObject> > inputPsbChannels;
325 std::vector<std::string> chStrings;
326 chStrings.reserve(2);
328 std::vector<L1GtObject> chObjects;
330 for (std::vector<edm::ParameterSet>::const_iterator itPSet = psbInput.begin(); itPSet != psbInput.end();
333 int slot = itPSet->getParameter<
int>(
"Slot");
335 if (slot == boardSlot) {
336 chStrings = itPSet->getParameter<std::vector<std::string> >(
"Ch0");
338 inputPsbChannels[0] = chObjects;
342 chStrings = itPSet->getParameter<std::vector<std::string> >(
"Ch1");
344 inputPsbChannels[1] = chObjects;
348 chStrings = itPSet->getParameter<std::vector<std::string> >(
"Ch2");
350 inputPsbChannels[2] = chObjects;
354 chStrings = itPSet->getParameter<std::vector<std::string> >(
"Ch3");
356 inputPsbChannels[3] = chObjects;
360 chStrings = itPSet->getParameter<std::vector<std::string> >(
"Ch4");
362 inputPsbChannels[4] = chObjects;
366 chStrings = itPSet->getParameter<std::vector<std::string> >(
"Ch5");
368 inputPsbChannels[5] = chObjects;
372 chStrings = itPSet->getParameter<std::vector<std::string> >(
"Ch6");
374 inputPsbChannels[6] = chObjects;
378 chStrings = itPSet->getParameter<std::vector<std::string> >(
"Ch7");
380 inputPsbChannels[7] = chObjects;
406 auto pL1GtBoardMaps = std::make_unique<L1GtBoardMaps>();
410 return pL1GtBoardMaps;
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
T getParameter(std::string const &) const
void setGtBoardSlot(const int &)
void setGtBoardHexName(const int &)
void setGtBitEvmActiveBoards(const int &)
std::vector< L1GtObject > chInputObjects(const std::vector< std::string > &chInputStrings)
void setGtPositionEvmRecord(const int &)
~L1GtBoardMapsTrivialProducer() override
destructor
std::unique_ptr< L1GtBoardMaps > produceBoardMaps(const L1GtBoardMapsRcd &)
public methods
std::vector< L1GtBoard > m_gtBoardMaps
L1 GT boards and their mapping.
const int gtBoardIndex() const
get / set board index
void setGtInputPsbChannels(const std::map< int, std::vector< L1GtObject > > &)
void setGtBitDaqActiveBoards(const int &)
void setGtPositionDaqRecord(const int &)
L1GtBoardMapsTrivialProducer(const edm::ParameterSet &)
constructor
static const int NumberCablesBoard
number of InfiniCables per board
void setGtQuadInPsb(const std::vector< L1GtPsbQuad > &)