BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
EFResult.h
Go to the documentation of this file.
1/**
2 * @file EFResult.h
3 * @author <a href="mailto:[email protected]> Kristo Karr </a>
4 * <a href="mailto:[email protected]> Gonzalo Merino </a>
5 * $Author: fucd $
6 * $Revision: 1.3 $
7 * $Date: 2008/10/29 02:23:27 $
8 *
9 * @brief Defines the EFResult RDO structure
10 */
11#ifndef EFRESULT_H
12#define EFRESULT_H
13
14#include <vector>
15#include <string>
16#include <stdint.h>
17
18#include "GaudiKernel/DataObject.h"
19
20//hxt #include "CLIDSvc/CLASS_DEF.h"
21
22static const CLID& CLID_EFResult=11006;
23
24class EFResult: public DataObject
25{
26
27 public:
28
29 /* Constructor: Fill possible answers list */
30 EFResult(std::vector<std::string>);
31 /* Constructor: Fill data members vector */
32 EFResult(std::vector<uint32_t>,uint32_t);
33 /* Empty constructor: Init to 0 */
34 EFResult();
35 /* Destructor */
36 virtual ~EFResult();
37
38 /*EFResult CLID accessor.*/
39 static const CLID& classID();
40 /*EFResult CLID accessor.*/
41 virtual const CLID& clID() const;
42
43 /* Method returning the EFResult 32bit ints vector contents */
44 const std::vector<uint32_t> getEFVec() const;
45 const uint32_t getEFVec(uint32_t pos) const;
46
47 /* Method appending 32bit ints to the EF vector contents */
48 bool push_back(uint32_t val);
49 bool appToEFVec(double val,uint32_t pos);
50 bool addToEFVec(uint32_t val,uint32_t pos);
51 bool setVecBit(uint32_t val,uint32_t vecpos,uint32_t bbegin,uint32_t bend);
52 bool setVecBit(bool val,uint32_t vecpos,uint32_t bitpos);
53
54 /* Method to store the EF answer */
55 void setAnswer(std::string &answer);
56 void setMidAnswer(std::string &answer);
57 /////////////////////////////zoujh///////////////////
58 void reset();
59
60 /* Method to retrieve the EF answer string */
61 const std::string getAnswer() const;
62 const std::string getMidAnswer() const;
63
64 /* Method to retrieve the EF answer (string vector) index */
65 const int getAnswerIndex() const;
66 const int getMidAnswerIndex() const;
67
68 const int getDecNum() const{
69 if(m_efVec.size()>=54)return m_efVec.size()-54;
70 else return 0;
71 }
72 private:
73 std::vector<std::string> m_answerVector; ///< List of supported string answers
74 int m_answerIndex; ///< Index of the chosen EF answer inside the List
75 int m_midanswerIndex;
76 std::vector<uint32_t> m_efVec; ///< Vector of 32bit ints with EFResult data members
77};
78
79//hxt CLASS_DEF(EFResult ,11006,0)
80
81#endif
bool addToEFVec(uint32_t val, uint32_t pos)
Definition EFResult.cxx:81
const int getDecNum() const
Definition EFResult.h:68
const std::string getAnswer() const
Definition EFResult.cxx:166
const int getMidAnswerIndex() const
Definition EFResult.cxx:172
static const CLID & classID()
Definition EFResult.cxx:41
void setAnswer(std::string &answer)
Definition EFResult.cxx:115
bool appToEFVec(double val, uint32_t pos)
Definition EFResult.cxx:68
const int getAnswerIndex() const
Definition EFResult.cxx:168
void setMidAnswer(std::string &answer)
Definition EFResult.cxx:133
virtual ~EFResult()
Definition EFResult.cxx:39
const std::string getMidAnswer() const
Definition EFResult.cxx:170
virtual const CLID & clID() const
Definition EFResult.cxx:46
void reset()
Definition EFResult.cxx:153
bool setVecBit(uint32_t val, uint32_t vecpos, uint32_t bbegin, uint32_t bend)
Definition EFResult.cxx:94
const std::vector< uint32_t > getEFVec() const
Definition EFResult.cxx:51
bool push_back(uint32_t val)
Definition EFResult.cxx:61