StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StL3AlgorithmInfo.cxx
1 /***************************************************************************
2  *
3  * $Id: StL3AlgorithmInfo.cxx,v 2.3 2003/05/23 20:40:44 ullrich Exp $
4  *
5  * Author: Christof Struck, July 2001
6  ***************************************************************************
7  *
8  * Description: L3 Algorithm Information
9  *
10  ***************************************************************************
11  *
12  * $Log: StL3AlgorithmInfo.cxx,v $
13  * Revision 2.3 2003/05/23 20:40:44 ullrich
14  * Removed dependcies on DAQ lib in header file.
15  *
16  * Revision 2.2 2001/08/20 21:29:00 ullrich
17  * Changed counter type from UInt_t to Int_t.
18  *
19  * Revision 2.1 2001/08/02 01:26:31 ullrich
20  * Initial Revision.
21  *
22  **************************************************************************/
23 
24 #include <string.h>
25 #include "StL3AlgorithmInfo.h"
26 #include "StDaqLib/L3/L3_Banks.hh"
27 
28 static const char rcsid[] = "$Id: StL3AlgorithmInfo.cxx,v 2.3 2003/05/23 20:40:44 ullrich Exp $";
29 
30 ClassImp(StL3AlgorithmInfo)
31 
32 
34 {
35  initArrays();
36  mId = -1;
37  mOn = false;
38  mAccept = false;
39  mBuild = false;
40  mNumberOfProcessedEvents = 0;
41  mNumberOfAcceptedEvents = 0;
42  mNumberOfBuildEvents = 0;
43 }
44 
45 StL3AlgorithmInfo::StL3AlgorithmInfo(Algorithm_Data* raw)
46 {
47  initArrays();
48  mId = raw->algId;
49  mOn = raw->on;
50  mAccept = raw->accept;
51  mBuild = raw->build;
52  mNumberOfProcessedEvents = raw->nProcessed;
53  mNumberOfAcceptedEvents = raw->nAccept;
54  mNumberOfBuildEvents = raw->nBuild;
55  mDataArray.Set(mDataSize, (Float_t* )raw->data);
56 }
57 
58 
59 StL3AlgorithmInfo::~StL3AlgorithmInfo()
60 {
61 }
62 
63 
64 void StL3AlgorithmInfo::initArrays()
65 {
66  mDataSize = 10;
67  mIntParameterSize = 5;
68  mFloatParameterSize = 5;
69 
70  mDataArray.Set(mDataSize);
71  mIntParameterArray.Set(mIntParameterSize);
72  mFloatParameterArray.Set(mFloatParameterSize);
73 }
74 
75 
76 void StL3AlgorithmInfo::setCounters(int nProcessed, int nAccepted, int nBuild)
77 {
78  mNumberOfProcessedEvents = nProcessed;
79  mNumberOfAcceptedEvents = nAccepted;
80  mNumberOfBuildEvents = nBuild;
81 }
82 
83 
84 void StL3AlgorithmInfo::setParameters(int* gi, float* gf)
85 {
86  mIntParameterArray.Set(mIntParameterSize, (Int_t* )gi);
87  mFloatParameterArray.Set(mFloatParameterSize, (Float_t* )gf);
88 }
89 
90 
91 void StL3AlgorithmInfo::setPreScale(int pre)
92 {
93  mPreScale = pre;
94 }
95 
96 
97 void StL3AlgorithmInfo::setPostScale(int post)
98 {
99  mPostScale = post;
100 }