Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
CopyDataTask.cxx
1/*
2 * CopyDataTask.cxx
3 *
4 * Created on: 06-11-2014
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9
10#include "CopyDataTask.h"
11
12#include "Cout.h"
13#include "Event.h"
14#include "Task.h"
15
16
17namespace Hal {
18 CopyDataTask::CopyDataTask() : fInputData(NULL) {}
19
20 void CopyDataTask::Exec(Option_t* /*opt*/) {}
21
22 Task::EInitFlag CopyDataTask::Init() {
23 if (fInputData == nullptr) return Task::EInitFlag::kFATAL;
24 Hal::EventInterface* interface = fInputData->CreateInterface();
25 interface->ConnectToTree(Hal::EventInterface::eMode::kRead);
26 interface->ConnectToTree(Hal::EventInterface::eMode::kWrite);
27 return Task::EInitFlag::kSUCCESS;
28 }
29
30 void CopyDataTask::SetFormat(Event* event) {
31 if (fInputData) {
32 Cout::PrintInfo("Overwriting format in CopyDataTask", EInfo::kLowWarning);
33 fInputData = event;
34 }
35 }
36
37 CopyDataTask::~CopyDataTask() {
38 // TODO Auto-generated destructor stub
39 }
40} // namespace Hal