BOSS 8.0.0
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:karr@ifae.es> Kristo Karr </a>
4 * <a href="mailto:merino@ifae.es> 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 <stdint.h>
15#include <string>
16#include <vector>
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
26public:
27 /* Constructor: Fill possible answers list */
28 EFResult( std::vector<std::string> );
29 /* Constructor: Fill data members vector */
30 EFResult( std::vector<uint32_t>, uint32_t );
31 /* Empty constructor: Init to 0 */
32 EFResult();
33 /* Destructor */
34 virtual ~EFResult();
35
36 /*EFResult CLID accessor.*/
37 static const CLID& classID();
38 /*EFResult CLID accessor.*/
39 virtual const CLID& clID() const;
40
41 /* Method returning the EFResult 32bit ints vector contents */
42 const std::vector<uint32_t> getEFVec() const;
43 const uint32_t getEFVec( uint32_t pos ) const;
44
45 /* Method appending 32bit ints to the EF vector contents */
46 bool push_back( uint32_t val );
47 bool appToEFVec( double val, uint32_t pos );
48 bool addToEFVec( uint32_t val, uint32_t pos );
49 bool setVecBit( uint32_t val, uint32_t vecpos, uint32_t bbegin, uint32_t bend );
50 bool setVecBit( bool val, uint32_t vecpos, uint32_t bitpos );
51
52 /* Method to store the EF answer */
53 void setAnswer( std::string& answer );
54 void setMidAnswer( std::string& answer );
55 /////////////////////////////zoujh///////////////////
56 void reset();
57
58 /* Method to retrieve the EF answer string */
59 const std::string getAnswer() const;
60 const std::string getMidAnswer() const;
61
62 /* Method to retrieve the EF answer (string vector) index */
63 const int getAnswerIndex() const;
64 const int getMidAnswerIndex() const;
65
66 const int getDecNum() const {
67 if ( m_efVec.size() >= 54 ) return m_efVec.size() - 54;
68 else return 0;
69 }
70
71private:
72 std::vector<std::string> m_answerVector; ///< List of supported string answers
73 int m_answerIndex; ///< Index of the chosen EF answer inside the List
74 int m_midanswerIndex;
75 std::vector<uint32_t> m_efVec; ///< Vector of 32bit ints with EFResult data members
76};
77
78// hxt CLASS_DEF(EFResult ,11006,0)
79
80#endif
bool addToEFVec(uint32_t val, uint32_t pos)
Definition EFResult.cxx:59
const int getDecNum() const
Definition EFResult.h:66
const std::string getAnswer() const
Definition EFResult.cxx:141
const int getMidAnswerIndex() const
Definition EFResult.cxx:147
static const CLID & classID()
Definition EFResult.cxx:29
void setAnswer(std::string &answer)
Definition EFResult.cxx:89
EFResult(std::vector< std::string >)
Definition EFResult.cxx:4
bool appToEFVec(double val, uint32_t pos)
Definition EFResult.cxx:48
const int getAnswerIndex() const
Definition EFResult.cxx:143
void setMidAnswer(std::string &answer)
Definition EFResult.cxx:108
virtual ~EFResult()
Definition EFResult.cxx:27
const std::string getMidAnswer() const
Definition EFResult.cxx:145
virtual const CLID & clID() const
Definition EFResult.cxx:33
void reset()
Definition EFResult.cxx:129
bool setVecBit(uint32_t val, uint32_t vecpos, uint32_t bbegin, uint32_t bend)
Definition EFResult.cxx:70
const std::vector< uint32_t > getEFVec() const
Definition EFResult.cxx:35
bool push_back(uint32_t val)
Definition EFResult.cxx:41