#include <UnitTestFixture.h>
|
static std::map< std::shared_ptr< Driver >, std::string > | m_jobs |
|
Definition at line 22 of file UnitTestFixture.h.
◆ checkFileExecuted()
void EL::UnitTestFixture::checkFileExecuted |
( |
const std::string & |
sampleName | ) |
|
Definition at line 210 of file UnitTestFixture.cxx.
213 std::set<std::string> filesOut;
220 auto vec = readVectorFromTree (
sample,
"EventLoop_FileExecuted",
"file");
221 filesOut.insert (
vec.begin(),
vec.end());
223 std::set<std::string> filesIn;
227 if (
split == std::string::npos)
232 ASSERT_TRUE (filesIn.find (
fileName) == filesIn.end());
235 ASSERT_EQ (filesIn, filesOut);
◆ eventCount()
unsigned EL::UnitTestFixture::eventCount |
( |
const std::string & |
sampleName | ) |
|
Definition at line 193 of file UnitTestFixture.cxx.
196 TH1 *
hist = getHist<TH1> (sampleName,
"EventLoop_EventCount",
true);
197 return hist->GetBinContent (1);
◆ getCallbacks()
TH1 * EL::UnitTestFixture::getCallbacks |
( |
const std::string & |
sampleName | ) |
|
◆ getHist()
template<typename T >
T* EL::UnitTestFixture::getHist |
( |
const std::string & |
sampleName, |
|
|
const std::string & |
objectName, |
|
|
bool |
isMandatory |
|
) |
| |
◆ getJob()
std::string EL::UnitTestFixture::getJob |
( |
| ) |
|
Definition at line 138 of file UnitTestFixture.cxx.
141 using namespace asg::msgUserCode;
144 std::shared_ptr<Driver>
driver = GetParam().m_driver;
151 GetParam().setupJob (
job);
154 config.setType (
"EL::UnitTestAlg2");
155 config.setName (
"newAlg");
156 config.setUseXAODs (
false);
161 std::unique_ptr<UnitTestAlg1>
alg (
new UnitTestAlg1);
162 job.algsAdd (
alg.release());
165 std::ostringstream
submit;
◆ getSample()
Definition at line 75 of file UnitTestFixture.cxx.
78 if (sampleName ==
"empty")
83 std::unique_ptr<SH::SampleLocal> myresult (
new SH::SampleLocal (
"empty"));
85 result = myresult.release();
89 if (sampleName ==
"single")
94 std::unique_ptr<SH::SampleLocal> myresult (
new SH::SampleLocal (
"single"));
96 for (
unsigned iter = 0; iter != 10000; ++ iter)
99 result = myresult.release();
103 if (sampleName ==
"multi")
108 std::unique_ptr<SH::SampleLocal> myresult (
new SH::SampleLocal (
"multi"));
109 for (
unsigned jter = 0; jter != 10; ++ jter)
112 for (
unsigned iter = 0; iter != 10000; ++ iter)
116 result = myresult.release();
◆ getSH()
◆ getTObject()
TObject * EL::UnitTestFixture::getTObject |
( |
const std::string & |
sampleName, |
|
|
const std::string & |
objectName, |
|
|
bool |
isMandatory |
|
) |
| |
Definition at line 175 of file UnitTestFixture.cxx.
185 TObject *
object =
sample->readHist (objectName);
186 if (isMandatory &&
object ==
nullptr)
◆ makeFile()
std::string EL::UnitTestFixture::makeFile |
( |
const std::vector< unsigned > & |
entries | ) |
|
|
private |
Definition at line 240 of file UnitTestFixture.cxx.
243 static unsigned index = 0;
247 std::unique_ptr<SH::DiskWriter>
file
248 = GetParam().make_file_writer (
fileName.str());
252 TTree *
tree =
new TTree (
"physics",
"physics");
254 tree->Branch (
"el_n", &el_n,
"el_n/I");
261 file->file()->Write ();
◆ m_jobs
std::map< std::shared_ptr< Driver >, std::string > EL::UnitTestFixture::m_jobs |
|
staticprivate |
The documentation for this class was generated from the following files: