89 bool tracoLutsFromDB = p.
getParameter<
bool >(
"TracoLutsFromDB");
90 bool useBtiAcceptParam = p.
getParameter<
bool >(
"UseBtiAcceptParam");
126 using namespace edm::es;
137 cout <<
"ERROR code: please check!" << endl;
140 cout <<
"Empty DB: configurations has been read from cfg!" << endl;
143 cout <<
"Trivial : configurations has been read from cfg!" << endl;
146 cout <<
"Configurations successfully read from OMDS!" << endl;
148 std::auto_ptr<DTConfigManager> dtConfig = std::auto_ptr<DTConfigManager>(
m_manager );
155 using namespace edm::eventsetup;
161 int ndata = std::distance( ccb_conf->begin(), ccb_conf->end() );
170 cout << ccb_conf->version() << endl;
171 cout << ndata <<
" data in the container" << endl;
177 unsigned int currValidityStart =
iov.first().eventID().run();
178 unsigned int currValidityEnd =
iov.last( ).eventID().run();
181 cout <<
"valid since run " << currValidityStart
182 <<
" to run " << currValidityEnd << endl;
199 while ( iter != iend ) {
201 const DTCCBId& ccbId = iter->first;
203 cout <<
" Filling configuration for chamber : wh " << ccbId.
wheelId <<
" st "
205 << ccbId.
sectorId <<
" -> " << endl;
211 cout <<
"Chamber type : " << mbtype
212 <<
" posneg : " << posneg << endl;
216 const std::vector<int>& ccbConf = iter->second;
217 std::vector<int>::const_iterator cfgIter = ccbConf.begin();
218 std::vector<int>::const_iterator cfgIend = ccbConf.end();
221 unsigned short int tss_buffer[7][31];
222 unsigned short int tsm_buffer[9];
226 while ( cfgIter != cfgIend ) {
230 cout <<
" BRICK " <<
id << endl;
235 std::vector<std::string>
list;
239 cfgCache->getData( keyRecord,
id, list );
245 std::vector<std::string>::const_iterator s_iter = list.begin();
246 std::vector<std::string>::const_iterator s_iend = list.end();
247 while ( s_iter != s_iend ) {
250 cout <<
" ----> " << *s_iter << endl;
256 std::string str = *s_iter++;
257 unsigned short int buffer[100];
259 const char* cstr = str.c_str();
260 const char* ptr = cstr + 2;
261 const char*
end = cstr + str.length();
262 while ( ptr < end ) {
265 if ( ( c1 >=
'0' ) && ( c1 <=
'9' ) ) i1 = c1 -
'0';
266 if ( ( c1 >=
'a' ) && ( c1 <=
'f' ) ) i1 = 10 + c1 -
'a';
267 if ( ( c1 >=
'A' ) && ( c1 <=
'F' ) ) i1 = 10 + c1 -
'A';
270 if ( ( c2 >=
'0' ) && ( c2 <=
'9' ) ) i2 = c2 -
'0';
271 if ( ( c2 >=
'a' ) && ( c2 <=
'f' ) ) i2 = 10 + c2 -
'a';
272 if ( ( c2 >=
'A' ) && ( c2 <=
'F' ) ) i2 = 10 + c2 -
'A';
273 buffer[
c] = ( i1 * 16 ) + i2;
278 if (buffer[2]==0x54){
287 cout <<
"Not existing board ... " << brd << endl;
291 cout <<
"Not existing chip... " << chip << endl;
301 if (brd==6 || brd==7) {
305 else if ((brd<3 && chip<32) || (brd==3 && chip<8))
309 if (brd==6 || brd==7) {
313 else if (brd<4 && chip<32)
317 if (brd==6 || brd==7) {
321 else if (brd<5 && chip<32)
325 if (brd<6 && chip<32)
329 if (brd<3 && chip<32)
333 if (brd<5 && chip<32)
337 if (brd<4 && chip<32)
341 if (!PhiSL && !ThetaSL) {
342 cout <<
"MB type " << mbtype << endl;
343 cout <<
"Board " << brd <<
" chip " <<chip << endl;
344 cout <<
"Not phi SL nor Theta SL" << endl;
356 ibti=brd*16+(int)(chip/8)*4+(chip%4);
361 ibti=brd*32+ chip-4*(
int)(chip/8);
363 ibti=brd*32+ chip+12-4*(int)(chip/8);
373 cout <<
"Filling BTI config for chamber : wh " << chambid.
wheel() <<
374 ", st " << chambid.
station() <<
375 ", se " << chambid.
sector() <<
377 ", bti " << ibti+1 << endl;
381 if (buffer[2]==0x15){
386 int traco_brd = buffer[3];
387 int traco_chip = buffer[4];
388 int itraco = traco_brd * 4 + traco_chip + 1;
394 cout <<
"Filling TRACO config for chamber : wh " << chambid.
wheel() <<
395 ", st " << chambid.
station() <<
396 ", se " << chambid.
sector() <<
397 ", board " << traco_brd <<
398 ", chip " << traco_chip <<
399 ", traco " << itraco << endl;
404 if (buffer[2]==0x16){
408 unsigned short int itss=buffer[3];
409 for (
int i=0;
i<31;
i++)
410 tss_buffer[itss][
i]=buffer[
i];
415 if (buffer[2]==0x17){
419 for (
int i=0;
i<9;
i++)
420 tsm_buffer[
i]=buffer[
i];
424 if (buffer[2]==0xA8){
465 cout <<
"*** ATTENTION: Lut configuration parameters NOT found in OMDS:" << endl;
466 cout <<
"*** RE_RUN with the option TracoLutsFromDB = cms.bool(False)" << endl;
467 cout <<
"*** in L1TriggerConfig/DTTPGConfigProducers/python/L1DTConfigFromDB_cfi.py" << endl;
468 cout <<
"*** In this run LUTS are computed FROM GEOMETRY! " << endl;
482 int iwh = chambid.
wheel();
483 std::ostringstream os;
509 for (
int iwh=-2;iwh<=2;++iwh){
510 for (
int ist=1;ist<=4;++ist){
511 for (
int ise=1;ise<=12;++ise){
513 vector<int> nmap = conf_map.getUntrackedParameter<vector<int> >(
mapEntryName(chambid).c_str());
517 cout <<
" Filling configuration for chamber : wh " << chambid.
wheel() <<
518 ", st " << chambid.
station() <<
519 ", se " << chambid.
sector() << endl;
524 for (
int isl=1;isl<=3;isl++){
525 int ncell = nmap[isl-1];
527 for (
int ibti=0;ibti<ncell;ibti++){
530 cout <<
"Filling BTI config for chamber : wh " << chambid.
wheel() <<
531 ", st " << chambid.
station() <<
532 ", se " << chambid.
sector() <<
534 ", bti " << ibti+1 << endl;
541 int ntraco = nmap[3];
543 for (
int itraco=0;itraco<ntraco;itraco++){
546 cout <<
"Filling TRACO config for chamber : wh " << chambid.
wheel() <<
547 ", st " << chambid.
station() <<
548 ", se " << chambid.
sector() <<
549 ", traco " << itraco+1 << endl;
564 for (
int iwh=-2;iwh<=2;++iwh){
565 for (
int ise=13;ise<=14;++ise){
568 vector<int> nmap = conf_map.getUntrackedParameter<vector<int> >(
mapEntryName(chambid).c_str());
572 cout <<
" Filling configuration for chamber : wh " << chambid.
wheel() <<
573 ", st " << chambid.
station() <<
574 ", se " << chambid.
sector() << endl;
579 for (
int isl=1;isl<=3;isl++){
580 int ncell = nmap[isl-1];
582 for (
int ibti=0;ibti<ncell;ibti++){
585 cout <<
"Filling BTI config for chamber : wh " << chambid.
wheel() <<
586 ", st " << chambid.
station() <<
587 ", se " << chambid.
sector() <<
589 ", bti " << ibti+1 << endl;
596 int ntraco = nmap[3];
598 for (
int itraco=0;itraco<ntraco;itraco++){
601 cout <<
"Filling TRACO config for chamber : wh " << chambid.
wheel() <<
602 ", st " << chambid.
station() <<
603 ", se " << chambid.
sector() <<
604 ", traco " << itraco+1 << endl;
619 for (
int wh=-2;wh<=2;wh++)
620 for (
int se=1;se<=12;se++)
std::string mapEntryName(const DTChamberId &chambid) const
std::auto_ptr< DTConfigManager > produce(const DTConfigManagerRcd &)
void setLutFromDB(bool lutFromDB)
Set lut from DB flag.
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void setDTTPGDebug(bool debug)
SetGlobalDebug flag.
DTConfigManager * m_manager
void setDTConfigTSTheta(DTChamberId chambid, DTConfigTSTheta conf)
Set DTConfigTSTheta for desired chip.
ccb_config_map::const_iterator ccb_config_iterator
void setUseAcceptParam(bool acceptparam)
Set the use of Bti acceptance parameters (LL,LH,CL,CH,RL,RH)
void setDebug(bool debug)
Set debug flag.
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
DTConfigDBProducer(const edm::ParameterSet &)
void setDTConfigTraco(DTTracoId, DTConfigTraco)
Set DTConfigTraco for desired chip.
const DepRecordT & getRecord() const
const ValidityInterval & validityInterval() const
static int getPN(int whe, int sec, int sta)
void setDTConfigBti(DTBtiId, DTConfigBti)
Set DTConfigBti for desired chip.
void setDTConfigTSPhi(DTChamberId chambid, DTConfigTSPhi conf)
Set DTConfigTSPhi for desired chip.
std::vector< std::pair< DTCCBId, std::vector< int > > > ccb_config_map
void setDebug(bool debug)
Set debug flag.
void setDTConfigLUTs(DTChamberId chambid, DTConfigLUTs conf)
Set DTConfigLUTs for desired chamber.
static int getCT(int whe, int sec, int sta)
void setDTConfigSectColl(DTSectCollId sectcollid, DTConfigSectColl conf)
Set DTConfigSectColl for desired chip.
bool lutFromDB() const
Lut from DB flag.
void setDebug(bool debug)
Set single parameter functions.
int readDTCCBConfig(const DTConfigManagerRcd &iRecord)
static DTConfigAbstractHandler * getInstance()
get static object
int station() const
Return the station number.
void setDTConfigTrigUnit(DTChamberId chambid, DTConfigTrigUnit conf)
Set DTConfigTrigUnit for desired chamber.
int wheel() const
Return the wheel number.
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