8 #ifndef KTCUTSTATUS_HH_ 9 #define KTCUTSTATUS_HH_ 14 #include <boost/dynamic_bitset.hpp> 15 #include <boost/scoped_ptr.hpp> 82 template<
typename XCutType >
84 bool AddCutResult(
const std::string& cutName,
bool state,
bool doUpdateStatus=
true);
86 bool AddCutResult(
const char* cutName,
bool state,
bool doUpdateStatus=
true);
87 template<
typename XCutType >
88 bool AddCutResult(
const XCutType& cut,
bool doUpdateStatus=
true);
90 template<
typename XCutType >
94 template<
typename XCutType >
98 template<
typename XCutType >
102 template<
typename XCutType >
106 template<
typename XCutType >
107 bool SetCutState(
bool state,
bool doUpdateStatus=
true);
108 bool SetCutState(
const std::string& cutName,
bool state,
bool doUpdateStatus=
true);
110 template<
typename XCutType >
128 bool IsCut(
const bitset_type& mask)
const;
129 bool IsCut(
unsigned long long mask)
const;
130 bool IsCut(
const std::string& mask)
const;
132 bitset_type
ToBitset(
unsigned long long mask)
const;
133 bitset_type
ToBitset(
const std::string& mask)
const;
145 template<
typename XCutType >
148 if (! HasCutResult< XCutType >())
150 fCutResults.get()->Of< XCutType >().SetState(state);
159 return AddCutResult(std::string(cutName), state, doUpdateStatus);
162 template<
typename XCutType >
165 if (! HasCutResult< XCutType >())
174 template<
typename XCutType >
180 template<
typename XCutType >
183 if (HasCutResult< XCutType >())
185 return fCutResults.get()->Of< XCutType >().GetState();
190 template<
typename XCutType >
193 if (HasCutResult< XCutType >())
200 template<
typename XCutType >
203 if (HasCutResult< XCutType >())
210 template<
typename XCutType >
bool SetCutState(bool state, bool doUpdateStatus=true)
friend std::ostream & operator<<(std::ostream &out, const KTCutStatus &status)
const KTCutResult * GetCutResult() const
bool HasCutResult() const
static const std::string sName
Provides easy access to cut information.
void RemoveCutResult(bool doUpdateStatus=true)
KTExtensibleStruct & operator=(const KTExtensibleStruct &object)
Duplicates the extended object.
bool AddCutResult(bool state, bool doUpdateStatus=true)
std::string CutResultsPresent() const
Returns a string with the names of the cuts that are present in bitset order.
bitset_type ToBitset(unsigned long long mask) const
const KTCutResult * CutResults() const
boost::scoped_ptr< KTCutResultHandle > fCutResults
boost::dynamic_bitset< > bitset_type