14 const std::string& name,
15 const IInterface* parent)
21 declareInterface<TBEventStreamerTool>(
this);
61 MsgStream report(msgSvc(),name());
70 <<
"cannot build accept pattern mask."
72 return StatusCode::FAILURE;
82 <<
"cannot build reject pattern mask."
84 return StatusCode::FAILURE;
88 report << MSG::INFO <<
" " <<
endmsg;
89 report << MSG::INFO <<
" ###################" <<
endmsg;
90 report << MSG::INFO <<
" # TriggerPatterns #" <<
endmsg;
91 report << MSG::INFO <<
" ###################" <<
endmsg;
92 report << MSG::INFO <<
" " <<
endmsg;
93 report << MSG::INFO <<
" +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+" <<
endmsg;
94 report << MSG::INFO <<
" | | | | | | | | | | | | | | | | | | | | |S| |" <<
endmsg;
95 report << MSG::INFO <<
" | | | | | | | | | | | | | | | | | | | | |c| |" <<
endmsg;
96 report << MSG::INFO <<
" | | | | | |V| | | | | | | | | |C| | | | |a|C|" <<
endmsg;
97 report << MSG::INFO <<
" | | | | |V|e| |V| |M| | | | |O|e|M|H| | |l|e|" <<
endmsg;
98 report << MSG::INFO <<
" | | | | |e|t| |e|M|u|M|E| |I|f|d|u|o| | |e|d|" <<
endmsg;
99 report << MSG::INFO <<
" | | | | |t|o|V|t|u|1|u|a|L|n|f|a|2|l| | |r|a|" <<
endmsg;
100 report << MSG::INFO <<
" | | | | |o|R|e|o|1|R|2|r|a|S|S|r|R|e|W| |R|r|" <<
endmsg;
101 report << MSG::INFO <<
" | | | | |L|i|t|D|L|i|L|l|t|p|p|7|i|V|1| |e|8|" <<
endmsg;
102 report << MSG::INFO <<
" | | | | |e|g|o|o|e|g|e|y|e|i|i|o|g|e|*| |s|o|" <<
endmsg;
103 report << MSG::INFO <<
" |S|S|S|B|f|h|U|w|f|h|f|P|P|l|l|f|h|t|W|B|e|f|" <<
endmsg;
104 report << MSG::INFO <<
" |1|2|3|2|t|t|p|n|t|t|t|U|U|l|l|8|t|o|2|1|t|8|" <<
endmsg;
105 report << MSG::INFO <<
"+--------+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+" <<
endmsg;
106 report << MSG::INFO <<
"| accept |";
108 for (
unsigned int i=0; i<std::min(decoded.length(),
m_triggerBitMap.size());
111 report << MSG::INFO << decoded.substr(i,1) <<
"|";
118 report << MSG::INFO <<
"+--------+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+" <<
endmsg;
119 report << MSG::INFO <<
"| reject |";
121 for (
unsigned int i=0; i<std::min(decoded.length(),
m_triggerBitMap.size());
124 report << MSG::INFO << decoded.substr(i,1) <<
"|";
131 report << MSG::INFO <<
"+--------+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+" <<
endmsg;
132 report << MSG::INFO <<
"| ignore |";
135 for (
unsigned int i=0; i<std::min(decoded.length(),
m_triggerBitMap.size());
138 report << MSG::INFO << decoded.substr(i,1) <<
"|";
145 report << MSG::INFO <<
"+--------+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+" <<
endmsg;
147 return StatusCode::SUCCESS;
157 MsgStream report(msgSvc(),name());
164 report << MSG::DEBUG <<
"Event Type found " << evType <<
endmsg;
165 if (evType != 1)
return StatusCode::SUCCESS;
185 ? StatusCode::SUCCESS
186 : StatusCode::FAILURE;
195 unsigned int nBits =
sizeof(theTriggerWord) * 8;
196 std::string thePattern;
198 for (
unsigned int i=0; i<nBits; i++ )
200 if ( ( theTriggerWord & testPattern ) == testPattern )
202 thePattern = thePattern +
"X";
206 thePattern = thePattern +
"O";
220 MsgStream report(msgSvc(),name());
223 for (
const pattern& pat : listOfPatterns)
225 bit_mask_store::const_iterator findIter =
226 definedPattern.find(pat);
227 if ( findIter != definedPattern.end() )
229 theMask = theMask | (*findIter).second;
233 report << MSG::WARNING
234 <<
"requested pattern <"
236 <<
"> unknown, ignore..."
240 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
unsigned int getTriggerWord() const