37 const std::vector<std::string>& chInputStrings)
39 std::vector<L1GtObject> chInputObjectsV;
40 chInputObjectsV.reserve(chInputStrings.size());
44 for (std::vector<std::string>::const_iterator itObj =
45 chInputStrings.begin(); itObj != chInputStrings.end(); ++itObj) {
47 if ((*itObj) ==
"Mu") {
50 else if ((*itObj) ==
"NoIsoEG") {
53 else if ((*itObj) ==
"IsoEG") {
56 else if ((*itObj) ==
"CenJet") {
59 else if ((*itObj) ==
"ForJet") {
62 else if ((*itObj) ==
"TauJet") {
65 else if ((*itObj) ==
"ETM") {
68 else if ((*itObj) ==
"ETT") {
71 else if ((*itObj) ==
"HTT") {
74 else if ((*itObj) ==
"HTM") {
77 else if ((*itObj) ==
"JetCounts") {
80 else if ((*itObj) ==
"HfBitCounts") {
83 else if ((*itObj) ==
"HfRingEtSums") {
86 else if ((*itObj) ==
"TechTrig") {
89 else if ((*itObj) ==
"BPTX") {
92 else if ((*itObj) ==
"GtExternal") {
97 <<
"\nError: no such L1 GT object: " << (*itObj) <<
"\n" 98 <<
"\n Can not define the mapping of the L1 GT boards. \n" 103 chInputObjectsV.push_back(obj);
106 return chInputObjectsV;
118 std::vector<std::string> boardList =
119 parSet.
getParameter<std::vector<std::string> >(
"BoardList");
121 std::vector<int> boardIndexVec =
127 if (boardList.size() != boardIndexVec.size()) {
129 <<
"\nError: inconsistent length of board list and board indices.\n" 130 <<
"\n Can not define the mapping of the L1 GT boards. \n" 135 std::vector<int> boardPositionDaqRecord =
136 parSet.
getParameter<std::vector<int> >(
"BoardPositionDaqRecord");
138 if (boardList.size() != boardPositionDaqRecord.size()) {
140 <<
"\nError: inconsistent length of board list and board indices in GT DAQ record.\n" 141 <<
"\n Can not define the mapping of the L1 GT boards. \n" 146 std::vector<int> boardPositionEvmRecord =
147 parSet.
getParameter<std::vector<int> >(
"BoardPositionEvmRecord");
149 if (boardList.size() != boardPositionEvmRecord.size()) {
151 <<
"\nError: inconsistent length of board list and board indices in GT EVM record.\n" 152 <<
"\n Can not define the mapping of the L1 GT boards. \n" 157 std::vector<int> activeBoardsDaqRecord =
158 parSet.
getParameter<std::vector<int> >(
"ActiveBoardsDaqRecord");
160 if (boardList.size() != activeBoardsDaqRecord.size()) {
162 <<
"\nError: inconsistent length of board list and active boards in GT DAQ record.\n" 163 <<
"\n Can not define the mapping of the L1 GT boards. \n" 168 std::vector<int> activeBoardsEvmRecord =
169 parSet.
getParameter<std::vector<int> >(
"ActiveBoardsEvmRecord");
171 if (boardList.size() != activeBoardsEvmRecord.size()) {
173 <<
"\nError: inconsistent length of board list and active boards in GT EVM record.\n" 174 <<
"\n Can not define the mapping of the L1 GT boards. \n" 179 std::vector<int> boardSlotMap =
182 if (boardList.size() != boardSlotMap.size()) {
184 <<
"\nError: inconsistent length of board list and board - slot map.\n" 185 <<
"\n Can not define the mapping of the L1 GT boards. \n" 190 std::vector<int> boardHexNameMap =
191 parSet.
getParameter<std::vector<int> >(
"BoardHexNameMap");
193 if (boardList.size() != boardHexNameMap.size()) {
195 <<
"\nError: inconsistent length of board list and board name in hw record map.\n" 196 <<
"\n Can not define the mapping of the L1 GT boards. \n" 206 std::vector<std::string> cableList =
207 parSet.
getParameter<std::vector<std::string> >(
"CableList");
212 std::vector<int> cableToPsbMap =
213 parSet.
getParameter<std::vector<int> >(
"CableToPsbMap");
216 if (cableList.size() != cableToPsbMap.size()) {
218 <<
"\nError: inconsistent length of cable list and input to PSB list.\n" 219 <<
"\n Can not define the mapping of GCT quadruplets to GT PSBs.\n" 225 std::vector<edm::ParameterSet> psbInput = parSet.
getParameter<std::vector<
235 for (std::vector<std::string>::const_iterator
236 it = boardList.begin(); it != boardList.end(); ++it) {
240 if ( (*it) ==
"GTFE" ) {
242 }
else if ( (*it) ==
"FDL" ) {
244 }
else if ( (*it) ==
"PSB" ) {
246 }
else if ( (*it) ==
"GMT" ) {
248 }
else if ( (*it) ==
"TCS" ) {
250 }
else if ( (*it) ==
"TIM" ) {
254 <<
"\nError: no such board: " << (*it).c_str() <<
"\n" 255 <<
"\n Can not define the mapping of the L1 GT boards. \n" 261 int iBoard = boardIndexVec.at(posVec);
281 int boardSlot = boardSlotMap.at(posVec);
290 if (boardType ==
PSB) {
297 for (std::vector<std::string>::const_iterator
298 cIt = cableList.begin(); cIt != cableList.end(); ++cIt) {
301 if ( *cIt ==
"TechTr" ) {
303 }
else if ( *cIt ==
"IsoEGQ" ) {
305 }
else if ( *cIt ==
"NoIsoEGQ" ) {
307 }
else if ( *cIt ==
"CenJetQ" ) {
309 }
else if ( *cIt ==
"ForJetQ" ) {
311 }
else if ( *cIt ==
"TauJetQ" ) {
313 }
else if ( *cIt ==
"ESumsQ" ) {
315 }
else if ( *cIt ==
"JetCountsQ" ) {
317 }
else if ( *cIt ==
"MQB1" ) {
319 }
else if ( *cIt ==
"MQB2" ) {
321 }
else if ( *cIt ==
"MQF3" ) {
323 }
else if ( *cIt ==
"MQF4" ) {
325 }
else if ( *cIt ==
"MQB5" ) {
327 }
else if ( *cIt ==
"MQB6" ) {
329 }
else if ( *cIt ==
"MQF7" ) {
331 }
else if ( *cIt ==
"MQF8" ) {
333 }
else if ( *cIt ==
"MQB9" ) {
335 }
else if ( *cIt ==
"MQB10" ) {
337 }
else if ( *cIt ==
"MQF11" ) {
339 }
else if ( *cIt ==
"MQF12" ) {
341 }
else if ( *cIt ==
"Free" ) {
343 }
else if ( *cIt ==
"HfQ" ) {
348 <<
"\nError: no such quadruplet: " << (*cIt).c_str() <<
"\n" 349 <<
"\n Can not define the mapping of quadruplets to the L1 PSB boards.\n" 353 int psbIndex = cableToPsbMap.at(posCable);
359 <<
"\nError: too many cables for PSB_" << gtBoard.
gtBoardIndex()
361 <<
"Can not define the mapping of cables to L1 PSB boards. \n" 365 quadVec[iPsb] = psbQuad;
376 if (boardType ==
PSB) {
378 std::map<int, std::vector<L1GtObject> > inputPsbChannels;
380 std::vector<std::string> chStrings;
381 chStrings.reserve(2);
383 std::vector<L1GtObject> chObjects;
385 for (std::vector<edm::ParameterSet>::const_iterator itPSet =
386 psbInput.begin(); itPSet != psbInput.end(); ++itPSet) {
389 int slot = itPSet->getParameter<
int> (
"Slot");
391 if (slot == boardSlot) {
392 chStrings = itPSet->getParameter<std::vector<std::string> > (
395 inputPsbChannels[0] = chObjects;
399 chStrings = itPSet->getParameter<std::vector<std::string> > (
402 inputPsbChannels[1] = chObjects;
406 chStrings = itPSet->getParameter<std::vector<std::string> > (
409 inputPsbChannels[2] = chObjects;
413 chStrings = itPSet->getParameter<std::vector<std::string> > (
416 inputPsbChannels[3] = chObjects;
420 chStrings = itPSet->getParameter<std::vector<std::string> > (
423 inputPsbChannels[4] = chObjects;
427 chStrings = itPSet->getParameter<std::vector<std::string> > (
430 inputPsbChannels[5] = chObjects;
434 chStrings = itPSet->getParameter<std::vector<std::string> > (
437 inputPsbChannels[6] = chObjects;
441 chStrings = itPSet->getParameter<std::vector<std::string> > (
444 inputPsbChannels[7] = chObjects;
478 auto pL1GtBoardMaps = std::make_unique<L1GtBoardMaps>();
482 return pL1GtBoardMaps ;
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
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 &)
L1GtPsbQuad
quadruples sent to GT via PSB
~L1GtBoardMapsTrivialProducer() override
destructor
std::unique_ptr< L1GtBoardMaps > produceBoardMaps(const L1GtBoardMapsRcd &)
public methods
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
static const int NumberCablesBoard
number of InfiniCables per board
void setGtQuadInPsb(const std::vector< L1GtPsbQuad > &)