REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestLegacyProcess.h
1/*************************************************************************
2 * This file is part of the REST software framework. *
3 * *
4 * Copyright (C) 2016 GIFNA/TREX (University of Zaragoza) *
5 * For more information see http://gifna.unizar.es/trex *
6 * *
7 * REST is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * REST is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have a copy of the GNU General Public License along with *
18 * REST in $REST_PATH/LICENSE. *
19 * If not, see http://www.gnu.org/licenses/. *
20 * For the list of contributors see $REST_PATH/CREDITS. *
21 *************************************************************************/
22
23#ifndef RestCore_TRestLegacyProcess
24#define RestCore_TRestLegacyProcess
25
26#include "TRestEventProcess.h"
27
30 public:
31 RESTValue GetInputEvent() const final { return RESTValue((TRestEvent*)nullptr); }
32 RESTValue GetOutputEvent() const final { return RESTValue((TRestEvent*)nullptr); }
33
34 void InitProcess() final{};
35 TRestEvent* ProcessEvent(TRestEvent* eventInput) final {
36 RESTError << "You are trying to execute a legacy process" << RESTendl;
37 RESTError << "This is not allow, this class is kept for backward compatibility" << RESTendl;
38 exit(1);
39 return nullptr;
40 }
41 void EndProcess() final{};
42
44 void PrintMetadata() override {}
45
47 const char* GetProcessName() const final { return "legacyProcess"; }
48
50 TRestLegacyProcess(char* cfgFileName) {}
52
53 ClassDefOverride(TRestLegacyProcess, 0);
54};
55#endif
A base class for any REST event process.
A base class for any REST event.
Definition: TRestEvent.h:38
Base class for legacy process.
RESTValue GetOutputEvent() const final
Get pointer to output event. Must be implemented in the derived class.
void InitProcess() final
To be executed at the beginning of the run (outside event loop)
TRestEvent * ProcessEvent(TRestEvent *eventInput) final
Process one event.
void EndProcess() final
To be executed at the end of the run (outside event loop)
const char * GetProcessName() const final
Returns the name of this process.
RESTValue GetInputEvent() const final
Get pointer to input event. Must be implemented in the derived class.
void PrintMetadata() override
It prints out the process parameters stored in the metadata structure.
endl_t RESTendl
Termination flag object for TRestStringOutput.