45 feature = feature.simplified();
46 QStringList featureSeg = feature.split(QRegExp(
"\\s+"));
48 if(
int(featureSeg.size())==22) {
49 std::vector<QString> fdata, fid;
50 QStringList fdataitem;
54 for(
int fs=0;
fs<
int(featureSeg.size()); ++
fs) {
59 if(
idx>1 &&
int(fdataitem.size())>0) {
60 fdata.push_back(fdataitem.join(
" "));
68 if(!featureSeg[
fs].
contains(
"[") && !featureSeg[
fs].contains(
"]"))
69 fdataitem << featureSeg[
fs];
72 if(
fs==(
int(featureSeg.size())-1) &&
int(fdataitem.size())>0) {
73 fdata.push_back(fdataitem.join(
" "));
83 for(
int v=0;
v<
int(fdata.size()); ++
v) {
103 log_error(
"processFeature(): TrigDecisionTool returned "+
VP1String::str(
int(featureSeg.size()))+
" feature segment items!");
114 int combId=0, processId=0;
115 QString feature,
roiId;
124 using namespace Trig;
125 for(cIt = m_containerL1.getCombinations().begin(); cIt != m_containerL1.getCombinations().end(); ++cIt) {
128 std::vector< Feature<TrigRoiDescriptor> > forID = cIt->get<
TrigRoiDescriptor>(
"forID");
129 std::vector< Feature<TrigRoiDescriptor> > forMS = cIt->get<
TrigRoiDescriptor>(
"forMS");
130 std::vector< Feature<TrigRoiDescriptor> > initialRoI = cIt->get<
TrigRoiDescriptor>(
"initialRoI");
131 std::vector< Feature<TrigRoiDescriptor> > secondaryRoI_L2 = cIt->get<
TrigRoiDescriptor>(
"secondaryRoI_L2");
132 std::vector< Feature<TrigRoiDescriptor> > secondaryRoI_EF = cIt->get<
TrigRoiDescriptor>(
"secondaryRoI_EF");
133 std::vector< Feature<TrigRoiDescriptor> > T2TauFinal = cIt->get<
TrigRoiDescriptor>(
"T2TauFinal");
134 std::vector< Feature<TrigRoiDescriptor> > TrigT2CaloEgamma = cIt->get<
TrigRoiDescriptor>(
"TrigT2CaloEgamma");
135 std::vector< Feature<TrigRoiDescriptor> > TrigT2CaloJet = cIt->get<
TrigRoiDescriptor>(
"TrigT2CaloJet");
136 std::vector< Feature<TrigRoiDescriptor> > TrigT2CosmicJet = cIt->get<
TrigRoiDescriptor>(
"TrigT2CosmicJet");
137 std::vector< Feature<TrigRoiDescriptor> > TrigT2CaloTau = cIt->get<
TrigRoiDescriptor>(
"TrigT2CaloTau");
142 if( !forID.empty() ){
143 for(
int dItr=0; dItr<
int(forID.size()); ++dItr) {
145 feature = QString::fromStdString(::
str(*
d.cptr()));
147 if(!feature.isEmpty()) {
148 bool fstatus = processFeature(processId,
roiId, feature); ++processId;
150 log_error(
"processitem(): feature processing failed for: "+
roiId+
" > "+qstr(::
str(*
d.cptr())));
156 if( !forMS.empty() ){
157 for(
int dItr=0; dItr<
int(forMS.size()); ++dItr) {
159 feature = QString::fromStdString(::
str(*
d.cptr()));
161 if(!feature.isEmpty()) {
162 bool fstatus = processFeature(processId,
roiId, feature); ++processId;
164 log_error(
"processitem(): feature processing failed for: "+
roiId+
" > "+qstr(::
str(*
d.cptr())));
170 if( !initialRoI.empty() ){
171 for(
int dItr=0; dItr<
int(initialRoI.size()); ++dItr) {
172 d = initialRoI[dItr];
173 feature = QString::fromStdString(::
str(*
d.cptr()));
175 if(!feature.isEmpty()) {
176 bool fstatus = processFeature(processId,
roiId, feature); ++processId;
178 log_error(
"processitem(): feature processing failed for: "+
roiId+
" > "+qstr(::
str(*
d.cptr())));
184 if( !secondaryRoI_L2.empty() ){
185 for(
int dItr=0; dItr<
int(secondaryRoI_L2.size()); ++dItr) {
186 d = secondaryRoI_L2[dItr];
187 feature = QString::fromStdString(::
str(*
d.cptr()));
189 if(!feature.isEmpty()) {
190 bool fstatus = processFeature(processId,
roiId, feature); ++processId;
192 log_error(
"processitem(): feature processing failed for: "+
roiId+
" > "+qstr(::
str(*
d.cptr())));
198 if( !secondaryRoI_EF.empty() ){
199 for(
int dItr=0; dItr<
int(secondaryRoI_EF.size()); ++dItr) {
200 d = secondaryRoI_EF[dItr];
201 feature = QString::fromStdString(::
str(*
d.cptr()));
203 if(!feature.isEmpty()) {
204 bool fstatus = processFeature(processId,
roiId, feature); ++processId;
206 log_error(
"processitem(): feature processing failed for: "+
roiId+
" > "+qstr(::
str(*
d.cptr())));
212 if( !T2TauFinal.empty() ){
213 for(
int dItr=0; dItr<
int(T2TauFinal.size()); ++dItr) {
214 d = T2TauFinal[dItr];
215 feature = QString::fromStdString(::
str(*
d.cptr()));
217 if(!feature.isEmpty()) {
218 bool fstatus = processFeature(processId,
roiId, feature); ++processId;
220 log_error(
"processitem(): feature processing failed for: "+
roiId+
" > "+qstr(::
str(*
d.cptr())));
226 if( !TrigT2CaloEgamma.empty() ){
227 for(
int dItr=0; dItr<
int(TrigT2CaloEgamma.size()); ++dItr) {
228 d = TrigT2CaloEgamma[dItr];
229 feature = QString::fromStdString(::
str(*
d.cptr()));
231 if(!feature.isEmpty()) {
232 bool fstatus = processFeature(processId,
roiId, feature); ++processId;
234 log_error(
"processitem(): feature processing failed for: "+
roiId+
" > "+qstr(::
str(*
d.cptr())));
240 if( !TrigT2CaloJet.empty() ){
241 for(
int dItr=0; dItr<
int(TrigT2CaloJet.size()); ++dItr) {
242 d = TrigT2CaloJet[dItr];
243 feature = QString::fromStdString(::
str(*
d.cptr()));
245 if(!feature.isEmpty()) {
246 bool fstatus = processFeature(processId,
roiId, feature); ++processId;
248 log_error(
"processitem(): feature processing failed for: "+
roiId+
" > "+qstr(::
str(*
d.cptr())));
254 if( !TrigT2CosmicJet.empty() ){
255 for(
int dItr=0; dItr<
int(TrigT2CosmicJet.size()); ++dItr) {
256 d = TrigT2CosmicJet[dItr];
257 feature = QString::fromStdString(::
str(*
d.cptr()));
259 if(!feature.isEmpty()) {
260 bool fstatus = processFeature(processId,
roiId, feature); ++processId;
262 log_error(
"processitem(): feature processing failed for: "+
roiId+
" > "+qstr(::
str(*
d.cptr())));
268 if( !TrigT2CaloTau.empty() ){
269 for(
int dItr=0; dItr<
int(TrigT2CaloTau.size()); ++dItr) {
270 d = TrigT2CaloTau[dItr];
271 feature = QString::fromStdString(::
str(*
d.cptr()));
273 if(!feature.isEmpty()) {
274 bool fstatus = processFeature(processId,
roiId, feature); ++processId;
276 log_error(
"processitem(): feature processing failed for: "+
roiId+
" > "+qstr(::
str(*
d.cptr())));
285 if(m_trigData.size()!=0 && m_trigData[0].size()!=0 &&
roi_id.size()!=0) {
287 if((
int(m_trigData.size())-1)==
int(
roi_id.size())) {
288 m_trigData.push_back(
roi_id);
292 log_error(
"processitem(): ROI data and ID entries do not match!");
297 log_error(
"processitem(): ROI vectors empty: cannot append IDs!");
308 bool status = processitem();
309 m_qtrigitem =
new QTreeWidgetItem(0);
313 if(!(
int(m_trigData[
int(m_trigData.size())-1].size()) ==
int(m_trigData.size())-2)) {
314 log_error(
"processQTrigItem(): mismatch in TrigID / data item count: TrigID size: "+
VP1String::str(
int(m_trigData[
int(m_trigData.size())-1].size()))+
" and TrigID data cout: "+
VP1String::str(
int(m_trigData.size())-2));
318 QTreeWidgetItem* trigId;
321 m_qtrigitem->setText(0, QString(
"TE: ")+m_trigID);
323 for(
int x=1;
x<
int(m_trigData.size()-1); ++
x) {
324 trigId =
new QTreeWidgetItem(m_qtrigitem);
325 trigId->setText(0, m_trigData[
int(m_trigData.size())-1][
x-1]);
327 QList<QTreeWidgetItem *>
data;
329 if(
int(m_trigData[0].
size())==
int(m_trigData[
x].
size())) {
330 dataItem = m_trigData[0][
y]+QString(
" ")+m_trigData[
x][
y];
331 data.append(
new QTreeWidgetItem((QTreeWidget*)0, QStringList(dataItem)));
334 log_error(
"processQTrigItem(): mismatch in feature ID to data item count!");
336 trigId->insertChildren(0,
data);
344 return m_qtrigstatus;
353 bool status = processitem();
360 return m_vtrigstatus;