ARTEMIS-CRIB
 
Loading...
Searching...
No Matches
TBranchCopyProcessor.h
Go to the documentation of this file.
1/**
2 * @file TBranchCopyProcessor.h
3 * @brief
4 * @author Kodai Okawa<okawa@cns.s.u-tokyo.ac.jp>
5 * @date 2023-06-13 16:06:58
6 * @note last modified: 2025-03-05 18:28:23
7 * @details
8 */
9
10#ifndef CRIB_TBRANCHCOPYPROCESSOR_H_
11#define CRIB_TBRANCHCOPYPROCESSOR_H_
12
13#include <TProcessor.h>
14
15class TClonesArray;
16
17namespace art::crib {
18
19/**
20 * @class TBranchCopyProcessor
21 * @brief Processor for copying data from one TClonesArray to another.
22 *
23 * ### Example Steering File
24 *
25 * ```yaml
26 * Processor:
27 * - name: MyTBranchCopyProcessor
28 * type: art::crib::TBranchCopyProcessor
29 * parameter:
30 * InputCollection: origin # [TString] name of the origin branch
31 * OutputCollection: copy # [TString] output collection name
32 * OutputTransparency: 0 # [Bool_t] Output is persistent if false (default)
33 * Verbose: 1 # [Int_t] verbose level (default 1 : non quiet)
34 * ```
35 */
37 public:
38 /**
39 * @brief Constructor.
40 */
42
43 /**
44 * @brief Destructor.
45 */
46 ~TBranchCopyProcessor() override;
47
48 /**
49 * @brief Initializes the processor with the given event collection.
50 *
51 * @param col Pointer to the event collection.
52 */
53 void Init(TEventCollection *col) override;
54
55 /**
56 * @brief Processes the data by copying from input to output collection.
57 */
58 void Process() override;
59
60 protected:
61 TString fInputColName{"origin"}; ///< Name of the input collection.
62 TString fOutputColName{"copy"}; ///< Name of the output collection.
63 TClonesArray **fInData{nullptr}; ///<! Pointer to the input data
64 TClonesArray *fOutData{nullptr}; ///<! Pointer to the output data.
65
66 private:
69
70 ClassDefOverride(TBranchCopyProcessor, 2); ///< ROOT class definition macro.
71};
72
73} // namespace art::crib
74
75#endif // end of #ifndef CRIB_TBRANCHCOPYPROCESSOR_H_
Processor for copying data from one TClonesArray to another.
~TBranchCopyProcessor() override
Destructor.
TString fInputColName
Name of the input collection.
ClassDefOverride(TBranchCopyProcessor, 2)
ROOT class definition macro.
TClonesArray ** fInData
! Pointer to the input data
TClonesArray * fOutData
! Pointer to the output data.
TBranchCopyProcessor(const TBranchCopyProcessor &)=delete
TString fOutputColName
Name of the output collection.
void Process() override
Processes the data by copying from input to output collection.
TBranchCopyProcessor & operator=(const TBranchCopyProcessor &)=delete
void Init(TEventCollection *col) override
Initializes the processor with the given event collection.
return to the guide