|
ATLAS Offline Software
|
HLTUtils is renamed in r22 to HLTTEUtils.
More...
#include <HLTUtils.h>
|
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 HLTSequence * | buildSequence (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) |
|
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.
◆ allTEsProduced()
◆ allTEsProducedInEF()
std::set< std::string > TrigConf::HLTTEUtils::allTEsProducedInEF |
( |
const TrigConf::HLTFrame & |
frame, |
|
|
std::set< std::string > * |
l2tes = 0 |
|
) |
| |
|
static |
◆ allTEsProducedInEFChain()
Definition at line 297 of file TrigConfHLTData/Root/HLTUtils.cxx.
301 using std::set;
using std::string;
using std::vector;
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());
317 std::stringstream
str;
318 str <<
"TE " << *outTEIt <<
" is not produced by any sequence " << std::endl;
319 throw std::runtime_error(
str.str());
322 for(vector<HLTTriggerElement*>::const_iterator teIt =
seq->inputTEs().begin(); teIt !=
seq->inputTEs().end(); ++teIt)
330 for(
const string& te :
check)
◆ allTEsProducedInL2()
◆ allTEsProducedInL2Chain()
Definition at line 254 of file TrigConfHLTData/Root/HLTUtils.cxx.
257 using std::set;
using std::string;
using std::vector;
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());
273 std::stringstream
str;
274 str <<
"TE " << *outTEIt <<
" is not produced by any sequence " << std::endl;
275 throw std::runtime_error(
str.str());
278 for(vector<HLTTriggerElement*>::const_iterator teIt =
seq->inputTEs().begin(); teIt !=
seq->inputTEs().end(); ++teIt)
◆ allTEsProducedInLevel()
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
-
level | L2 or EF name of trigger level |
chainsList | list of configuration chains |
sequenceList | list 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.
120 set<unsigned int> outTEs;
122 if (
ch->level() !=
level )
continue;
125 outTEs.insert( te->hashId() );
130 std::vector<unsigned int> newTEs;
131 for(
unsigned int teId : outTEs )
133 copy(newTEs.begin(), newTEs.end(),inserter(outTEs,outTEs.begin()));
136 std::vector<unsigned int> tes;
137 copy(outTEs.begin(), outTEs.end(), inserter(tes,tes.begin()));
138 sort(tes.begin(), tes.end());
◆ buildSequence()
◆ ChainCondenseDisplay()
Definition at line 341 of file TrigConfHLTData/Root/HLTUtils.cxx.
349 std::string teCat(
"");
351 set<string> writtenOutput;
352 set<string> neededInput;
354 unsigned int currentSigPos = 1;
357 vector<HLTSignature*>::const_iterator sigIt =
signatures.begin();
359 unsigned int sigCounter = (*sigIt)->signature_counter();
360 while(sigCounter>currentSigPos) {
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 +=
",";
368 const std::string& outTEName((*teIt)->name());
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());
376 teCat +=
seq->concise();
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());
387 set<string> stillToWrite;
388 std::set_difference(neededInput.begin(),neededInput.end(),
389 writtenOutput.begin(),writtenOutput.end(),
390 std::inserter(stillToWrite,stillToWrite.begin()));
392 set<string> allStillToWrite(stillToWrite);
393 int ilevel = (
chain.level()==
"L2")?2:3;
394 for(
const string& te : stillToWrite)
399 const std::string& outTEName(*teIt);
402 if(!
first) {
first=
false; teCat =
"," + teCat; }
403 teCat =
seq->concise() + teCat;
◆ explicitChainTEs()
◆ implicitChainTEs()
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.
161 vector<string> newTes;
162 for(
const string&
teId : tes )
165 sort(tes.begin(), tes.end());
167 tes.erase(
l, tes.end());
◆ inputTEs()
returns set of input TEs for given set of TEs
Definition at line 230 of file TrigConfHLTData/Root/HLTUtils.cxx.
240 std::stringstream
str;
241 str <<
"TE " << *te <<
" is not produced by any sequence " << std::endl;
242 throw std::runtime_error(
str.str());
244 for(vector<HLTTriggerElement*>::const_iterator teIt =
seq->inputTEs().begin(); teIt !=
seq->inputTEs().end(); ++teIt)
◆ mergeHLTChainList()
Definition at line 462 of file TrigConfHLTData/Root/HLTUtils.cxx.
466 vector<HLTChain*> tmpL2chains;
467 vector<HLTChain*> tmpEFchains;
469 if (aChain->level() ==
"L2"){
470 tmpL2chains.push_back( aChain );
472 else if (aChain->level() ==
"EF"){
473 tmpEFchains.push_back( aChain );
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_");
495 (*cEF)->set_chain_name(cname);
497 (*cEF)->set_level(
"HLT");
498 (*cEF)->set_EB_after_step(0);
500 if ((*cL2)->chain_name() == (*cEF)->lower_chain_name()){
502 (*cEF)->signatureList().insert (
it,(*cL2)->signatureList().begin(),(*cL2)->signatureList().end());
504 for (
unsigned int sig=0;
sig < (*cEF)->signatureList().
size();
sig++){
505 (*cEF)->signatureList()[
sig ]->set_signature_counter(
sig + 1 );
508 (*cEF)->set_lower_chain_name((*cL2)->lower_chain_name());
509 (*cEF)->set_lower_chain_counter((*cL2)->lower_chain_counter());
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);
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);
524 (*cEF)->set_EB_after_step( (*cL2)->signatureList().size());
◆ mergeHLTChainList2()
Definition at line 559 of file TrigConfHLTData/Root/HLTUtils.cxx.
564 unsigned int lastL2step(0);
566 if(
chain->level_enum() !=
L2)
continue;
567 lastL2step =
max(lastL2step,
chain->lastStep());
577 vector<HLTChain*> newHLTchains;
579 if(
chain->level_enum() !=
EF )
continue;
584 newHLTchains.push_back(hltChain);
593 unsigned int basepos = (
oldname.compare(0,3,
"EF_")==0)?3:0;
613 vector<HLTSignature*> l2sig_deepcopy;
618 l2sig_deepcopy.begin(), l2sig_deepcopy.end());
◆ mergeL2EFPrescales()
◆ splitGroups()
std::vector< std::string > TrigConf::HLTTEUtils::splitGroups |
( |
const std::string & |
s | ) |
|
|
static |
Definition at line 411 of file TrigConfHLTData/Root/HLTUtils.cxx.
414 std::string::size_type currentOpen = 0;
416 std::vector< std::string >
result;
418 bool openParenthesis =
false;
419 for(std::string::size_type
pos = 0;
pos!=
s.size(); ++
pos) {
422 if(openParenthesis) {
423 std::stringstream
str;
424 str <<
"Two many open parenthesis in " <<
s << std::endl;
425 throw std::runtime_error(
str.str());
427 openParenthesis =
true;
431 if(!openParenthesis) {
432 std::stringstream
str;
433 str <<
"Two many closing parenthesis in " <<
s << std::endl;
434 throw std::runtime_error(
str.str());
436 openParenthesis =
false;
437 result.push_back(std::string(
s, currentOpen+1,
pos-currentOpen-1));
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
seq
filter configuration ## -> we use the special sequence 'AthMasterSeq' which is run before any other a...
void setName(const std::string &name)
static std::set< std::string > allTEsProducedInL2Chain(const TrigConf::HLTChain &chain, const TrigConf::HLTSequenceList &sequenceList)
HLTChain & set_lower_chain_counter(int lower_chain_counter)
static std::set< std::string > allTEsProducedInEF(const TrigConf::HLTFrame &frame, std::set< std::string > *l2tes=0)
HLTSequence * getSequence(unsigned int id) const
counts the number of sequences in the menu
HLTChain & set_EB_after_step(int EB_after_step)
const std::string & lower_chain_name() const
void recursivelyFindOutputTEs(const std::string &tename, const TrigConf::HLTSequenceList &sequenceList, std::set< std::string > &tes, int level, const std::set< std::string > *veto=0)
const std::vector< HLTSignature * > & signatures() const
HLT chain configuration information.
HLTChain & set_level(const std::string &level)
const HLTSequenceList & getHLTSequenceList() const
const accessor to the list of HLT sequences
std::vector< HLTSignature * > & signatureList()
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
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
HLTChain & set_lower_chain_name(const std::string &lower_chain_name)
static std::set< std::string > allTEsProducedInL2(const TrigConf::HLTFrame &frame)
int chain_counter() const
static std::vector< std::string > explicitChainTEs(const HLTChain &ch)
returns list of TEids which are specified by Chain signatures
HLT signature configuration information.
list of all HLT chains in a trigger menu
HLTChain * chain(const std::string &chainname) const
access the chain by name returns null-pointer if chain not found
void recursivelyFindInputTEs(unsigned int teId, const TrigConf::HLTSequenceList &seqList, std::vector< unsigned int > &tes)
bool addHLTChain(HLTChain *ch)
adds an HLTChain to the menu
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.
static void mergeL2EFPrescales(TrigConf::HLTChain *hltchain, const TrigConf::HLTPrescale &l2ps, const TrigConf::HLTPrescale &efps)
void shiftStepCounter(int shift)
HLT trigger element configuration information.
static std::set< std::string > allTEsProducedInEFChain(const TrigConf::HLTChain &chain, const TrigConf::HLTSequenceList &sequenceList, const std::set< std::string > &l2tes)
void recursivelyFindOutputTEsWithLevelFromSequence(const std::string &tename, const TrigConf::HLTSequenceList &sequenceList, std::set< std::string > &tes, int level)
std::vector< std::string > signatures(const std::string &chain)
HLTPrescale & setPrescale(float prescale)
DataModel_detail::iterator< DVL > unique(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of unique for DataVector/List.
std::vector< std::string > split(const std::string &line, const std::string &del=" ")
struct TrigConf::HLTChain::@215 mergeCounter
HLTChain & set_prescales(const HLTPrescale &prescales)
const HLTChainList & getHLTChainList() const
const accessor to the list of HLT chains
HLTPrescale & prescales()
int lower_chain_counter() const
HLTChainList & theHLTChainList()
accessor to the list of HLT chains
HLT sequence configuration information.