ATLAS Offline Software
Loading...
Searching...
No Matches
TCS::TopoSteering Class Reference

#include <TopoSteering.h>

Inheritance diagram for TCS::TopoSteering:
Collaboration diagram for TCS::TopoSteering:

Public Member Functions

 TopoSteering ()
const TopoSteeringStructurestructure () const
TopoInputEventinputEvent ()
const TopoCoreSimResultsimulationResult () const
StatusCode setupFromConfiguration ATLAS_NOT_THREAD_SAFE (const TrigConf::L1Menu &l1menu)
void setUseBitwise (bool useBitwise)
StatusCode initializeAlgorithms ()
StatusCode executeEvent ()
StatusCode executeTrigger (const std::string &triggerName)
StatusCode reset ()
void printDebugInfo ()
const TCS::ParameterSpaceparameters (const std::string &algName) const
const std::vector< TCS::Connector * > & connectors () const
void printConfiguration (std::ostream &o) const
void setMsgLevel (TrigConf::MSGTC::Level lvl)
void setAlgMsgLevel (TrigConf::MSGTC::Level lvl)
void setLegacyMode (bool isLegacyTopo)
StatusCode setHistSvc (std::shared_ptr< IL1TopoHistSvc > histSvc)
 enables the histogramming service
StatusCode saveHist ()
void setHardwareBits (const std::bitset< numberOfL1TopoBits > &triggerBits, const std::bitset< numberOfL1TopoBits > &ovrflowBits)
 cache the decision/overflow bits from hardware These bits are propagated to the algorithms with propagateHardwareBitsToAlgos.
void propagateHardwareBitsToAlgos ()
 propagate the bits from hardware to each simulated decision algo.
void setOutputAlgosFillBasedOnHardware (const bool &value)
 tell output algos to fill accept/reject histos based on hdw decision.
void setOutputAlgosSkipHistograms (const bool &value)
 skip filling the histos
bool msgLvl (const MSGTC::Level lvl) const
 Test the output level.
MsgStreamTC & msg () const
 The standard message stream.
MsgStreamTC & msg (const MSGTC::Level lvl) const
 The standard message stream.
const std::string & getName () const
 name accessor

Static Public Attributes

static const unsigned int numberOfL1TopoBits = 128

Private Member Functions

StatusCode executeConnector (TCS::Connector *conn)
StatusCode executeInputConnector (TCS::InputConnector *conn)
StatusCode executeSortingConnector (TCS::SortingConnector *conn)
StatusCode executeDecisionConnector (TCS::DecisionConnector *conn)
StatusCode executeCountingConnector (TCS::CountingConnector *conn)
StatusCode executeAlgorithm (ConfigurableAlg *alg, Connector *connector)
StatusCode executeSortingAlgorithm (SortingAlg *alg, TCS::InputConnector *inputConnector, TOBArray *&output)
StatusCode executeDecisionAlgorithm (TCS::DecisionAlg *alg, const std::vector< Connector * > &inputConnectors, const std::vector< TCS::TOBArray * > &output, Decision &decsion)
StatusCode executeCountingAlgorithm (TCS::CountingAlg *alg, TCS::InputConnector *inputConnector, Count &count)

Private Attributes

bool m_useBitwise {false}
bool m_isLegacyTopo {false}
TopoInputEvent m_inputEvent
TopoCoreSimResult m_simulationResult
TopoSteeringStructure m_structure
unsigned int m_evtCounter {1}
TrigConf::MSGTC::Level m_AlgMsgLvl { TrigConf::MSGTC::WARNING }
std::shared_ptr< IL1TopoHistSvcm_histSvc
std::bitset< numberOfL1TopoBitsm_triggerHdwBits
std::bitset< numberOfL1TopoBitsm_ovrflowHdwBits
boost::thread_specific_ptr< MsgStreamTC > m_msg_tls
 MsgStreamTC instance (a std::cout like with print-out levels)
std::string m_name

Detailed Description

Definition at line 47 of file TopoSteering.h.

Constructor & Destructor Documentation

◆ TopoSteering()

TopoSteering::TopoSteering ( )

Definition at line 38 of file TopoSteering.cxx.

38 :
39 TrigConfMessaging("TopoSteering")
40{}

Member Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

StatusCode setupFromConfiguration TCS::TopoSteering::ATLAS_NOT_THREAD_SAFE ( const TrigConf::L1Menu & l1menu)

◆ connectors()

const std::vector< TCS::Connector * > & TCS::TopoSteering::connectors ( ) const
inline

Definition at line 84 of file TopoSteering.h.

84{ return structure().connectors(); } //added
const std::vector< TCS::Connector * > & connectors() const
const TopoSteeringStructure & structure() const

◆ executeAlgorithm()

StatusCode TCS::TopoSteering::executeAlgorithm ( ConfigurableAlg * alg,
Connector * connector )
private

◆ executeConnector()

TCS::StatusCode TopoSteering::executeConnector ( TCS::Connector * conn)
private

Definition at line 191 of file TopoSteering.cxx.

191 {
192
193 if (conn == NULL) {
195 }
196
197 // caching
198 if(conn->isExecuted())
199 return conn->executionStatusCode();
200
201 TCS::StatusCode sc(TCS::StatusCode::SUCCESS);
202
203 if(conn->isInputConnector()) {
204 //TRG_MSG_DEBUG(" ... executing input connector '" << conn->name() << "'");
205 sc = executeInputConnector(dynamic_cast<InputConnector*>(conn));
206 } else if(conn->isSortingConnector()) {
207 //TRG_MSG_DEBUG(" ... executing sorting connector '" << conn->name() << "'");
208 sc = executeSortingConnector(dynamic_cast<SortingConnector*>(conn));
209 } else if(conn->isDecisionConnector()){
210 //TRG_MSG_DEBUG(" ... executing decision connector '" << conn->name() << "'");
211 sc = executeDecisionConnector(dynamic_cast<DecisionConnector*>(conn));
212 } else if(conn->isCountingConnector()){
213 sc = executeCountingConnector(dynamic_cast<CountingConnector*>(conn));
214 }
215
216 conn->setIsExecuted(true);
217 conn->setExecutionStatusCode(sc);
218
219 return sc;
220}
static Double_t sc
StatusCode executeSortingConnector(TCS::SortingConnector *conn)
StatusCode executeDecisionConnector(TCS::DecisionConnector *conn)
StatusCode executeInputConnector(TCS::InputConnector *conn)
StatusCode executeCountingConnector(TCS::CountingConnector *conn)

◆ executeCountingAlgorithm()

TCS::StatusCode TopoSteering::executeCountingAlgorithm ( TCS::CountingAlg * alg,
TCS::InputConnector * inputConnector,
TCS::Count & count )
private

Definition at line 430 of file TopoSteering.cxx.

432 {
433
434 TRG_MSG_DEBUG(" ... executing multiplicity alg '" <<alg->fullname() << "'");
435
436 const InputTOBArray * input = inputConnector->outputData();
437
438 alg->process( *input, count);
439
441}
const InputTOBArray * outputData() const
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146

◆ executeCountingConnector()

TCS::StatusCode TopoSteering::executeCountingConnector ( TCS::CountingConnector * conn)
private

Definition at line 338 of file TopoSteering.cxx.

338 {
339
340 if (conn == NULL) {
342 }
343
344 TCS::StatusCode sc = TCS::StatusCode::SUCCESS;
345
346 // execute all the prior connectors
347 for( TCS::Connector* inputConn: conn->inputConnectors() ){
348 sc &= executeConnector(inputConn);
349 conn->toggleInputOverflow(conn->hasInputOverflow() ||
350 inputConn->hasInputOverflow());
351 }
352
353 // execute
354 TCS::CountingAlg* alg = conn->countingAlgorithm();
355
356 // Execute algorithm with no output data - not needed for now
357 //coverity[USELESS_CALL:FALSE]
358 sc &= executeCountingAlgorithm(alg, conn->inputConnector(), conn->m_count);
359
360 conn->setIsExecuted(true);
361 conn->setExecutionStatusCode(sc);
362
363 // TO-DO overflows in multiplicity algorithms
364
365 return sc;
366}
StatusCode executeConnector(TCS::Connector *conn)
StatusCode executeCountingAlgorithm(TCS::CountingAlg *alg, TCS::InputConnector *inputConnector, Count &count)

◆ executeDecisionAlgorithm()

TCS::StatusCode TopoSteering::executeDecisionAlgorithm ( TCS::DecisionAlg * alg,
const std::vector< Connector * > & inputConnectors,
const std::vector< TCS::TOBArray * > & output,
TCS::Decision & decision )
private

Definition at line 389 of file TopoSteering.cxx.

392 {
393
394 TRG_MSG_DEBUG(" ... executing decision alg '" << alg->fullname() << "'"
395 <<(m_useBitwise?" (bitwise)":""));
396
397 if(inputConnectors.size()<1) {
398 TCS_EXCEPTION("L1Topo Steering: Decision algorithm expects at least 1 input array but got 0");
399 }
400
401 std::vector<TCS::TOBArray const *> input; // needs to be optimized
402 for(const Connector* inConn: inputConnectors)
403 {
404 if (inConn == nullptr) continue;
405 const SortingConnector * sc = dynamic_cast<const SortingConnector *>(inConn);
406 if (sc==nullptr) {
407 TCS_EXCEPTION("L1Topo Steering: Decision algorithm " << alg->name() << " could not cast as SortingConnector* the input connector " << inConn->name());
408 }
409 else {
410 const TOBArray * tobA = dynamic_cast<const TOBArray *>( sc->outputData());
411 if(tobA==nullptr) {
412 TCS_EXCEPTION("L1Topo Steering: Decision algorithm " << alg->name() << " expects TOBArray(s) as input, but did not get it from connector " << (inConn ? inConn->name() : ""));
413 }
414 input.push_back( tobA );
415 }
416 }
417
418 alg->reset();
419
420
421 if(m_useBitwise) alg->processBitCorrect( input, output, decision);
422 else alg->process( input, output, decision );
423 //TRG_MSG_ALWAYS("[XS1234sz]L1Topo Steering alg " << alg->name() << " has decision " << decision.decision());
424
426}

◆ executeDecisionConnector()

TCS::StatusCode TopoSteering::executeDecisionConnector ( TCS::DecisionConnector * conn)
private

Definition at line 280 of file TopoSteering.cxx.

280 {
281
282 if (conn == NULL) {
284 }
285
286 TCS::StatusCode sc = TCS::StatusCode::SUCCESS;
287
288 // execute all the prior connectors
289 for( TCS::Connector* inputConn: conn->inputConnectors() ){
290 sc &= executeConnector(inputConn);
291 conn->toggleInputOverflow(conn->hasInputOverflow() ||
292 inputConn->hasInputOverflow());
293 conn->toggleAmbiguity(conn->hasAmbiguity() ||
294 inputConn->hasAmbiguity());
295 }
296 // execute
297 TCS::DecisionAlg* alg = conn->decisionAlgorithm();
298
299 // TRG_MSG_DEBUG(" ... executing decision connector '" << conn->name() << "' with " << conn->triggers().size() << " active trigger lines. The algorithm has " << alg->numberOutputBits() << " output bits.");
300
301 // the output is one TOBArray per output line
302 vector<TOBArray *> output( alg->numberOutputBits() );
303
304 for(unsigned int i=0; i<alg->numberOutputBits(); ++i) {
305 output[i] = new TOBArray(conn->triggers()[i].name());
306 output[i]->setAmbiguityFlag(conn->hasAmbiguity());
307 }
308 //coverity[USELESS_CALL:FALSE]
309 sc &= executeDecisionAlgorithm(alg, conn->inputConnectors(), output, conn->m_decision);
310
311 TRG_MSG_DEBUG(" ... executing decision connector '" << conn->name() << "' -> attaching output data:");
312 for(TOBArray const * outarr : output) {
313 TRG_MSG_DEBUG(" data '" << outarr->name() << "' of size " << outarr->size());
314 conn->toggleAmbiguity(conn->hasAmbiguity() || outarr->ambiguityFlag());
315 }
316
317 conn->attachOutputData(output);
318
319 conn->setIsExecuted(true);
320 conn->setExecutionStatusCode(sc);
321 bool sortOverflow = false;
322 for(TCS::Connector* inputConnector: conn->inputConnectors()) {
323 // TODO DG-2017-04-18 the sort overflow (>10 TOBs) in the SortAlg is not implemented yet
324 if(inputConnector->isSortingConnector()) {
325 if (auto sortConn = dynamic_cast<SortingConnector*>(inputConnector)) {
326 sortOverflow = sortConn->sortingAlgorithm()->overflow();
327 if (sortOverflow) break;
328 }
329 }
330 }
331 conn->m_decision.setOverflow(conn->hasInputOverflow() || sortOverflow);
332 conn->m_decision.setAmbiguity(conn->hasAmbiguity());
333 return sc;
334}
StatusCode executeDecisionAlgorithm(TCS::DecisionAlg *alg, const std::vector< Connector * > &inputConnectors, const std::vector< TCS::TOBArray * > &output, Decision &decsion)
output
Definition merge.py:16

◆ executeEvent()

TCS::StatusCode TopoSteering::executeEvent ( )

Definition at line 134 of file TopoSteering.cxx.

134 {
135
136
137 TRG_MSG_INFO("L1 TopoSteering: start executing event " << m_evtCounter << "-----------------------------------");
138
139
140 if( ! structure().isConfigured() ) {
141 TRG_MSG_INFO("L1Topo Steering has not been configured, can't run");
142 TCS_EXCEPTION("L1Topo Steering has not been configured, can't run");
143 }
144
145 inputEvent().print();
146
147 // execute all connectors
148 TCS::StatusCode sc = TCS::StatusCode::SUCCESS;
149 TRG_MSG_INFO("Going to execute " << m_structure.outputConnectors().size() << " decision connectors and " << m_structure.countConnectors().size() << " multiplicity connectors.");
150 for(const auto & [name, pConnector]: m_structure.outputConnectors()) {
151 TRG_MSG_INFO("executing trigger line " << name);
152 sc |= executeConnector(pConnector);
153 TRG_MSG_INFO("result of trigger line " << name << " : " << pConnector->decision().decision());
154 }
155
156 for(const auto & [name, pConnector]: m_structure.countConnectors()) {
157 TRG_MSG_INFO("executing trigger line " << name);
158 sc |= executeConnector(pConnector);
159 }
160 //coverity[USELESS_CALL:FALSE]
161 sc |= m_simulationResult.collectResult();
162
163 m_simulationResult.globalOutput().print();
164
165 TRG_MSG_INFO("finished executing event " << m_evtCounter++);
167}
TopoSteeringStructure m_structure
TopoInputEvent & inputEvent()
unsigned int m_evtCounter
TopoCoreSimResult m_simulationResult

◆ executeInputConnector()

TCS::StatusCode TopoSteering::executeInputConnector ( TCS::InputConnector * conn)
private

Definition at line 225 of file TopoSteering.cxx.

225 {
226
227 if (conn == NULL) {
229 }
230
231 TCS::StatusCode sc(TCS::StatusCode::SUCCESS);
232
233 // attaching data from inputEvent to input connector, depending on the configured input type
234
235 const InputTOBArray * inputData = inputEvent().inputTOBs( conn->inputTOBType() );
236 const bool hasInputOverflow = inputEvent().hasInputOverflow(conn->inputTOBType());
237 conn->attachOutputData( inputData );
238 conn->toggleInputOverflow(hasInputOverflow);
239
240 TRG_MSG_DEBUG(" ... executing input connector '" << conn->name() << "' -> attaching '" << inputData->name() << "' of size " << inputData->size());
241
242 return sc;
243}
const std::string & name() const
Definition DataArray.h:20
virtual unsigned int size() const =0
const InputTOBArray * inputTOBs(TCS::inputTOBType_t) const
bool hasInputOverflow(TCS::inputTOBType_t) const
whether there are input overflows from Mioct for muon and from CMX for calo

◆ executeSortingAlgorithm()

TCS::StatusCode TopoSteering::executeSortingAlgorithm ( TCS::SortingAlg * alg,
TCS::InputConnector * inputConnector,
TCS::TOBArray *& sortedOutput )
private

Definition at line 371 of file TopoSteering.cxx.

373 {
374
375 TRG_MSG_DEBUG(" ... executing sorting alg '" << alg->fullname() << "'"
376 <<(m_useBitwise?" (bitwise)":""));
377
378 const InputTOBArray * input = inputConnector->outputData();
379
380 if(m_useBitwise) alg->sortBitCorrect(*input, *sortedOutput);
381 else alg->sort(*input, *sortedOutput);
382
384}

◆ executeSortingConnector()

TCS::StatusCode TopoSteering::executeSortingConnector ( TCS::SortingConnector * conn)
private

Definition at line 248 of file TopoSteering.cxx.

248 {
249
250 if (conn == NULL) {
251 return StatusCode::FAILURE;
252 }
253
254 TCS::StatusCode sc = TCS::StatusCode::SUCCESS;
255
256 // execute all the prior connectors
257 for( TCS::Connector* inputConn: conn->inputConnectors() ){
258 sc &= executeConnector(inputConn);
259 conn->toggleInputOverflow(conn->hasInputOverflow() ||
260 inputConn->hasInputOverflow());
261 }
262 TCS::SortingAlg* alg = conn->sortingAlgorithm();
263
264 TOBArray * sortedOutput = new TOBArray(conn->outputName());
265 //coverity[USELESS_CALL:FALSE]
266 sc &= executeSortingAlgorithm(alg, conn->inputConnector(), sortedOutput);
267
268 conn->toggleAmbiguity(sortedOutput->ambiguityFlag());
269
270 TRG_MSG_DEBUG(" ... executing sorting connector '" << conn->name() << "' -> attaching '" << sortedOutput->name() << "' of size " << sortedOutput->size());
271
272 conn->attachOutputData(sortedOutput);
273
274 return sc;
275}
size_t size() const
bool ambiguityFlag() const
Definition TOBArray.h:37
StatusCode executeSortingAlgorithm(SortingAlg *alg, TCS::InputConnector *inputConnector, TOBArray *&output)

◆ executeTrigger()

TCS::StatusCode TopoSteering::executeTrigger ( const std::string & triggerName)

Definition at line 172 of file TopoSteering.cxx.

172 {
173 if( ! structure().isConfigured() )
174 TCS_EXCEPTION("TopoSteering has not been configured, can't run");
175
176 DecisionConnector * outConn = m_structure.outputConnector(TrigName);
177
178 TCS::StatusCode sc = executeConnector(outConn);
179
180 m_simulationResult.collectResult(outConn);
181
182 return sc;
183}

◆ getName()

const std::string & TrigConf::TrigConfMessaging::getName ( ) const
inlineinherited

name accessor

Returns
the name

Definition at line 101 of file TrigConfMessaging.h.

101 {
102 return m_name;
103 }

◆ initializeAlgorithms()

TCS::StatusCode TopoSteering::initializeAlgorithms ( )

Definition at line 91 of file TopoSteering.cxx.

91 {
92 TRG_MSG_INFO("initializing algorithms");
93 if( ! structure().isConfigured() ) {
94 TCS_EXCEPTION("L1Topo Steering has not been configured, can't run");
95 }
96
97 for(auto conn: m_structure.connectors()) {
98 TCS::ConfigurableAlg * alg = conn->algorithm();
99 if(alg) {
100 TRG_MSG_INFO("initializing algorithm " << alg->name());
101 if(m_histSvc) {
102 alg->setL1TopoHistSvc(m_histSvc);
103 }
104 alg->setLegacyMode(m_isLegacyTopo);
105 alg->initialize();
106 }
107
108 }
109
111}
std::shared_ptr< IL1TopoHistSvc > m_histSvc

◆ inputEvent()

TopoInputEvent & TCS::TopoSteering::inputEvent ( )
inline

Definition at line 55 of file TopoSteering.h.

55{ return m_inputEvent; }
TopoInputEvent m_inputEvent

◆ msg() [1/2]

MsgStreamTC & TrigConf::TrigConfMessaging::msg ( ) const
inlineinherited

The standard message stream.

Returns a reference to the message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 86 of file TrigConfMessaging.h.

87 {
88 MsgStreamTC* ms = m_msg_tls.get();
89 if (!ms) {
90 ms = new MsgStreamTC(m_name);
91 m_msg_tls.reset(ms);
92 }
93 return *ms;
94 }
boost::thread_specific_ptr< MsgStreamTC > m_msg_tls
MsgStreamTC instance (a std::cout like with print-out levels)

◆ msg() [2/2]

MsgStreamTC & TrigConf::TrigConfMessaging::msg ( const MSGTC::Level lvl) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 96 of file TrigConfMessaging.h.

97 {
98 return msg() << lvl;
99 }
MsgStreamTC & msg() const
The standard message stream.

◆ msgLvl()

bool TrigConf::TrigConfMessaging::msgLvl ( const MSGTC::Level lvl) const
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicting if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 75 of file TrigConfMessaging.h.

76 {
77 if (msg().level() <= lvl) {
78 msg() << lvl;
79 return true;
80 }
81 else {
82 return false;
83 }
84 }

◆ parameters()

const TCS::ParameterSpace & TCS::TopoSteering::parameters ( const std::string & algName) const

◆ printConfiguration()

void TopoSteering::printConfiguration ( std::ostream & o) const

Definition at line 459 of file TopoSteering.cxx.

459 {
460 o << "==========================\n"
461 << "TopoSteering configuration\n"
462 << "--------------------------\n";
463 structure().print(o);
464 o << "==========================" << endl;
465}
void print(std::ostream &o) const

◆ printDebugInfo()

void TopoSteering::printDebugInfo ( )

Definition at line 445 of file TopoSteering.cxx.

445 {
446 TRG_MSG_INFO("Number of ClusterTOB : " << ClusterTOB::heap().size());
447 TRG_MSG_INFO("Number of eEmTOB : " << eEmTOB::heap().size());
448 TRG_MSG_INFO("Number of JetTOB : " << JetTOB::heap().size());
449 TRG_MSG_INFO("Number of jJetTOB : " << jJetTOB::heap().size());
450 TRG_MSG_INFO("Number of GenericTOB : " << GenericTOB::heap().size());
451 TRG_MSG_INFO("Number of CompositeTOB: " << CompositeTOB::heap().size());
452 TRG_MSG_INFO("Number of MuonTOB : " << MuonTOB::heap().size());
453 TRG_MSG_INFO("Number of LateMuonTOB : " << LateMuonTOB::heap().size());
454}
static const Heap< TCS::ClusterTOB > & heap()
Definition ClusterTOB.h:56
static const Heap< TCS::CompositeTOB > & heap()
static const Heap< TCS::GenericTOB > & heap()
Definition GenericTOB.h:110
static const Heap< TCS::JetTOB > & heap()
Definition JetTOB.h:71
static const Heap< TCS::LateMuonTOB > & heap()
Definition LateMuonTOB.h:74
static const Heap< TCS::MuonTOB > & heap()
Definition MuonTOB.h:79
static const Heap< TCS::eEmTOB > & heap()
static const Heap< TCS::jJetTOB > & heap()
Definition jJetTOB.h:54

◆ propagateHardwareBitsToAlgos()

void TopoSteering::propagateHardwareBitsToAlgos ( )

propagate the bits from hardware to each simulated decision algo.

They will then be used to fill the accept/reject monitoring histograms.

Definition at line 500 of file TopoSteering.cxx.

500 {
501 for(const auto & [connectorName, outCon] : m_structure.outputConnectors()) {
502 outCon->decisionAlgorithm()->resetHardwareBits();
503 unsigned int pos = 0; // for multi-output algorithms pos is the output index
504 for(const TrigConf::TriggerLine &trigger : outCon->triggers()){
505 unsigned int bitNumber = trigger.flatindex();
506 outCon->decisionAlgorithm()->setHardwareBits(pos,
507 m_triggerHdwBits[bitNumber],
508 m_ovrflowHdwBits[bitNumber]);
509 pos++;
510 TRG_MSG_DEBUG("propagating hardware bit (dec/ovr) "<<bitNumber
511 <<" to algo "<<connectorName<<"["<<pos<<"]"
512 <<" "<<m_triggerHdwBits[bitNumber]<<" /"
513 <<" "<<m_ovrflowHdwBits[bitNumber]);
514
515 }
516 }
517}
std::bitset< numberOfL1TopoBits > m_ovrflowHdwBits
std::bitset< numberOfL1TopoBits > m_triggerHdwBits

◆ reset()

TCS::StatusCode TopoSteering::reset ( )

Definition at line 56 of file TopoSteering.cxx.

56 {
57
79
80 inputEvent().clear();
81
82 m_structure.reset();
83
84 m_simulationResult.reset();
85
87}
static void clearHeap()
static void clearHeap()
static void clearHeap()
static void clearHeap()
Definition JetTOB.cxx:37
static void clearHeap()
static void clearHeap()
Definition MetTOB.cxx:38
static void clearHeap()
static void clearHeap()
Definition MuonTOB.cxx:33
static void clearHeap()
Definition cTauTOB.cxx:38
static void clearHeap()
Definition eTauTOB.cxx:38
static void clearHeap()
Definition gJetTOB.cxx:35
static void clearHeap()
Definition gLJetTOB.cxx:35
static void clearHeap()
Definition gTETOB.cxx:31
static void clearHeap()
Definition gXETOB.cxx:33
static void clearHeap()
Definition jEmTOB.cxx:32
static void clearHeap()
Definition jJetTOB.cxx:32
static void clearHeap()
Definition jLJetTOB.cxx:32
static void clearHeap()
Definition jTETOB.cxx:31
static void clearHeap()
Definition jTauTOB.cxx:32
static void clearHeap()
Definition jXETOB.cxx:33

◆ saveHist()

TCS::StatusCode TopoSteering::saveHist ( )

Definition at line 123 of file TopoSteering.cxx.

123 {
124 if(m_histSvc) {
125 m_histSvc->save();
126 } else {
127 TRG_MSG_WARNING("saveHist called without an L1TopoHistSvc being available");
128 }
130}

◆ setAlgMsgLevel()

void TopoSteering::setAlgMsgLevel ( TrigConf::MSGTC::Level lvl)

Definition at line 482 of file TopoSteering.cxx.

482 {
483 m_AlgMsgLvl = lvl;
484 for( Connector * conn : m_structure.connectors() ) {
485 const ConfigurableAlg * alg = conn->algorithm();
486 if(alg==nullptr) continue;
487 alg->msg().setLevel(lvl);
488 }
489}
TrigConf::MSGTC::Level m_AlgMsgLvl

◆ setHardwareBits()

void TopoSteering::setHardwareBits ( const std::bitset< numberOfL1TopoBits > & triggerBits,
const std::bitset< numberOfL1TopoBits > & ovrflowBits )

cache the decision/overflow bits from hardware These bits are propagated to the algorithms with propagateHardwareBitsToAlgos.

Definition at line 493 of file TopoSteering.cxx.

494 {
495 m_triggerHdwBits = triggerBits;
496 m_ovrflowHdwBits = ovrflowBits;
497}

◆ setHistSvc()

TCS::StatusCode TopoSteering::setHistSvc ( std::shared_ptr< IL1TopoHistSvc > histSvc)

enables the histogramming service

Definition at line 115 of file TopoSteering.cxx.

115 {
116 TRG_MSG_INFO("setting L1TopoHistSvc ");
117 m_histSvc = std::move(histSvc);
119}

◆ setLegacyMode()

void TCS::TopoSteering::setLegacyMode ( bool isLegacyTopo)
inline

Definition at line 92 of file TopoSteering.h.

92{m_isLegacyTopo=isLegacyTopo;}

◆ setMsgLevel()

void TopoSteering::setMsgLevel ( TrigConf::MSGTC::Level lvl)

Definition at line 470 of file TopoSteering.cxx.

470 {
471
472 //const char* levelNames[TrigConf::MSGTC::NUM_LEVELS] = {"NIL","VERBOSE","DEBUG","INFO",
473 // "WARNING","ERROR","FATAL","ALWAYS"};
474 msg().setLevel( lvl );
475
476 inputEvent().msg().setLevel(lvl);
477
478 m_simulationResult.setMsgLevel( lvl );
479}
void setLevel(MSGTC::Level lvl)
Set message level of stream.

◆ setOutputAlgosFillBasedOnHardware()

void TopoSteering::setOutputAlgosFillBasedOnHardware ( const bool & value)

tell output algos to fill accept/reject histos based on hdw decision.

In this case you will need to call setHardwareBits + propagateHardwareBitsToAlgos at each event.

Definition at line 520 of file TopoSteering.cxx.

520 {
521 for(const auto & [connectorName, outCon] : m_structure.outputConnectors()) {
522 if(outCon) {
523 outCon->decisionAlgorithm()->setFillHistosBasedOnHardware(value);
524 } else {
525 TRG_MSG_DEBUG("skipping invalid DecisionConnector '"<<connectorName<<"'");
526 }
527 }
528}

◆ setOutputAlgosSkipHistograms()

void TopoSteering::setOutputAlgosSkipHistograms ( const bool & value)

skip filling the histos

When filling the histograms based on the hdw decision we want to skip filling them if we didn't fetch the hdw bits from the ROS. The flag is then toggled on/off depending on the prescaler.

Definition at line 531 of file TopoSteering.cxx.

531 {
532 for(const auto & [connectorName,outCon] : m_structure.outputConnectors()) {
533 if(outCon) {
534 outCon->decisionAlgorithm()->setSkipHistos(value);
535 } else {
536 TRG_MSG_DEBUG("skipping invalid DecisionConnector '"<<connectorName<<"'");
537 }
538 }
539}

◆ setUseBitwise()

void TCS::TopoSteering::setUseBitwise ( bool useBitwise)
inline

Definition at line 64 of file TopoSteering.h.

64{ m_useBitwise = useBitwise; }

◆ simulationResult()

const TopoCoreSimResult & TCS::TopoSteering::simulationResult ( ) const
inline

Definition at line 57 of file TopoSteering.h.

57{ return m_simulationResult; }

◆ structure()

const TopoSteeringStructure & TCS::TopoSteering::structure ( ) const
inline

Definition at line 53 of file TopoSteering.h.

53{ return m_structure; }

Member Data Documentation

◆ m_AlgMsgLvl

◆ m_evtCounter

unsigned int TCS::TopoSteering::m_evtCounter {1}
private

Definition at line 162 of file TopoSteering.h.

162{1};

◆ m_histSvc

std::shared_ptr<IL1TopoHistSvc> TCS::TopoSteering::m_histSvc
private

Definition at line 166 of file TopoSteering.h.

◆ m_inputEvent

TopoInputEvent TCS::TopoSteering::m_inputEvent
private

Definition at line 156 of file TopoSteering.h.

◆ m_isLegacyTopo

bool TCS::TopoSteering::m_isLegacyTopo {false}
private

Definition at line 154 of file TopoSteering.h.

154{false};

◆ m_msg_tls

boost::thread_specific_ptr<MsgStreamTC> TrigConf::TrigConfMessaging::m_msg_tls
mutableprivateinherited

MsgStreamTC instance (a std::cout like with print-out levels)

Definition at line 71 of file TrigConfMessaging.h.

◆ m_name

std::string TrigConf::TrigConfMessaging::m_name
privateinherited

Definition at line 72 of file TrigConfMessaging.h.

◆ m_ovrflowHdwBits

std::bitset<numberOfL1TopoBits> TCS::TopoSteering::m_ovrflowHdwBits
private

Definition at line 169 of file TopoSteering.h.

◆ m_simulationResult

TopoCoreSimResult TCS::TopoSteering::m_simulationResult
private

Definition at line 158 of file TopoSteering.h.

◆ m_structure

TopoSteeringStructure TCS::TopoSteering::m_structure
private

Definition at line 160 of file TopoSteering.h.

◆ m_triggerHdwBits

std::bitset<numberOfL1TopoBits> TCS::TopoSteering::m_triggerHdwBits
private

Definition at line 168 of file TopoSteering.h.

◆ m_useBitwise

bool TCS::TopoSteering::m_useBitwise {false}
private

Definition at line 152 of file TopoSteering.h.

152{false}; // Using bitwise algorithms? Disabled by default. Needs a menu global flag.

◆ numberOfL1TopoBits

const unsigned int TCS::TopoSteering::numberOfL1TopoBits = 128
static

Definition at line 101 of file TopoSteering.h.


The documentation for this class was generated from the following files: