ATLAS Offline Software
Static Public Member Functions | List of all members
TrigConf::HLTTEUtils Class Reference

HLTUtils is renamed in r22 to HLTTEUtils. More...

#include <HLTUtils.h>

Collaboration diagram for TrigConf::HLTTEUtils:

Static Public Member Functions

static std::vector< unsigned int > allTEsProducedInLevel (const std::string &level, const HLTChainList &chainList, const HLTSequenceList &sequenceList)
 returns list of TEids which can be poduced at given level (L2 or EF) in currecnt configuration More...
 
static std::vector< std::string > explicitChainTEs (const HLTChain &ch)
 returns list of TEids which are specified by Chain signatures More...
 
static std::vector< std::string > implicitChainTEs (const HLTChain &ch, const HLTSequenceList &sequenceList)
 returns list of TEids which are specified by Chain signatures and which are needed by this signatures More...
 
static std::set< std::string > inputTEs (const std::set< std::string > &TEs, const TrigConf::HLTSequenceList &sequenceList)
 returns set of input TEs for given set of TEs More...
 
static std::set< std::string > allTEsProducedInL2Chain (const TrigConf::HLTChain &chain, const TrigConf::HLTSequenceList &sequenceList)
 
static std::set< std::string > allTEsProducedInEFChain (const TrigConf::HLTChain &chain, const TrigConf::HLTSequenceList &sequenceList, const std::set< std::string > &l2tes)
 
static std::set< std::string > allTEsProducedInL2 (const TrigConf::HLTFrame &frame)
 
static std::set< std::string > allTEsProducedInEF (const TrigConf::HLTFrame &frame, std::set< std::string > *l2tes=0)
 
static std::set< std::string > allTEsProduced (const TrigConf::HLTFrame &frame)
 
static std::string ChainCondenseDisplay (const HLTChain &chain, const HLTFrame &frame)
 
static std::vector< std::string > splitGroups (const std::string &s)
 
static HLTSequencebuildSequence (const std::string &desc)
 
static void mergeHLTChainList (TrigConf::HLTFrame &frame)
 
static void mergeHLTChainList2 (TrigConf::HLTFrame &frame)
 
static void mergeL2EFPrescales (TrigConf::HLTChain *hltchain, const TrigConf::HLTPrescale &l2ps, const TrigConf::HLTPrescale &efps)
 

Detailed Description

HLTUtils is renamed in r22 to HLTTEUtils.

The hashing functionality remains in HLTUtils, which moves to the standalone HLTUtils package

Definition at line 26 of file TrigConfHLTData/TrigConfHLTData/HLTUtils.h.

Member Function Documentation

◆ allTEsProduced()

std::set< std::string > TrigConf::HLTTEUtils::allTEsProduced ( const TrigConf::HLTFrame frame)
static

Definition at line 211 of file TrigConfHLTData/Root/HLTUtils.cxx.

212 {
213  using std::set; using std::string; using std::vector;
214 
215  set<string> tes = allTEsProducedInL2( frame );
216  set<string> eftes = allTEsProducedInEF( frame, &tes );
217 
218  std::copy(eftes.begin(),eftes.end(),
219  std::inserter(tes,tes.begin()));
220  return tes;
221 }

◆ allTEsProducedInEF()

std::set< std::string > TrigConf::HLTTEUtils::allTEsProducedInEF ( const TrigConf::HLTFrame frame,
std::set< std::string > *  l2tes = 0 
)
static

Definition at line 191 of file TrigConfHLTData/Root/HLTUtils.cxx.

193 {
194  const HLTChainList& chainList = frame.getHLTChainList();
195  const HLTSequenceList& sequenceList = frame.getHLTSequenceList();
196 
197  set<string> level2TEs = l2tes?*l2tes:allTEsProducedInL2(frame);
198 
199  set<string> eftes;
200  for( HLTChain* chain : chainList ) {
201  if ( chain->level() == "L2" ) continue;
202  set<string> tes = allTEsProducedInEFChain( *chain, sequenceList, level2TEs);
203  copy(tes.begin(), tes.end(), std::inserter(eftes,eftes.begin()));
204  }
205  return eftes;
206 }

◆ allTEsProducedInEFChain()

std::set< std::string > TrigConf::HLTTEUtils::allTEsProducedInEFChain ( const TrigConf::HLTChain chain,
const TrigConf::HLTSequenceList sequenceList,
const std::set< std::string > &  l2tes 
)
static

Definition at line 297 of file TrigConfHLTData/Root/HLTUtils.cxx.

300 {
301  using std::set; using std::string; using std::vector;
302 
303  set<string> eftes;
304  // explicitly produced TEs
305  const vector< HLTSignature * >& sigVec = chain.signatureList();
306  for ( vector< HLTSignature * >::const_iterator sig = sigVec.begin(); sig != sigVec.end(); ++sig ) {
307  const vector< HLTTriggerElement * >& teVec = (*sig)->outputTEs();
308  for ( vector< HLTTriggerElement * >::const_iterator te = teVec.begin(); te != teVec.end(); ++te)
309  eftes.insert((*te)->name());
310  }
311 
312  // get the input TEs
313  set<string> inputTEs;
314  for(set<string>::iterator outTEIt = eftes.begin(); outTEIt != eftes.end(); ++outTEIt) {
315  TrigConf::HLTSequence* seq = sequenceList.getSequence(*outTEIt);
316  if(seq==0) {
317  std::stringstream str;
318  str << "TE " << *outTEIt << " is not produced by any sequence " << std::endl;
319  throw std::runtime_error(str.str());
320  }
321  seq->setEF();
322  for(vector<HLTTriggerElement*>::const_iterator teIt = seq->inputTEs().begin(); teIt != seq->inputTEs().end(); ++teIt)
323  inputTEs.insert((*teIt)->name());
324  }
325 
326  // still to check
327  set<string> check;
328  std::set_difference(inputTEs.begin(),inputTEs.end(), eftes.begin(), eftes.end(), std::inserter(check,check.begin()));
329 
330  for(const string& te : check)
331  recursivelyFindOutputTEs( te, sequenceList, eftes, 3, &l2tes );
332 
333  return eftes;
334 }

◆ allTEsProducedInL2()

std::set< std::string > TrigConf::HLTTEUtils::allTEsProducedInL2 ( const TrigConf::HLTFrame frame)
static

Definition at line 174 of file TrigConfHLTData/Root/HLTUtils.cxx.

174  {
175 
176  const HLTChainList& chainList = frame.getHLTChainList();
177  const HLTSequenceList& sequenceList = frame.getHLTSequenceList();
178 
179  set<string> l2tes;
180  for( HLTChain* chain : chainList ) {
181  if ( chain->level() == "EF" ) continue;
182  set<string> tes = allTEsProducedInL2Chain( *chain, sequenceList);
183  copy(tes.begin(), tes.end(), std::inserter(l2tes,l2tes.begin()));
184  }
185  return l2tes;
186 }

◆ allTEsProducedInL2Chain()

std::set< std::string > TrigConf::HLTTEUtils::allTEsProducedInL2Chain ( const TrigConf::HLTChain chain,
const TrigConf::HLTSequenceList sequenceList 
)
static

Definition at line 254 of file TrigConfHLTData/Root/HLTUtils.cxx.

256 {
257  using std::set; using std::string; using std::vector;
258 
259  set<string> l2tes;
260  // explicitly produced TEs
261  const vector< HLTSignature * >& sigVec = chain.signatureList();
262  for ( vector< HLTSignature * >::const_iterator sig = sigVec.begin(); sig != sigVec.end(); ++sig ) {
263  const vector< HLTTriggerElement * >& teVec = (*sig)->outputTEs();
264  for ( vector< HLTTriggerElement * >::const_iterator te = teVec.begin(); te != teVec.end(); ++te)
265  l2tes.insert((*te)->name());
266  }
267 
268  // get the input TEs
269  set<string> inputTEs;
270  for(set<string>::iterator outTEIt = l2tes.begin(); outTEIt != l2tes.end(); ++outTEIt) {
271  TrigConf::HLTSequence* seq = sequenceList.getSequence(*outTEIt);
272  if(seq==0) {
273  std::stringstream str;
274  str << "TE " << *outTEIt << " is not produced by any sequence " << std::endl;
275  throw std::runtime_error(str.str());
276  }
277  seq->setL2();
278  for(vector<HLTTriggerElement*>::const_iterator teIt = seq->inputTEs().begin(); teIt != seq->inputTEs().end(); ++teIt)
279  inputTEs.insert((*teIt)->name());
280  }
281 
282  // still to check
283  set<string> check;
284  std::set_difference(inputTEs.begin(),inputTEs.end(), l2tes.begin(),l2tes.end(), std::inserter(check,check.begin()));
285 
286  for(set<string>::iterator teIt = check.begin(); teIt != check.end(); ++teIt)
287  recursivelyFindOutputTEs( *teIt, sequenceList, l2tes, 2 );
288 
289  return l2tes;
290 }

◆ allTEsProducedInLevel()

std::vector< unsigned int > HLTTEUtils::allTEsProducedInLevel ( const std::string &  level,
const HLTChainList chainList,
const HLTSequenceList sequenceList 
)
static

returns list of TEids which can be poduced at given level (L2 or EF) in currecnt configuration

Warning
this method is dooing quite extensive menu inspection so it should not be executed to often ...
Parameters
levelL2 or EF name of trigger level
chainsListlist of configuration chains
sequenceListlist of configuration sequences
Returns
list of TE ids which according to the given configuration will be produced at level

Definition at line 115 of file TrigConfHLTData/Root/HLTUtils.cxx.

117  {
118 
119 
120  set<unsigned int> outTEs;
121  for( HLTChain* ch : chainList) {
122  if ( ch->level() != level ) continue;
123  for( HLTSignature* sig : ch->signatureList() ) {
124  for( HLTTriggerElement* te : sig->outputTEs() )
125  outTEs.insert( te->hashId() );
126  }
127  }
128  // we have now big list of TEs mentioned in chains ... what with this which are not mentioned
129  // but are executed because recursion in sequences
130  std::vector<unsigned int> newTEs;
131  for( unsigned int teId : outTEs )
132  recursivelyFindInputTEs(teId, sequenceList, newTEs);
133  copy(newTEs.begin(), newTEs.end(),inserter(outTEs,outTEs.begin()));
134 
135  // now turn into vector and order (unnecessary) but I don't want to break the interface
136  std::vector<unsigned int> tes;
137  copy(outTEs.begin(), outTEs.end(), inserter(tes,tes.begin()));
138  sort(tes.begin(), tes.end());
139  return tes;
140 }

◆ buildSequence()

TrigConf::HLTSequence * TrigConf::HLTTEUtils::buildSequence ( const std::string &  desc)
static

Definition at line 444 of file TrigConfHLTData/Root/HLTUtils.cxx.

445 {
446  // builds a sequence from a string "inputTE1,inputTE2,outputTE", (can be just "outputTE")
447  std::vector<std::string> tes = TrigConf::split(desc,",");
448 
449  vector<TrigConf::HLTTriggerElement*> input;
450  for(std::vector<std::string>::iterator teit = tes.begin(); teit!=tes.end(); ++teit) {
451  input.push_back(new TrigConf::HLTTriggerElement(0,*teit));
452  }
453  TrigConf::HLTTriggerElement* outte = input.back(); input.pop_back();
454 
455  TrigConf::HLTSequence* seq = new TrigConf::HLTSequence( input, outte, vector<string>());
456 
457  return seq;
458 }

◆ ChainCondenseDisplay()

std::string TrigConf::HLTTEUtils::ChainCondenseDisplay ( const HLTChain chain,
const HLTFrame frame 
)
static

Definition at line 341 of file TrigConfHLTData/Root/HLTUtils.cxx.

343 {
344  using std::string; using std::set; using std::vector; using TrigConf::HLTTriggerElement;
346 
347  const HLTSequenceList& sequenceList = frame.getHLTSequenceList();
348 
349  std::string teCat("");
350 
351  set<string> writtenOutput;
352  set<string> neededInput;
353 
354  unsigned int currentSigPos = 1;
355 
356  const vector<HLTSignature*> & signatures = chain.signatureList();
357  vector<HLTSignature*>::const_iterator sigIt = signatures.begin();
358  for(; sigIt!=signatures.end(); ++sigIt) {
359  unsigned int sigCounter = (*sigIt)->signature_counter();
360  while(sigCounter>currentSigPos) {
361  teCat +=";"; // separate signature by ';'
362  currentSigPos++;
363  }
364  const vector<HLTTriggerElement*> & outputTEs = (*sigIt)->outputTEs();
365  vector<HLTTriggerElement*>::const_iterator teIt = outputTEs.begin();
366  for(;teIt!=outputTEs.end();++teIt) {
367  if(teIt!=outputTEs.begin()) teCat +=","; // separate sequences by ','
368  const std::string& outTEName((*teIt)->name());
369  const TrigConf::HLTSequence* seq = sequenceList.getSequence(outTEName);
370  if(seq==0) {
371  std::stringstream str;
372  str << "Chain " << chain.chain_name() << " at step " << sigCounter
373  << " requires TE " << outTEName << ", which is not produced by any sequence " << std::endl;
374  throw std::runtime_error(str.str());
375  }
376  teCat += seq->concise();
377 
378  // store info about input and output TE's
379  for(vector<HLTTriggerElement*>::const_iterator teIt = seq->inputTEs().begin(); teIt != seq->inputTEs().end(); ++teIt)
380  neededInput.insert((*teIt)->name());
381  writtenOutput.insert(seq->outputTE()->name());
382  }
383  }
384 
385  teCat = "|" + teCat;
386 
387  set<string> stillToWrite;
388  std::set_difference(neededInput.begin(),neededInput.end(),
389  writtenOutput.begin(),writtenOutput.end(),
390  std::inserter(stillToWrite,stillToWrite.begin()));
391 
392  set<string> allStillToWrite(stillToWrite);
393  int ilevel = (chain.level()=="L2")?2:3;
394  for( const string& te : stillToWrite)
395  recursivelyFindOutputTEsWithLevelFromSequence( te, sequenceList, allStillToWrite, ilevel );
396 
397  bool first=true;
398  for(set<string>::iterator teIt = allStillToWrite.begin(); teIt != allStillToWrite.end(); ++teIt) {
399  const std::string& outTEName(*teIt);
400  const TrigConf::HLTSequence* seq = sequenceList.getSequence(outTEName);
401  if(seq==0) continue;
402  if(!first) { first=false; teCat = "," + teCat; } // separate sequences by ',' // TODO careful not to change COOL format JS
403  teCat = seq->concise() + teCat;
404  }
405  return teCat;
406 }

◆ explicitChainTEs()

vector< string > HLTTEUtils::explicitChainTEs ( const HLTChain ch)
static

returns list of TEids which are specified by Chain signatures

Definition at line 144 of file TrigConfHLTData/Root/HLTUtils.cxx.

144  {
145  vector<string> tes;
146  for( HLTSignature* sig : ch.signatureList() ) {
147  for( HLTTriggerElement* te : sig->outputTEs() )
148  tes.push_back( te->name() );
149  }
150  sort(tes.begin(), tes.end());
151  std::vector<std::string>::iterator l = unique(tes.begin(), tes.end());
152  tes.erase(l, tes.end());
153  return tes;
154 }

◆ implicitChainTEs()

std::vector< std::string > HLTTEUtils::implicitChainTEs ( const HLTChain ch,
const HLTSequenceList sequenceList 
)
static

returns list of TEids which are specified by Chain signatures and which are needed by this signatures

Definition at line 158 of file TrigConfHLTData/Root/HLTUtils.cxx.

158  {
159  vector<string> tes = explicitChainTEs(ch);
160 
161  vector<string> newTes;
162  for(const string& teId : tes )
163  recursivelyFindInputTEs(teId, sequenceList, newTes);
164 
165  sort(tes.begin(), tes.end());
166  vector<string>::iterator l = unique(tes.begin(), tes.end());
167  tes.erase(l, tes.end());
168  return tes;
169 }

◆ inputTEs()

std::set< std::string > TrigConf::HLTTEUtils::inputTEs ( const std::set< std::string > &  TEs,
const TrigConf::HLTSequenceList sequenceList 
)
static

returns set of input TEs for given set of TEs

Definition at line 230 of file TrigConfHLTData/Root/HLTUtils.cxx.

231  {
232 
233  using std::set; using std::string;
234 
235  // get the input TEs
236  set<string> inputTEs;
237  for(set<string>::iterator te = TEs.begin(); te != TEs.end(); ++te) {
238  const TrigConf::HLTSequence* seq = sequenceList.getSequence(*te);
239  if(seq==0) {
240  std::stringstream str;
241  str << "TE " << *te << " is not produced by any sequence " << std::endl;
242  throw std::runtime_error(str.str());
243  }
244  for(vector<HLTTriggerElement*>::const_iterator teIt = seq->inputTEs().begin(); teIt != seq->inputTEs().end(); ++teIt)
245  inputTEs.insert((*teIt)->name());
246  }
247  return inputTEs;
248 }

◆ mergeHLTChainList()

void TrigConf::HLTTEUtils::mergeHLTChainList ( TrigConf::HLTFrame frame)
static

Definition at line 462 of file TrigConfHLTData/Root/HLTUtils.cxx.

462  {
463 
464  if(! frame.mergedHLT()) return;
465 
466  vector<HLTChain*> tmpL2chains;
467  vector<HLTChain*> tmpEFchains;
468  for( TrigConf::HLTChain* aChain : frame.theHLTChainList() ){
469  if (aChain->level() == "L2"){
470  tmpL2chains.push_back( aChain ); //add in the tmp list
471  }
472  else if (aChain->level() == "EF"){
473  tmpEFchains.push_back( aChain ); //add in the tmp list
474  }
475  }
476  //delete the current chainlist content
477  frame.theHLTChainList().clear();
478 
479  // for ( vector<HLTChain*>::iterator aChain = frame.getHLTChainList().begin(); aChain != frame.getHLTChainList().end(); ) {
480  // if ((*aChain)->level() == "L2"){
481  // tmpL2chains.push_back( *aChain ); //add in the tmp list
482  // frame.getHLTChainList().chains().erase(aChain); // erase L2 chains pointers
483  // }
484  // else aChain++; //iterate if not erase
485  // }
486 
487 
488  for ( vector<HLTChain*>::iterator cEF = tmpEFchains.begin(); cEF != tmpEFchains.end(); ++cEF ) {
489  // for ( vector<HLTChain*>::iterator cEF = frame.getHLTChainList().begin(); cEF != frame.getHLTChainList().end(); ++cEF ) {
490  // iterator of the signature list
491  std::vector<TrigConf::HLTSignature*>::iterator it = (*cEF)->signatureList().begin();
492  string cname = (*cEF)->chain_name();
493  if ( size_t index = ((*cEF)->chain_name().find("EF_")) != std::string::npos ){
494  cname.replace(index-1, 3, "HLT_");// why index must be scaled by 1 ?
495  (*cEF)->set_chain_name(cname);
496  }
497  (*cEF)->set_level("HLT");
498  (*cEF)->set_EB_after_step(0);//in case EF chain is not seeded by any L2 chain
499  for ( vector<HLTChain*>::iterator cL2 = tmpL2chains.begin(); cL2 != tmpL2chains.end(); ++cL2 ) {
500  if ((*cL2)->chain_name() == (*cEF)->lower_chain_name()){
501  // insert the L2 signatures:
502  (*cEF)->signatureList().insert (it,(*cL2)->signatureList().begin(),(*cL2)->signatureList().end()); // add the L2 signatures, before EF
503  // update the EF signature counters
504  for (unsigned int sig=0; sig < (*cEF)->signatureList().size(); sig++){
505  (*cEF)->signatureList()[ sig ]->set_signature_counter( sig + 1 );
506  }
507  // set the lower chain name as the L2 lower
508  (*cEF)->set_lower_chain_name((*cL2)->lower_chain_name());
509  (*cEF)->set_lower_chain_counter((*cL2)->lower_chain_counter());
510  // set the prescales, rerun_prescales and pass_through
511  int prescale(0);
512  if ((*cL2)->prescale()==-1. || (*cEF)->prescale()==-1.) prescale=-1.;
513  else prescale=(*cL2)->prescale()*(*cEF)->prescale();
514  (*cEF)->set_prescale(prescale);
515  int rerun_prescale(0);
516  if (((*cL2)->rerun_prescale("")).second<0 || ((*cEF)->rerun_prescale("")).second<0) rerun_prescale=-1.;
517  else rerun_prescale=((*cL2)->rerun_prescale("")).second * ((*cEF)->rerun_prescale("")).second;
518  (*cEF)->set_rerun_prescale(rerun_prescale);
519  int pass_through(0);
520  if ((*cL2)->pass_through()==-1. || (*cEF)->pass_through()==-1.) pass_through=-1.;
521  else pass_through=(*cL2)->pass_through()*(*cEF)->pass_through();
522  (*cEF)->set_pass_through(pass_through);
523  // add the EB_after_step
524  (*cEF)->set_EB_after_step( (*cL2)->signatureList().size());
525  /* std::cout << "FPP: changed name to " << (*cEF)->chain_name()
526  << " level to " << (*cEF)->level()
527  << "; set lower_chain_name to " << (*cEF)->lower_chain_name()
528  << "; set EB_after_step=" << (*cEF)->EB_after_step()
529  << "; set prescale=" << (*cEF)->prescale()
530  << "; set rerun_prescale=" << (*cEF)->rerun_prescale()
531  << "; set pass_through=" << (*cEF)->pass_through()
532  << "; added signatures tot=" << (*cEF)->signatureList().size()<< std::endl; */
533  break;
534  }
535  }
536  frame.theHLTChainList().addHLTChain(*cEF);
537  }
538 
539  //std::cout<<"FPP HLTUtils::mergeHLTChains(): frame.getHLTChainList().chains().size()="<<frame.getHLTChainList().size()<<std::endl;
540  return;
541 }

◆ mergeHLTChainList2()

void TrigConf::HLTTEUtils::mergeHLTChainList2 ( TrigConf::HLTFrame frame)
static

Definition at line 559 of file TrigConfHLTData/Root/HLTUtils.cxx.

559  {
560 
561  if(! frame.mergedHLT()) return;
562 
563  // we need to keep the steps in sync so first we find the last step in L2
564  unsigned int lastL2step(0);
565  for( TrigConf::HLTChain* chain : frame.getHLTChainList() ) {
566  if(chain->level_enum() != L2) continue;
567  lastL2step = max(lastL2step, chain->lastStep());
568  }
569 
570  // now make copies of all EF chains, the steps are
571  // 1. make a deep copy of all EF chains
572  // 2. give them level HLT and modify the name
573  // 3. insert the signatures (deep copies) of the matching L2 chains at the front
574  // 4. set the input L1Item condition
575  // 5. merge the prescales, streams
576 
577  vector<HLTChain*> newHLTchains;
578  for( TrigConf::HLTChain* chain : frame.getHLTChainList() ) {
579  if( chain->level_enum() != EF ) continue;
580 
581 
582  // make the copy (deep copy of all signatures and output TEs)
583  HLTChain * hltChain = new HLTChain(*chain);
584  newHLTchains.push_back(hltChain);
585 
586  // keep track of chain counters (for correct prescale merging)
587  hltChain->mergeCounter.ef = hltChain->chain_counter();
588 
589  // set the name and level to HLT
590  // if name starts with EF_ it is replace with HLT_, otherwise HLT_ is prepended
591  hltChain->set_level("HLT");
592  string oldname = chain->name();
593  unsigned int basepos = (oldname.compare(0,3,"EF_")==0)?3:0;
594  hltChain->setName( "HLT_" + oldname.substr(basepos) );
595 
596 
597  hltChain->set_EB_after_step(0); //in case EF chain is not seeded by any L2 chain
598 
599  // shift the step counters of by +lastL2Step (note that there is no step=0)
600  hltChain->shiftStepCounter(lastL2step);
601 
602 
603  // find the lower chain
604  const HLTChain * l2Chain = frame.getHLTChainList().chain( hltChain->lower_chain_name() );
605 
606  // if no seeding l2 chain is found, nothing needs to be done
607  if(l2Chain) {
608 
609  hltChain->mergeCounter.l2 = l2Chain->chain_counter();
610 
611  // insert l2 steps at the beginning
612  // first need to create a deep copy
613  vector<HLTSignature*> l2sig_deepcopy;
614  for(HLTSignature* sig : l2Chain->signatures())
615  l2sig_deepcopy.push_back(new HLTSignature(*sig));
616 
617  hltChain->signatureList().insert( hltChain->signatureList().begin(),
618  l2sig_deepcopy.begin(), l2sig_deepcopy.end());
619 
620  // set L1 input
621  hltChain->set_lower_chain_name( l2Chain->lower_chain_name() );
622  hltChain->set_lower_chain_counter( l2Chain->lower_chain_counter() );
623 
624  // set the EB start after old L2 chain
625  hltChain->set_EB_after_step( l2Chain->signatureList().size());
626 
627  // set prescales, pass throughs, rerun prescales, stream prescales
628 
629  // prescale (product of L2 and EF, disabled if either were disabled)
630 
631  mergeL2EFPrescales(hltChain, l2Chain->prescales(), hltChain->prescales());
632 // bool disabled = l2Chain->prescale()<0 || hltChain->prescale()<0;
633 // float prescale = l2Chain->prescale() * hltChain->prescale();
634 // prescale = fabs(prescale) * (disabled?-1:1);
635 // hltChain->prescales().setPrescale(prescale);
636  }
637 
638  // TODO: rerun prescales, streams,
639  // int rerun_prescale(0);
640  // if (((*cL2)->rerun_prescale("")).second<0 || ((*cEF)->rerun_prescale("")).second<0) rerun_prescale=-1.;
641  // else rerun_prescale=((*cL2)->rerun_prescale("")).second * ((*cEF)->rerun_prescale("")).second;
642  // (*cEF)->set_rerun_prescale(rerun_prescale);
643  // int pass_through(0);
644  // if ((*cL2)->pass_through()==-1. || (*cEF)->pass_through()==-1.) pass_through=-1.;
645  // else pass_through=(*cL2)->pass_through()*(*cEF)->pass_through();
646  // (*cEF)->set_pass_through(pass_through);
647  // // add the EB_after_step
648  // (*cEF)->set_EB_after_step( (*cL2)->signatureList().size());
649 
650  // TODO deal with L2-only chains
651 
652  }
653 
654  // delete the current chainlist content
655  frame.theHLTChainList().clear();
656 
657  // and add the new chains
658  for( HLTChain* chain : newHLTchains )
660 
661  return;
662 }

◆ mergeL2EFPrescales()

void TrigConf::HLTTEUtils::mergeL2EFPrescales ( TrigConf::HLTChain hltchain,
const TrigConf::HLTPrescale l2ps,
const TrigConf::HLTPrescale efps 
)
static

Definition at line 547 of file TrigConfHLTData/Root/HLTUtils.cxx.

547  {
548  HLTPrescale hltps;
549 
550  bool disabled = l2ps.disabled() || efps.disabled();
551 
552  float prescale = fabs( l2ps.prescale() * efps.prescale() ) * (disabled?-1:1);
553  hltps.setPrescale(prescale);
554 
555  hltchain->set_prescales(hltps);
556 }

◆ splitGroups()

std::vector< std::string > TrigConf::HLTTEUtils::splitGroups ( const std::string &  s)
static

Definition at line 411 of file TrigConfHLTData/Root/HLTUtils.cxx.

412 {
413  // turns "(str1),(str2),(str3)" into ["str1", "str2", "str3"]
414  std::string::size_type currentOpen = 0;
415 
416  std::vector< std::string > result;
417 
418  bool openParenthesis = false;
419  for(std::string::size_type pos = 0; pos!=s.size(); ++pos) {
420  char cc = s[pos];
421  if(cc=='(') {
422  if(openParenthesis) {
423  std::stringstream str;
424  str << "Two many open parenthesis in " << s << std::endl;
425  throw std::runtime_error(str.str());
426  }
427  openParenthesis = true;
428  currentOpen = pos;
429  }
430  if(cc==')') {
431  if(!openParenthesis) {
432  std::stringstream str;
433  str << "Two many closing parenthesis in " << s << std::endl;
434  throw std::runtime_error(str.str());
435  }
436  openParenthesis = false;
437  result.push_back(std::string(s, currentOpen+1, pos-currentOpen-1));
438  }
439  }
440  return result;
441 }

The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
test_athena_ntuple_filter.seq
seq
filter configuration ## -> we use the special sequence 'AthMasterSeq' which is run before any other a...
Definition: test_athena_ntuple_filter.py:18
TrigConf::TrigConfData::setName
void setName(const std::string &name)
Definition: TrigConfData.h:30
TrigConf::HLTPrescale
Definition: HLTPrescale.h:26
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
TrigConf::HLTTEUtils::allTEsProducedInL2Chain
static std::set< std::string > allTEsProducedInL2Chain(const TrigConf::HLTChain &chain, const TrigConf::HLTSequenceList &sequenceList)
Definition: TrigConfHLTData/Root/HLTUtils.cxx:254
TrigConf::HLTChain::set_lower_chain_counter
HLTChain & set_lower_chain_counter(int lower_chain_counter)
Definition: TrigConfHLTData/TrigConfHLTData/HLTChain.h:97
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
get_generator_info.result
result
Definition: get_generator_info.py:21
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
TrigConf::L2
@ L2
Definition: HLTLevel.h:12
TrigConf::HLTTEUtils::allTEsProducedInEF
static std::set< std::string > allTEsProducedInEF(const TrigConf::HLTFrame &frame, std::set< std::string > *l2tes=0)
Definition: TrigConfHLTData/Root/HLTUtils.cxx:191
index
Definition: index.py:1
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
TrigConf::HLTSequenceList::getSequence
HLTSequence * getSequence(unsigned int id) const
counts the number of sequences in the menu
Definition: HLTSequenceList.cxx:45
xAOD::teId
teId
Definition: L2StandAloneMuon_v1.cxx:323
TrigConf::HLTChain::set_EB_after_step
HLTChain & set_EB_after_step(int EB_after_step)
Definition: TrigConfHLTData/TrigConfHLTData/HLTChain.h:102
TrigConf::HLTChain::lower_chain_name
const std::string & lower_chain_name() const
Definition: TrigConfHLTData/TrigConfHLTData/HLTChain.h:77
TrigConf::recursivelyFindOutputTEs
void recursivelyFindOutputTEs(const std::string &tename, const TrigConf::HLTSequenceList &sequenceList, std::set< std::string > &tes, int level, const std::set< std::string > *veto=0)
Definition: TrigConfHLTData/Root/HLTUtils.cxx:66
skel.it
it
Definition: skel.GENtoEVGEN.py:396
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
TrigConf::HLTChain::signatures
const std::vector< HLTSignature * > & signatures() const
Definition: TrigConfHLTData/TrigConfHLTData/HLTChain.h:109
TrigConf::HLTChain
HLT chain configuration information.
Definition: TrigConfHLTData/TrigConfHLTData/HLTChain.h:35
TrigConf::HLTChain::set_level
HLTChain & set_level(const std::string &level)
Definition: TrigConfHLTData/TrigConfHLTData/HLTChain.h:95
TrigConf::HLTFrame::getHLTSequenceList
const HLTSequenceList & getHLTSequenceList() const
const accessor to the list of HLT sequences
Definition: HLTFrame.h:50
TrigConf::HLTChain::signatureList
std::vector< HLTSignature * > & signatureList()
Definition: TrigConfHLTData/TrigConfHLTData/HLTChain.h:107
trigbs_dumpPrescaleBits.HLTChain
HLTChain
Definition: trigbs_dumpPrescaleBits.py:41
std::sort
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:554
TrigConf::HLTChain::l2
unsigned int l2
Definition: TrigConfHLTData/TrigConfHLTData/HLTChain.h:195
TrigConf::HLTTEUtils::inputTEs
static std::set< std::string > inputTEs(const std::set< std::string > &TEs, const TrigConf::HLTSequenceList &sequenceList)
returns set of input TEs for given set of TEs
Definition: TrigConfHLTData/Root/HLTUtils.cxx:230
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
TrigConf::HLTChain::set_lower_chain_name
HLTChain & set_lower_chain_name(const std::string &lower_chain_name)
Definition: TrigConfHLTData/Root/HLTChain.cxx:154
TrigConf::HLTTEUtils::allTEsProducedInL2
static std::set< std::string > allTEsProducedInL2(const TrigConf::HLTFrame &frame)
Definition: TrigConfHLTData/Root/HLTUtils.cxx:174
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
TrigConf::HLTChain::chain_counter
int chain_counter() const
Definition: TrigConfHLTData/TrigConfHLTData/HLTChain.h:73
TrigConf::HLTTEUtils::explicitChainTEs
static std::vector< std::string > explicitChainTEs(const HLTChain &ch)
returns list of TEids which are specified by Chain signatures
Definition: TrigConfHLTData/Root/HLTUtils.cxx:144
TrigConf::HLTSignature
HLT signature configuration information.
Definition: HLTSignature.h:29
CaloCondBlobAlgs_fillNoiseFromASCII.desc
desc
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:54
TrigConf::EF
@ EF
Definition: HLTLevel.h:12
TrigConf::HLTPrescale::disabled
bool disabled() const
Definition: HLTPrescale.h:59
TrigConf::HLTChainList
list of all HLT chains in a trigger menu
Definition: HLTChainList.h:56
TrigConf::HLTChain::ef
unsigned int ef
Definition: TrigConfHLTData/TrigConfHLTData/HLTChain.h:196
TrigConf::HLTChainList::chain
HLTChain * chain(const std::string &chainname) const
access the chain by name returns null-pointer if chain not found
Definition: HLTChainList.cxx:52
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
python.BuildSignatureFlags.sig
sig
Definition: BuildSignatureFlags.py:218
SCT_Monitoring::disabled
@ disabled
Definition: SCT_MonitoringNumbers.h:60
recursivelyFindInputTEs
void recursivelyFindInputTEs(unsigned int teId, const TrigConf::HLTSequenceList &seqList, std::vector< unsigned int > &tes)
Definition: TrigConfHLTData/Root/HLTUtils.cxx:44
TrigConf::HLTChainList::addHLTChain
bool addHLTChain(HLTChain *ch)
adds an HLTChain to the menu
Definition: HLTChainList.cxx:42
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
TrigConf::HLTTEUtils::mergeL2EFPrescales
static void mergeL2EFPrescales(TrigConf::HLTChain *hltchain, const TrigConf::HLTPrescale &l2ps, const TrigConf::HLTPrescale &efps)
Definition: TrigConfHLTData/Root/HLTUtils.cxx:547
TrigConf::HLTChain::shiftStepCounter
void shiftStepCounter(int shift)
Definition: TrigConfHLTData/Root/HLTChain.cxx:175
TrigConf::HLTChainList::clear
void clear()
Definition: HLTChainList.cxx:34
TrigConf::HLTTriggerElement
HLT trigger element configuration information.
Definition: HLTTriggerElement.h:26
TrigConf::HLTTEUtils::allTEsProducedInEFChain
static std::set< std::string > allTEsProducedInEFChain(const TrigConf::HLTChain &chain, const TrigConf::HLTSequenceList &sequenceList, const std::set< std::string > &l2tes)
Definition: TrigConfHLTData/Root/HLTUtils.cxx:297
TrigConf::recursivelyFindOutputTEsWithLevelFromSequence
void recursivelyFindOutputTEsWithLevelFromSequence(const std::string &tename, const TrigConf::HLTSequenceList &sequenceList, std::set< std::string > &tes, int level)
Definition: TrigConfHLTData/Root/HLTUtils.cxx:86
ChainNameParser::signatures
std::vector< std::string > signatures(const std::string &chain)
Definition: ChainNameParser.cxx:210
LArNewCalib_Delay_OFC_Cali.check
check
Definition: LArNewCalib_Delay_OFC_Cali.py:267
TrigConf::HLTPrescale::setPrescale
HLTPrescale & setPrescale(float prescale)
Definition: HLTPrescale.h:46
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
std::unique
DataModel_detail::iterator< DVL > unique(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of unique for DataVector/List.
Definition: DVL_algorithms.h:135
TrigConf::split
std::vector< std::string > split(const std::string &line, const std::string &del=" ")
Definition: Trigger/TrigConfiguration/TrigConfL1Data/Root/HelperFunctions.cxx:27
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
TrigConf::HLTChain::mergeCounter
struct TrigConf::HLTChain::@215 mergeCounter
TrigConf::HLTChain::set_prescales
HLTChain & set_prescales(const HLTPrescale &prescales)
Definition: TrigConfHLTData/Root/HLTChain.cxx:207
DeMoScan.first
bool first
Definition: DeMoScan.py:536
TrigConf::HLTFrame::getHLTChainList
const HLTChainList & getHLTChainList() const
const accessor to the list of HLT chains
Definition: HLTFrame.h:49
TrigConf::HLTPrescale::prescale
float prescale() const
Definition: HLTPrescale.h:52
TrigConf::HLTChain::prescales
HLTPrescale & prescales()
Definition: TrigConfHLTData/TrigConfHLTData/HLTChain.h:139
str
Definition: BTagTrackIpAccessor.cxx:11
TrigConf::HLTChain::lower_chain_counter
int lower_chain_counter() const
Definition: TrigConfHLTData/TrigConfHLTData/HLTChain.h:78
calibdata.copy
bool copy
Definition: calibdata.py:27
TrigConf::HLTFrame::theHLTChainList
HLTChainList & theHLTChainList()
accessor to the list of HLT chains
Definition: HLTFrame.h:44
python.handimod.cc
int cc
Definition: handimod.py:523
TrigConf::HLTFrame::mergedHLT
bool mergedHLT() const
Definition: HLTFrame.h:53
TrigConf::HLTSequence
HLT sequence configuration information.
Definition: HLTSequence.h:28
TrigConf::HLTSequenceList
list of HLT sequences
Definition: HLTSequenceList.h:40
createCoolChannelIdFile.oldname
oldname
Definition: createCoolChannelIdFile.py:105