ATLAS Offline Software
Loading...
Searching...
No Matches
UnitTestFixture.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7
8#ifndef EVENT_LOOP__UNIT_TEST_FIXTURE_H
9#define EVENT_LOOP__UNIT_TEST_FIXTURE_H
10
12
13class TH1;
14
15#include <EventLoop/Job.h>
16#include <gtest/gtest.h>
17#include <map>
18#include <memory>
19
20namespace EL
21{
22 class UnitTestFixture : public ::testing::TestWithParam<UnitTestConfig>
23 {
24 public:
25 std::string getJob ();
26
27 SH::SamplePtr getSample (const std::string& sameName);
28
30
31 unsigned eventCount (const std::string& sampleName);
32
33 TObject *getTObject (const std::string& sampleName,
34 const std::string& objectName,
35 bool isMandatory);
36
37 template<typename T>
38 T *getHist (const std::string& sampleName,
39 const std::string& objectName,
40 bool isMandatory);
41
42 TH1 *getCallbacks (const std::string& sampleName);
43
44 void checkFileExecuted (const std::string& sampleName);
45
46 private:
47 static std::map<std::shared_ptr<Driver>,std::string> m_jobs;
48
49 private:
50 std::string makeFile (const std::vector<unsigned>& entries);
51 };
52}
53
54#include "UnitTestFixture.ihh"
55
56#endif
static std::map< std::shared_ptr< Driver >, std::string > m_jobs
TH1 * getCallbacks(const std::string &sampleName)
SH::SamplePtr getSample(const std::string &sameName)
void checkFileExecuted(const std::string &sampleName)
TObject * getTObject(const std::string &sampleName, const std::string &objectName, bool isMandatory)
unsigned eventCount(const std::string &sampleName)
SH::SampleHandler getSH()
T * getHist(const std::string &sampleName, const std::string &objectName, bool isMandatory)
std::string makeFile(const std::vector< unsigned > &entries)
A class that manages a list of Sample objects.
A smart pointer class that holds a single Sample object.
Definition SamplePtr.h:35
double entries
Definition listroot.cxx:49
This module defines the arguments passed from the BATCH driver to the BATCH worker.