ATLAS Offline Software
Loading...
Searching...
No Matches
HLTSignature.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
7
8#include <iostream>
9#include <fstream>
10
11using namespace std;
12using namespace TrigConf;
13
19
21 vector<HLTTriggerElement*>&& outputTEs) :
25 m_label("")
26{}
27
28
31 m_logic( o.m_logic ),
32 m_label( o.m_label )
33{
34 // deep copy to ensure ownership (maybe should use shared_ptr in the future)
36 m_outputTEs.push_back(new HLTTriggerElement(*te));
37}
38
39
43
44
46{
47 xmlfile << " <SIGNATURE logic=\"" << m_logic << "\" "
48 << "signature_counter=\"" << m_signature_counter << "\">"
49 << std::endl;
50
51 //write TEs
53 outputTE->writeXML(xmlfile);
54 }
55
56 xmlfile << " </SIGNATURE>" << std::endl;
57
58 return;
59}
60
61void
62TrigConf::HLTSignature::print(const std::string& indent, unsigned int /*detail*/) const {
63 cout << indent << "signature " << signature_counter()
64 << " (logic=" << logic() << ") output TEs ("<< m_outputTEs.size() <<"):";
65
66 for( HLTTriggerElement* te : m_outputTEs ) {
67 if( te!=0 ) cout << *te << " "; else cout << "(0) ";
68 }
69 cout << endl;
70}
71
72std::ostream &
73TrigConf::operator<<(std::ostream & o, const TrigConf::HLTSignature & s) {
74 o << "signature: " << s.signature_counter() << " (logic=" << s.logic() << ")" << endl;
75 o << "outputTE(s)";
76
77 for( HLTTriggerElement* te : s.m_outputTEs ) {
78 o << ", ";
79 if( te!=0 ) o << *te; else o << "(0)";
80 }
81 o << endl;
82 return o;
83}
84
HLT signature configuration information.
std::string m_label
signature label
~HLTSignature(void)
destructor
HLTSignature(void)
default constructor
unsigned int signature_counter() const
accessor to the signature counter
std::vector< HLTTriggerElement * > m_outputTEs
list of trigger elements (same elements can appear multiple times to indicate their multiplicities)
std::vector< HLTTriggerElement * > & outputTEs()
accessor to the list of trigger elements
int m_logic
signature logic (how to combine trigger elements)
unsigned int m_signature_counter
signature counter (step in the chain)
void writeXML(std::ofstream &xmlfile)
void print(const std::string &indent="", unsigned int detail=1) const
print method
int logic() const
accessor to the signature logic
HLT trigger element configuration information.
static std::vector< std::string > xmlfile
Definition iLumiCalc.h:29
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22
std::ostream & operator<<(std::ostream &os, const TrigConf::IsolationLegacy &iso)
STL namespace.