#include <SelectedParticles.h>
|
std::vector< unsigned > | m_bits |
|
Definition at line 54 of file SelectedParticles.h.
◆ SelectedParticles() [1/2]
SelectedParticles::SelectedParticles |
( |
| ) |
|
|
inline |
◆ SelectedParticles() [2/2]
SelectedParticles::SelectedParticles |
( |
const std::vector< unsigned > & |
indices | ) |
|
◆ ~SelectedParticles()
SelectedParticles::~SelectedParticles |
( |
| ) |
|
|
inline |
◆ AllBits()
const std::vector<unsigned>& SelectedParticles::AllBits |
( |
| ) |
const |
|
inline |
◆ displayBits()
string SelectedParticles::displayBits |
( |
| ) |
const |
Definition at line 49 of file SelectedParticles.cxx.
54 unsigned nwords=
m_bits.size();
55 vector<unsigned>::const_iterator itb=
m_bits.begin();
57 for (; itb !=
m_bits.end(); ++itb){
59 unsigned displayMask = 1
u << 31;
61 int temp = nwords - j - 1;
65 for (
c = 0;
c != 32;
c++ ) {
◆ goodParticles()
void SelectedParticles::goodParticles |
( |
std::vector< unsigned > & |
goodparts | ) |
const |
Definition at line 121 of file SelectedParticles.cxx.
123 unsigned nbits=
m_bits.size()*32;
124 for(
unsigned ibit=0; ibit<nbits; ++ibit) {
125 if(
isGood(ibit)) goodparts.push_back(ibit);
◆ isGood()
bool SelectedParticles::isGood |
( |
unsigned |
i | ) |
const |
Definition at line 84 of file SelectedParticles.cxx.
88 unsigned nwords=
m_bits.size();
89 vector<unsigned>::const_iterator itb=
m_bits.begin();
91 if(j>nwords-1)
return false;
92 for (; itb !=
m_bits.end(); ++itb){
94 unsigned displayMask = 1;
98 for (
c = 0;
c != 32;
c++ ) {
101 if (
m_bits[j] & displayMask) {
102 if(
c==ipart)
return true;
◆ numGood()
unsigned SelectedParticles::numGood |
( |
| ) |
const |
Definition at line 112 of file SelectedParticles.cxx.
114 unsigned nwords=
m_bits.size();
115 if(nwords==0)
return 0;
116 vector<unsigned> goodparts;
118 return goodparts.size();
◆ Set()
void SelectedParticles::Set |
( |
const std::vector< unsigned > & |
onoffBits | ) |
|
|
inline |
◆ SetBit()
void SelectedParticles::SetBit |
( |
unsigned |
i, |
|
|
bool |
good = true |
|
) |
| |
Definition at line 19 of file SelectedParticles.cxx.
20 unsigned nwords=
m_bits.size();
24 for(
unsigned iw=nwords; iw<iword+1; ++iw){
30 if(
good==
false)
return;
32 unsigned bitnum =
i % 32 ;
33 unsigned temp = 1 << bitnum;
◆ SetMaxBits()
void SelectedParticles::SetMaxBits |
( |
unsigned |
maxbits | ) |
|
Definition at line 39 of file SelectedParticles.cxx.
41 unsigned nwords=maxbits/32;
42 for(
unsigned iw=0; iw<nwords+1; ++iw){
◆ m_bits
std::vector<unsigned> SelectedParticles::m_bits |
|
private |
The documentation for this class was generated from the following files:
void SetBit(unsigned i, bool good=true)
void SetMaxBits(unsigned maxbits)
bool isGood(unsigned i) const
void goodParticles(std::vector< unsigned > &goodparts) const
std::vector< unsigned > m_bits