-
Notifications
You must be signed in to change notification settings - Fork 163
Expand file tree
/
Copy pathtestQcExample.cxx
More file actions
55 lines (41 loc) · 1.35 KB
/
testQcExample.cxx
File metadata and controls
55 lines (41 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
///
/// \file testQcExample.cxx
/// \author Barthelemy von Haller
///
#include "Example/ExampleTask.h"
#include "QualityControl/TaskFactory.h"
#include <TSystem.h>
#define BOOST_TEST_MODULE QcExample test
#define BOOST_TEST_MAIN
#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include <TH1.h>
using namespace std;
namespace o2::quality_control_modules::example
{
BOOST_AUTO_TEST_CASE(insantiate_task)
{
ExampleTask task;
TaskRunnerConfig config;
config.consulUrl = "";
config.name = "qcExampleTest";
config.detectorName = "TST";
auto manager = make_shared<ObjectsManager>(config.name, "ExampleTask", config.detectorName, 0);
task.setObjectsManager(manager);
// task.initialize();// TODO
// BOOST_CHECK(task.getHisto1() != nullptr);
// BOOST_CHECK(task.getHisto2() != nullptr);
Activity activity;
task.startOfActivity(activity);
// task.startOfCycle();
// auto producer = AliceO2::DataSampling::DataBlockProducer(false, 1024);
// DataSetReference dataSet = producer.getDataSet();
// task.monitorDataBlock(dataSet);// TODO
// BOOST_CHECK(task.getHisto1()->GetEntries() > 0);
// task.endOfCycle();
task.endOfActivity(activity);
task.startOfActivity(activity);
// BOOST_CHECK(task.getHisto1()->GetEntries() == 0);
task.endOfActivity(activity);
}
} // namespace o2::quality_control_modules::example