ARTEMIS-CRIB
 
Loading...
Searching...
No Matches
art::crib::TMUXDataMappingProcessor Class Reference

A processor for mapping categorized data to TMUXData objects. More...

#include <TMUXDataMappingProcessor.h>

Inheritance diagram for art::crib::TMUXDataMappingProcessor:
[legend]
Collaboration diagram for art::crib::TMUXDataMappingProcessor:
[legend]

Public Member Functions

 TMUXDataMappingProcessor ()
 Constructor.
 
 ~TMUXDataMappingProcessor () override
 Destructor.
 
void Init (TEventCollection *col) override
 Initializes the processor with the provided event collection.
 
void Process () override
 Processes the categorized data and maps it to TMUXData.
 
int ProcessDetectorData (const TObjArray *det_array, TMUXData *mux)
 Processes data for a single detector.
 

Private Member Functions

 TMUXDataMappingProcessor (const TMUXDataMappingProcessor &)=delete
 
 ClassDefOverride (TMUXDataMappingProcessor, 2)
 ROOT macro for class definition.
 
TMUXDataMappingProcessoroperator= (const TMUXDataMappingProcessor &)=delete
 

Private Attributes

TCategorizedData ** fCategorizedData
 ! Pointer to the categorized data collection.
 
TString fCategorizedDataName
 Name of the input categorized data collection.
 
Int_t fCatID
 Category ID used for filtering input data.
 
TClonesArray * fOutData
 ! Pointer to the output TMUXData array.
 
TString fOutputColName
 Name of the output TMUXData collection.
 

Detailed Description

A processor for mapping categorized data to TMUXData objects.

This class processes categorized input data (TCategorizedData) and maps it to output objects (TMUXData), which are stored in a TClonesArray. The mapping is controlled by a specified category ID (fCatID) and involves extracting and transforming raw detector values.

Example Steering File

Processor:
- name: MyTMUXDataMappingProcessor
type: art::crib::TMUXDataMappingProcessor
parameter:
CatID: -1 # [Int_t] Category ID
CategorizedDataName: catdata # [TString] Name of the segmented data
OutputCollection: mux # [TString] Name of the output branch
OutputTransparency: 0 # [Bool_t] Persistent output (default: false)
Verbose: 1 # [Int_t] Verbosity level (default: 1)

Definition at line 47 of file TMUXDataMappingProcessor.h.

Constructor & Destructor Documentation

◆ TMUXDataMappingProcessor() [1/2]

art::crib::TMUXDataMappingProcessor::TMUXDataMappingProcessor ( )

Constructor.

The constructor initializes the processor by setting up input/output collection names and default parameter values. These values can be overridden via the steering file or configuration options.

Definition at line 29 of file TMUXDataMappingProcessor.cc.

◆ ~TMUXDataMappingProcessor()

art::crib::TMUXDataMappingProcessor::~TMUXDataMappingProcessor ( )
override

Destructor.

The destructor ensures that dynamically allocated memory for fOutData is properly released to prevent memory leaks.

Definition at line 44 of file TMUXDataMappingProcessor.cc.

◆ TMUXDataMappingProcessor() [2/2]

art::crib::TMUXDataMappingProcessor::TMUXDataMappingProcessor ( const TMUXDataMappingProcessor & )
privatedelete

Member Function Documentation

◆ ClassDefOverride()

art::crib::TMUXDataMappingProcessor::ClassDefOverride ( TMUXDataMappingProcessor ,
2  )
private

ROOT macro for class definition.

◆ Init()

void art::crib::TMUXDataMappingProcessor::Init ( TEventCollection * col)
override

Initializes the processor with the provided event collection.

Parameters
colPointer to the TEventCollection containing input and output collections.

During initialization, the processor retrieves the input categorized data collection from the provided event collection and validates its type. It also initializes the output data array (fOutData) as a TClonesArray of TMUXData objects.

If the required input collection or parameters are invalid, an error state is set, and processing will not proceed.

Definition at line 59 of file TMUXDataMappingProcessor.cc.

◆ operator=()

TMUXDataMappingProcessor & art::crib::TMUXDataMappingProcessor::operator= ( const TMUXDataMappingProcessor & )
privatedelete

◆ Process()

void art::crib::TMUXDataMappingProcessor::Process ( )
override

Processes the categorized data and maps it to TMUXData.

Processes the categorized data and maps it to TMUXData objects. For each detector, the method extracts relevant data and creates a TMUXData object in the output array.

If the input collection is not initialized or the specified category is not found, appropriate warnings are logged, and the method exits early.

Definition at line 93 of file TMUXDataMappingProcessor.cc.

◆ ProcessDetectorData()

int art::crib::TMUXDataMappingProcessor::ProcessDetectorData ( const TObjArray * det_array,
TMUXData * mux )

Processes data for a single detector.

Parameters
det_arrayPointer to the array of raw data for the detector.
muxPointer to the TMUXData object where mapped values will be stored.
Returns
The detector ID associated with the processed data.

Processes data for a single detector and maps it to a TMUXData object. This method extracts energy, position, and timing data from the raw detector arrays and assigns them to the corresponding fields in mux.

Special handling is applied to timing data to aggregate multiple values.

Definition at line 126 of file TMUXDataMappingProcessor.cc.

Member Data Documentation

◆ fCategorizedData

TCategorizedData** art::crib::TMUXDataMappingProcessor::fCategorizedData
private

! Pointer to the categorized data collection.

Definition at line 83 of file TMUXDataMappingProcessor.h.

◆ fCategorizedDataName

TString art::crib::TMUXDataMappingProcessor::fCategorizedDataName
private

Name of the input categorized data collection.

Definition at line 80 of file TMUXDataMappingProcessor.h.

◆ fCatID

Int_t art::crib::TMUXDataMappingProcessor::fCatID
private

Category ID used for filtering input data.

Definition at line 86 of file TMUXDataMappingProcessor.h.

◆ fOutData

TClonesArray* art::crib::TMUXDataMappingProcessor::fOutData
private

! Pointer to the output TMUXData array.

Definition at line 84 of file TMUXDataMappingProcessor.h.

◆ fOutputColName

TString art::crib::TMUXDataMappingProcessor::fOutputColName
private

Name of the output TMUXData collection.

Definition at line 81 of file TMUXDataMappingProcessor.h.


The documentation for this class was generated from the following files:
return to the guide