11 #include <analysis/modules/SkimFilter/SkimFilterModule.h>
12 #include <analysis/dataobjects/ParticleList.h>
13 #include <framework/core/Environment.h>
14 #include <framework/datastore/StoreObjPtr.h>
15 #include <boost/algorithm/string/split.hpp>
16 #include <boost/algorithm/string/replace.hpp>
17 #include <boost/algorithm/string/classification.hpp>
21 using namespace boost::algorithm;
29 setDescription(
"Filter based on ParticleLists, by setting return value to true if at least one of the given lists is not empty.");
30 setPropertyFlags(c_ParallelProcessingCertified);
32 addParam(
"particleLists", m_strParticleLists,
"List of ParticleLists", vector<string>());
38 void SkimFilterModule::initialize()
41 int nParticleLists = m_strParticleLists.size();
42 B2INFO(
"Number of ParticleLists studied " << nParticleLists <<
" ");
47 void SkimFilterModule::event()
53 int nParticleLists = m_strParticleLists.size();
55 for (
int iList = 0; iList < nParticleLists; ++iList) {
59 B2INFO(
"ParticleList " << m_strParticleLists[iList] <<
" not found");
62 if (particlelist->getListSize() == 0)
continue;
74 void SkimFilterModule::terminate()
76 B2INFO(
"SkimFilter Summary: \n");
77 std::ostringstream stream;
78 stream <<
"\n=======================================================\n";
79 stream <<
"Total Retention: " << Form(
"%6.4f\n", (
float)m_nPass / (
float)Environment::Instance().getNumberOfEvents());
80 stream <<
"\n=======================================================\n";