//////////////////////////////////////////////////////////////////////////
// //
// TMBTree Trig class //
// //
//////////////////////////////////////////////////////////////////////////
#include "tmb_tree/TMBL1AndOr.hpp"
ClassImp(TMBL1AndOr)
TMBL1AndOr::TMBL1AndOr()
: _bs_inited (false)
{
}
TMBL1AndOr::TMBL1AndOr( const TMBL1AndOr & trig )
: TObject(),_bit_string (trig._bit_string), _bs_inited (false)
{
}
TMBL1AndOr::~TMBL1AndOr()
{
}
///
/// Clear
///
void TMBL1AndOr::Clear (const Option_t *opt)
{
TObject::Clear (opt);
_bit_string = "";
_bs_inited = false;
}
///
/// set_and_or_bits
///
/// Remember what the and-or bits are!
///
void TMBL1AndOr::set_and_or_bits (const std::bitset<256> &bits)
{
_bs_inited = true;
_bs = bits;
_bit_string = bits.to_string<char, std::char_traits<char>, std::allocator<char> >().c_str();
}
///
/// l1andor
///
/// Did it fire?
///
bool TMBL1AndOr::l1andor (int b) const
{
build_bs();
return _bs[b];
}
///
/// allAndOr
///
/// Return them all as a bitset
///
std::bitset<256> TMBL1AndOr::allAndOr (void) const
{
build_bs();
return _bs;
}
///
/// build_bs
///
/// Builds the bs from the string if we need to!
///
void TMBL1AndOr::build_bs (void) const
{
if (_bs_inited) {
return;
}
//_bs_inited = true;
_bs = std::bitset<256> (std::string(_bit_string.Data()));
}
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.