R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BReader.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3 * Copyright (C) 2019-2025 Members of R3B Collaboration *
4 * *
5 * This software is distributed under the terms of the *
6 * GNU General Public Licence (GPL) version 3, *
7 * copied verbatim in the file "LICENSE". *
8 * *
9 * In applying this license GSI does not waive the privileges and immunities *
10 * granted to it by virtue of its status as an Intergovernmental Organization *
11 * or submit itself to any jurisdiction. *
12 ******************************************************************************/
13
14#pragma once
15
16#include <R3BUcesbMappingFlag.h>
17#include <TNamed.h>
18#include <TString.h>
19
20#include <ext_data_struct_info.hh>
21
22class TClonesArray;
23class R3BEventHeader;
24
25class R3BReader : public TNamed
26{
27 public:
28 R3BReader(TString const&);
29 virtual ~R3BReader();
30 [[nodiscard]] virtual bool MismappedItemRequired(std::string_view /*item_name*/) const { return false; }
31 bool AllowExtraCondition(R3B::UcesbMap map_flag, R3B::UcesbMap success_condition)
32 {
33 return (map_flag & ~(success_condition | extra_conditions_)) == R3B::UcesbMap::zero;
34 }
35
36 void SetExtraConditions(R3B::UcesbMap conditions) { extra_conditions_ = conditions; }
37 void AddExtraConditions(R3B::UcesbMap conditions) { extra_conditions_ |= conditions; }
38
39 /* Setup structure information */
40 virtual Bool_t Init(ext_data_struct_info*) = 0;
41 virtual void SetParContainers() {}
42 virtual Bool_t ReInit() { return kTRUE; }
43 /* Read data from full event structure */
44 virtual Bool_t R3BRead() = 0;
45 /* Reset */
46 virtual void Reset() = 0;
47 /* Return actual name of the reader */
48
49 // actions when closed
50 virtual void Close() {};
51
52 private:
53 R3B::UcesbMap extra_conditions_ = R3B::UcesbMap::zero;
54
55 public:
57};
void SetExtraConditions(R3B::UcesbMap conditions)
Definition R3BReader.h:36
virtual Bool_t ReInit()
Definition R3BReader.h:42
R3BReader(TString const &)
Definition R3BReader.cxx:16
virtual Bool_t Init(ext_data_struct_info *)=0
virtual void Reset()=0
virtual void SetParContainers()
Definition R3BReader.h:41
ClassDef(R3BReader, 0)
virtual ~R3BReader()
Definition R3BReader.cxx:21
void AddExtraConditions(R3B::UcesbMap conditions)
Definition R3BReader.h:37
virtual void Close()
Definition R3BReader.h:50
bool AllowExtraCondition(R3B::UcesbMap map_flag, R3B::UcesbMap success_condition)
Definition R3BReader.h:31
virtual Bool_t R3BRead()=0
virtual bool MismappedItemRequired(std::string_view) const
Definition R3BReader.h:30