StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StL3EventSummary.cxx
1 /***************************************************************************
2  *
3  * $Id: StL3EventSummary.cxx,v 2.5 2015/05/15 18:25:06 ullrich Exp $
4  *
5  * Author: Christof Struck, July 2001
6  ***************************************************************************
7  *
8  * Description: L3 Event Summary Information
9  *
10  ***************************************************************************
11  *
12  * $Log: StL3EventSummary.cxx,v $
13  * Revision 2.5 2015/05/15 18:25:06 ullrich
14  * Fixed nonsense if() statement in constructor.
15  *
16  * Revision 2.4 2004/03/26 20:59:28 dietel
17  * Check pointer to L3_SUMD in constructor
18  *
19  * Revision 2.3 2001/11/14 23:29:35 struck
20  * minor changes in 'unbiasedTrigger' function, trigger word added for debugging purposes
21  *
22  * Revision 2.2 2001/08/20 21:29:53 ullrich
23  * Added method setCounters().
24  *
25  * Revision 2.1 2001/08/02 01:26:31 ullrich
26  * Initial Revision.
27  *
28  *
29  **************************************************************************/
30 
31 #include "StL3EventSummary.h"
32 #include "StL3AlgorithmInfo.h"
33 
34 #include "StMessMgr.h"
35 
36 static const char rcsid[] = "$Id: StL3EventSummary.cxx,v 2.5 2015/05/15 18:25:06 ullrich Exp $";
37 
38 ClassImp(StL3EventSummary)
39 
40 
42 {
43  mNumberOfProcessedEvents = 0;
44  mNumberReconstructedEvents = 0;
45  mNumberOfTracks = 0;
46  mNumberOfAlgorithms = 0;
47  mZVertexTrigger = false;
48  mUnbiasedTrigger = false;
49  mUnbiasedPreScale = 0;
50 }
51 
52 
53 StL3EventSummary::StL3EventSummary(Bank_L3_SUMD *raw)
54 {
55  if(!raw) {
56 
57  gMessMgr->Warning() << "No L3_SUMD bank" << endm;
58 
59  mNumberOfProcessedEvents = -1;
60  mNumberReconstructedEvents = -1;
61  mNumberOfTracks = 0;
62  mNumberOfAlgorithms = 0;
63  mZVertexTrigger = false;
64  mUnbiasedTrigger = true;
65  mUnbiasedPreScale = 0;
66 
67  }
68  else {
69  mNumberOfProcessedEvents = raw->nProcessed;
70  mNumberReconstructedEvents = raw->nReconstructed;
71  mNumberOfTracks = 0;
72  mNumberOfAlgorithms = raw->nAlg;
73  mZVertexTrigger = false;
74  mUnbiasedTrigger = false;
75  mUnbiasedPreScale = 0;
76  }
77 }
78 
79 
80 void StL3EventSummary::setNumberOfTracks(int ntracks)
81 {
82  mNumberOfTracks = ntracks;
83 }
84 
85 
86 void StL3EventSummary::addAlgorithm(StL3AlgorithmInfo *alg)
87 {
88  // add to structural vector
89  mL3Algorithms.push_back(alg);
90 
91  // if this algorithm built this event
92  if (alg->build()) {
93  mL3AcceptAlgorithms.push_back(alg);
94  // check for zVertex trigger and 'TRUE'-algorithm
95  // cs 11/09/01: TRUE algorithm check now in l3RawReaderMaker
96  //if (alg->id()==1) mUnbiasedTrigger = true;
97  if (alg->id()==5) mZVertexTrigger = true;
98  }
99 }