ARTEMIS-CRIB
 
Loading...
Searching...
No Matches
TMUXDataMappingProcessor.h
Go to the documentation of this file.
1/**
2 * @file TMUXDataMappingProcessor.h
3 * @brief Declaration of TMUXDataMappingProcessor class for mapping categorized data to TMUXData objects.
4 * @author Kodai Okawa <okawa@cns.s.u-tokyo.ac.jp>
5 * @date 2022-01-30 09:46:45
6 * @note last modified: 2025-03-05 18:32:13
7 * @details
8 */
9
10#ifndef CRIB_TMUXDATAMAPPINGPROCESSOR_H_
11#define CRIB_TMUXDATAMAPPINGPROCESSOR_H_
12
13#include <TProcessor.h>
14
15class TClonesArray;
16
17namespace art {
18class TCategorizedData;
19} // namespace art
20
21namespace art::crib {
22class TMUXData;
23
24/**
25 * @class TMUXDataMappingProcessor
26 * @brief A processor for mapping categorized data to TMUXData objects.
27 *
28 * This class processes categorized input data (`TCategorizedData`) and maps it
29 * to output objects (`TMUXData`), which are stored in a `TClonesArray`. The
30 * mapping is controlled by a specified category ID (`fCatID`) and involves
31 * extracting and transforming raw detector values.
32 *
33 * ### Example Steering File
34 *
35 * ```yaml
36 * Processor:
37 * - name: MyTMUXDataMappingProcessor
38 * type: art::crib::TMUXDataMappingProcessor
39 * parameter:
40 * CatID: -1 # [Int_t] Category ID
41 * CategorizedDataName: catdata # [TString] Name of the segmented data
42 * OutputCollection: mux # [TString] Name of the output branch
43 * OutputTransparency: 0 # [Bool_t] Persistent output (default: false)
44 * Verbose: 1 # [Int_t] Verbosity level (default: 1)
45 * ```
46 */
48 public:
49 /**
50 * @brief Constructor.
51 */
53
54 /**
55 * @brief Destructor.
56 */
58
59 /**
60 * @brief Initializes the processor with the provided event collection.
61 * @param col Pointer to the `TEventCollection` containing input and output collections.
62 */
63 void Init(TEventCollection *col) override;
64
65 /**
66 * @brief Processes the categorized data and maps it to TMUXData.
67 */
68 void Process() override;
69
70 /**
71 * @brief Processes data for a single detector.
72 *
73 * @param det_array Pointer to the array of raw data for the detector.
74 * @param mux Pointer to the TMUXData object where mapped values will be stored.
75 * @return The detector ID associated with the processed data.
76 */
77 int ProcessDetectorData(const TObjArray *det_array, TMUXData *mux);
78
79 private:
80 TString fCategorizedDataName; ///< Name of the input categorized data collection.
81 TString fOutputColName; ///< Name of the output TMUXData collection.
82
83 TCategorizedData **fCategorizedData; ///<! Pointer to the categorized data collection.
84 TClonesArray *fOutData; ///<! Pointer to the output TMUXData array.
85
86 Int_t fCatID; ///< Category ID used for filtering input data.
87
90
91 ClassDefOverride(TMUXDataMappingProcessor, 2); ///< ROOT macro for class definition.
92};
93} // namespace art::crib
94
95#endif // CRIB_TMUXDATAMAPPINGPROCESSOR_H_
A processor for mapping categorized data to TMUXData objects.
Int_t fCatID
Category ID used for filtering input data.
void Init(TEventCollection *col) override
Initializes the processor with the provided event collection.
TCategorizedData ** fCategorizedData
! Pointer to the categorized data collection.
TString fOutputColName
Name of the output TMUXData collection.
TMUXDataMappingProcessor & operator=(const TMUXDataMappingProcessor &)=delete
TClonesArray * fOutData
! Pointer to the output TMUXData array.
int ProcessDetectorData(const TObjArray *det_array, TMUXData *mux)
Processes data for a single detector.
void Process() override
Processes the categorized data and maps it to TMUXData.
TString fCategorizedDataName
Name of the input categorized data collection.
TMUXDataMappingProcessor(const TMUXDataMappingProcessor &)=delete
ClassDefOverride(TMUXDataMappingProcessor, 2)
ROOT macro for class definition.
Represents data from the MUX module (E1, E2, P1, P2, T).
Definition TMUXData.h:25
return to the guide