/[PAMELA software]/PamCut/Collections/VerboseCollection/VerboseCollection.cpp
ViewVC logotype

Diff of /PamCut/Collections/VerboseCollection/VerboseCollection.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by pam-fi, Fri May 29 10:08:45 2009 UTC revision 1.3 by pam-fi, Mon Sep 5 13:01:30 2011 UTC
# Line 29  void VerboseCollection::Finalize() { Line 29  void VerboseCollection::Finalize() {
29      if (strlen(GetCut(i)->GetName()) > nameWidth)      if (strlen(GetCut(i)->GetName()) > nameWidth)
30        nameWidth = strlen(GetCut(i)->GetName());        nameWidth = strlen(GetCut(i)->GetName());
31    }    }
32      for (unsigned int i = 0; i < _actions.size(); i++) {
33        if (strlen(GetAction(i)->GetName()) > nameWidth)
34          nameWidth = strlen(GetAction(i)->GetName());
35      }
36    cout << "\n- Collection: " << GetName() << "\n";    cout << "\n- Collection: " << GetName() << "\n";
37    cout << "  Selected/Analized events (eff.): " << GetNGood() << "/" << GetNEv() << "  (" << (float) GetNGood()    cout << "  Selected/Analized events (eff.): " << GetNGood() << "/" << GetNEv() << "  ("
38        / (float) GetNEv() << ")\n";        << (float) GetNGood() / (float) GetNEv() << ")\n";
39    cout << "     " << setw(nameWidth + 1) << "--Single cuts--";    cout << "     " << setw(nameWidth + 1) << "--Single cuts--";
40    cout << "     " << setw(nDigitsEvents) << "sel.";    cout << "     " << setw(nDigitsEvents) << "sel.";
41    cout << "     " << setw(nDigitsEvents) << "tot.";    cout << "     " << setw(nDigitsEvents) << "tot.";
42    cout << "     " << setw(newPrec + 2) << "eff.";    cout << "     " << setw(newPrec + 2) << "eff.";
43    cout << "     " << setw(newPrec + 2) << "prog. eff.\n";    cout << "     " << setw(newPrec + 2) << "prog. eff.\n";
44    for (unsigned int i = 0; i < GetSize(); i++) {  
45      cout << "     " << setw(nameWidth) << GetCut(i)->GetName() << ":";    // Print the names of the actions placed before the cuts
46      cout << "     " << setw(nDigitsEvents) << GetCut(i)->GetNGood();    unsigned int iAction = 0;
47      cout << "     " << setw(nDigitsEvents) << GetCut(i)->GetNEv();    if (_actions.size() > 0) {
48      cout << "     " << (float) GetCut(i)->GetNGood() / (float) GetCut(i)->GetNEv();      while (_actionsPositions[iAction] == -1) {
49      cout << "     " << (float) GetCut(i)->GetNGood() / (float) GetNEv();        cout << "     " << setw(nameWidth) << _actions[iAction]->GetName() << ":" << "                   ACTION\n";
50          iAction++;
51          if (iAction == _actions.size())
52            break;
53        }
54      }
55    
56      for (unsigned int iCut = 0; iCut < GetSize(); iCut++) {
57        cout << "     " << setw(nameWidth) << GetCut(iCut)->GetName() << ":";
58        cout << "     " << setw(nDigitsEvents) << GetCut(iCut)->GetNGood();
59        cout << "     " << setw(nDigitsEvents) << GetCut(iCut)->GetNEv();
60        cout << "     " << (float) GetCut(iCut)->GetNGood() / (float) GetCut(iCut)->GetNEv();
61        cout << "     " << (float) GetCut(iCut)->GetNGood() / (float) GetNEv();
62      cout << "\n";      cout << "\n";
63    
64        if (iAction < _actions.size()) {
65          while (_actionsPositions[iAction] == (int) iCut) {
66            cout << "     " << setw(nameWidth) << _actions[iAction]->GetName() << ":                   ACTION\n";
67            iAction++;
68            if (iAction == _actions.size())
69              break;
70          }
71        }
72    }    }
73    cout << endl;    cout << endl;
74    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.23