|
|
Go to the documentation of this file.
127 cfgConfig =
p.getParameter<
bool>(
"cfgConfig");
143 m_UseT0 =
p.getParameter<
bool>(
"UseT0");
162 std::unique_ptr<DTConfigManager> dtConfig = std::unique_ptr<DTConfigManager>(
new DTConfigManager());
193 }
else if (code == 2) {
194 LogVerbatim(
"DTTPG") <<
"DTConfigDBProducer::produce : Trivial : " << endl
195 <<
"configurations has been read from cfg" << endl;
196 }
else if (code == 0) {
197 LogVerbatim(
"DTTPG") <<
"DTConfigDBProducer::produce : " << endl
198 <<
"Configurations successfully read from OMDS" << endl;
200 LogProblem(
"DTTPG") <<
"DTConfigDBProducer::produce : " << endl <<
"Wrong configuration return CODE" << endl;
219 pedestals.
setES(&dttpgParams);
233 int check_cfg_code = 0;
236 for (
int iwh = -2; iwh <= 2; iwh++) {
237 for (
int ise = 1; ise <= 12; ise++) {
238 for (
int ist = 1; ist <= 4; ist++) {
249 if ((ist == 1 && nbti != 168) || (ist == 2 && nbti != 192) || (ist == 3 && nbti != 224) ||
251 (ise == 1 || ise == 2 || ise == 3 || ise == 5 || ise == 6 || ise == 7 || ise == 8 || ise == 12) &&
253 (ist == 4 && (ise == 9 || ise == 11) && nbti != 96) || (ist == 4 && ise == 10 && nbti != 128) ||
254 (ist == 4 && ise == 4 && nbti != 160)) {
256 return check_cfg_code;
260 if ((ist == 1 && ntraco != 13) || (ist == 2 && ntraco != 16) || (ist == 3 && ntraco != 20) ||
262 (ise == 1 || ise == 2 || ise == 3 || ise == 5 || ise == 6 || ise == 7 || ise == 8 || ise == 12) &&
264 (ist == 4 && (ise == 9 || ise == 11) && ntraco != 12) || (ist == 4 && ise == 10 && ntraco != 16) ||
265 (ist == 4 && ise == 4 && ntraco != 20)) {
267 return check_cfg_code;
271 if ((ist == 1 && ntss != 4) || (ist == 2 && ntss != 4) || (ist == 3 && ntss != 5) ||
273 (ise == 1 || ise == 2 || ise == 3 || ise == 5 || ise == 6 || ise == 7 || ise == 8 || ise == 12) &&
275 (ist == 4 && (ise == 9 || ise == 11) && ntss != 3) || (ist == 4 && ise == 10 && ntss != 4) ||
276 (ist == 4 && ise == 4 && ntss != 5)) {
278 return check_cfg_code;
284 return check_cfg_code;
297 for (
int ise = 13; ise <= 14; ise++) {
305 if ((ise == 13 && nbti != 160) || (ise == 14 && nbti != 128)) {
307 return check_cfg_code;
309 if ((ise == 13 && ntraco != 20) || (ise == 14 && ntraco != 16)) {
311 return check_cfg_code;
313 if ((ise == 13 && ntss != 5) || (ise == 14 && ntss != 4)) {
315 return check_cfg_code;
319 return check_cfg_code;
332 return check_cfg_code;
348 cout << ccb_conf.version() << endl;
349 cout << ndata <<
" data in the container" << endl;
354 unsigned int currValidityEnd = iov.last().eventID().run();
357 cout <<
"valid since run " << currValidityStart <<
" to run " << currValidityEnd << endl;
373 if (ccb_conf.configKeyMap().size() != 250)
379 while (iter != iend) {
389 const DTCCBId &ccbId = iter->first;
391 cout <<
" Filling configuration for chamber : wh " << ccbId.
wheelId <<
" st " << ccbId.
stationId <<
" se "
392 << ccbId.
sectorId <<
" -> " << endl;
398 cout <<
"Chamber type : " << mbtype <<
" posneg : " << posneg << endl;
402 const std::vector<int> &ccbConf = iter->second;
403 std::vector<int>::const_iterator cfgIter = ccbConf.begin();
404 std::vector<int>::const_iterator cfgIend = ccbConf.end();
407 unsigned short int tss_buffer[7][31];
408 unsigned short int tsm_buffer[9];
412 while (cfgIter != cfgIend) {
416 cout <<
" BRICK " <<
id << endl;
419 std::vector<std::string>
list;
424 std::vector<std::string>::const_iterator s_iter =
list.begin();
425 std::vector<std::string>::const_iterator s_iend =
list.end();
426 while (s_iter != s_iend) {
428 cout <<
" ----> " << *s_iter << endl;
432 unsigned short int buffer[100];
434 const char *cstr =
str.c_str();
435 const char *ptr = cstr + 2;
436 const char *
end = cstr +
str.length();
440 if ((
c1 >=
'0') && (
c1 <=
'9'))
442 if ((
c1 >=
'a') && (
c1 <=
'f'))
444 if ((
c1 >=
'A') && (
c1 <=
'F'))
448 if ((c2 >=
'0') && (c2 <=
'9'))
450 if ((c2 >=
'a') && (c2 <=
'f'))
452 if ((c2 >=
'A') && (c2 <=
'F'))
461 cout <<
"BTI STRING found in DB" << endl;
471 cout <<
"Not existing board ... " << brd << endl;
475 cout <<
"Not existing chip... " << chip << endl;
485 if (brd == 6 || brd == 7) {
488 }
else if ((brd < 3 && chip < 32) || (brd == 3 && chip < 8))
492 if (brd == 6 || brd == 7) {
495 }
else if (brd < 4 && chip < 32)
499 if (brd == 6 || brd == 7) {
502 }
else if (brd < 5 && chip < 32)
506 if (brd < 6 && chip < 32)
510 if (brd < 3 && chip < 32)
514 if (brd < 5 && chip < 32)
518 if (brd < 4 && chip < 32)
522 if (!PhiSL && !ThetaSL) {
523 cout <<
"MB type " << mbtype << endl;
524 cout <<
"Board " << brd <<
" chip " << chip << endl;
525 cout <<
"Not phi SL nor Theta SL" << endl;
537 ibti = brd * 16 + (
int)(chip / 8) * 4 + (chip % 4);
538 }
else if (ThetaSL) {
541 ibti = brd * 32 + chip - 4 * (
int)(chip / 8);
543 ibti = brd * 32 + chip + 12 - 4 * (
int)(chip / 8);
552 cout <<
"Filling BTI config for chamber : wh " << chambid.
wheel() <<
", st " << chambid.
station() <<
", se "
553 << chambid.
sector() <<
"... sl " << isl <<
", bti " << ibti + 1 << endl;
559 cout <<
"TRACO STRING found in DB" << endl;
564 int traco_brd =
buffer[3];
565 int traco_chip =
buffer[4];
566 int itraco = traco_brd * 4 + traco_chip + 1;
571 cout <<
"Filling TRACO config for chamber : wh " << chambid.
wheel() <<
", st " << chambid.
station()
572 <<
", se " << chambid.
sector() <<
", board " << traco_brd <<
", chip " << traco_chip <<
", traco "
579 cout <<
"TSS STRING found in DB" << endl;
583 unsigned short int itss =
buffer[3];
584 for (
int i = 0;
i < 31;
i++)
592 cout <<
"TSM STRING found in DB" << endl;
597 for (
int i = 0;
i < 9;
i++)
604 cout <<
"LUT STRING found in DB" << endl;
659 int iwh = chambid.
wheel();
660 std::ostringstream os;
688 for (
int iwh = -2; iwh <= 2; ++iwh) {
689 for (
int ist = 1; ist <= 4; ++ist) {
690 for (
int ise = 1; ise <= 12; ++ise) {
692 vector<int> nmap = conf_map.getUntrackedParameter<vector<int>>(
mapEntryName(chambid).c_str());
695 cout <<
" Filling configuration for chamber : wh " << chambid.
wheel() <<
", st " << chambid.
station()
696 <<
", se " << chambid.
sector() << endl;
701 for (
int isl = 1; isl <= 3; isl++) {
702 int ncell = nmap[isl - 1];
704 for (
int ibti = 0; ibti < ncell; ibti++) {
707 cout <<
"Filling BTI config for chamber : wh " << chambid.
wheel() <<
", st " << chambid.
station()
708 <<
", se " << chambid.
sector() <<
"... sl " << isl <<
", bti " << ibti + 1 << endl;
715 int ntraco = nmap[3];
717 for (
int itraco = 0; itraco < ntraco; itraco++) {
720 cout <<
"Filling TRACO config for chamber : wh " << chambid.
wheel() <<
", st " << chambid.
station()
721 <<
", se " << chambid.
sector() <<
", traco " << itraco + 1 << endl;
735 for (
int iwh = -2; iwh <= 2; ++iwh) {
736 for (
int ise = 13; ise <= 14; ++ise) {
739 vector<int> nmap = conf_map.getUntrackedParameter<vector<int>>(
mapEntryName(chambid).c_str());
742 cout <<
" Filling configuration for chamber : wh " << chambid.
wheel() <<
", st " << chambid.
station() <<
", se "
743 << chambid.
sector() << endl;
748 for (
int isl = 1; isl <= 3; isl++) {
749 int ncell = nmap[isl - 1];
751 for (
int ibti = 0; ibti < ncell; ibti++) {
754 cout <<
"Filling BTI config for chamber : wh " << chambid.
wheel() <<
", st " << chambid.
station()
755 <<
", se " << chambid.
sector() <<
"... sl " << isl <<
", bti " << ibti + 1 << endl;
762 int ntraco = nmap[3];
764 for (
int itraco = 0; itraco < ntraco; itraco++) {
767 cout <<
"Filling TRACO config for chamber : wh " << chambid.
wheel() <<
", st " << chambid.
station()
768 <<
", se " << chambid.
sector() <<
", traco " << itraco + 1 << endl;
782 for (
int wh = -2; wh <= 2; wh++)
783 for (
int se = 1; se <= 12; se++)
799 cout <<
"DTConfigTrivialProducer::buildPedestals()" << endl;
802 for (
int iwh = -2; iwh <= 2; ++iwh) {
803 for (
int ist = 1; ist <= 4; ++ist) {
804 for (
int ise = 1; ise <= 14; ++ise) {
805 if (ise > 12 && ist != 4)
816 tpgPedestals.
setES(m_tpgParams);
const DepRecordT getRecord() const
int set(int wheelId, int stationId, int sectorId, int nc, float ph, DTTimeUnits::type unit)
edm::ESGetToken< DTCCBConfig, DTCCBConfigRcd > m_ccb_confToken
std::vector< std::pair< DTCCBId, std::vector< int > > > ccb_config_map
void configFromCfg(DTConfigManager &dttpgConfig)
SV for debugging purpose ONLY.
int nValidTSS() const
Number of correctly configured TSS.
edm::ESGetToken< cond::persistency::KeyList, DTKeyedConfigListRcd > m_keyListToken
bool lutFromDB() const
Lut from DB flag.
void setDTConfigLUTs(DTChamberId chambid, DTConfigLUTs conf)
Set DTConfigLUTs for desired chamber.
void getData(const cond::persistency::KeyList &keyList, int cfgId, std::vector< std::string > &list)
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
std::unique_ptr< DTConfigManager > produce(const DTConfigManagerRcd &)
ES produce method.
void setDTConfigPedestals(DTConfigPedestals pedestals)
Set DTConfigPedestals configuration.
const IOVSyncValue & first() const
std::string mapEntryName(const DTChamberId &chambid) const
void setDebug(bool debug)
Set debug flag.
T getUntrackedParameter(std::string const &, T const &) const
void setES(DTTPGParameters const *tpgParams, DTT0 const *t0Params=nullptr)
Set parameters from ES.
edm::ESGetToken< DTT0, DTT0Rcd > m_t0iToken
void setDTConfigTSTheta(DTChamberId chambid, DTConfigTSTheta conf)
Set DTConfigTSTheta for desired chip.
void setDTConfigTSPhi(DTChamberId chambid, DTConfigTSPhi conf)
Set DTConfigTSPhi for desired chip.
void setDTConfigTrigUnit(DTChamberId chambid, DTConfigTrigUnit conf)
Set DTConfigTrigUnit for desired chamber.
void setDTTPGDebug(bool debug)
SetGlobalDebug flag.
void setUseAcceptParam(bool acceptparam)
Set the use of Bti acceptance parameters (LL,LH,CL,CH,RL,RH)
void setUseT0(bool useT0)
Set t0i subtraction.
void readDBPedestalsConfig(const DTConfigManagerRcd &iRecord, DTConfigManager &dttpgConfig)
Read DTTPG pedestal configuration.
const std::map< DTBtiId, DTConfigBti > & getDTConfigBtiMap(DTChamberId) const
Get desired BTI configuration map for a given DTChamber.
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
void setDTConfigTraco(DTTracoId, DTConfigTraco)
Set DTConfigTraco for desired chip.
void setDTConfigBti(DTBtiId, DTConfigBti)
Set DTConfigBti for desired chip.
void setDebug(bool debug)
Set debug flag.
void setLutFromDB(bool lutFromDB)
Set lut from DB flag.
static int getCT(int whe, int sec, int sta)
const EventID & eventID() const
int checkDTCCBConfig(DTConfigManager &dttpgConfig)
110629 SV function for CCB configuration check
static int getPN(int whe, int sec, int sta)
~DTConfigDBProducer() override
Destructor.
void setDTConfigSectColl(DTSectCollId sectcollid, DTConfigSectColl conf)
Set DTConfigSectColl for desired chip.
edm::ESGetToken< DTTPGParameters, DTTPGParametersRcd > m_dttpgParamsToken
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
T getParameter(std::string const &) const
const std::map< DTTracoId, DTConfigTraco > & getDTConfigTracoMap(DTChamberId) const
Get desired TRACO configuration map for a given DTChamber.
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
DTConfigDBProducer(const edm::ParameterSet &)
Constructor.
void setCCBConfigValidity(bool CCBValid)
Set the flag for CCB configuration validity.
DTConfigPedestals buildTrivialPedestals()
SV for debugging purpose ONLY.
int readDTCCBConfig(const DTConfigManagerRcd &iRecord, DTConfigManager &dttpgConfig)
Read CCB string configuration.
int nValidTSM() const
Number of correctly configured TSS.
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*", "!HLTx*" if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL. It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of "!*" before the partial wildcard feature was incorporated). Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
const DTConfigTSPhi * getDTConfigTSPhi(DTChamberId) const
Get desired Trigger Server Phi configuration.
ValidityInterval validityInterval() const
ccb_config_map::const_iterator ccb_config_iterator
int wheel() const
Return the wheel number.
int station() const
Return the station number.
void setDebug(bool debug)
Set debug flag.
DTKeyedConfigCache cfgCache