musrfit 1.10.0
PRawRunDataVector Class Reference

#include <PMusr.h>

Public Member Functions

 PRawRunDataVector ()
 
virtual ~PRawRunDataVector ()
 
virtual UInt_t Size ()
 Returns the number of histogram data sets in this vector.
 
virtual Bool_t IsPresent (UInt_t histoNo)
 
virtual PRawRunDataSetGetSet (UInt_t idx)
 
virtual PRawRunDataSetGet (UInt_t histoNo)
 
virtual PRawRunDataSetoperator[] (UInt_t histoNo)
 
virtual PDoubleVectorGetData (UInt_t histoNo)
 
virtual Double_t GetT0Bin (UInt_t histoNo)
 
virtual Double_t GetT0BinEstimated (UInt_t histoNo)
 
virtual PIntPair GetBkgBin (UInt_t histoNo)
 
virtual PIntPair GetGoodDataBin (UInt_t histoNo)
 
virtual void Set (PRawRunDataSet dataSet, Int_t idx=-1)
 

Private Attributes

std::vector< PRawRunDataSetfDataVec
 

Detailed Description

Vector container for multiple PRawRunDataSet objects with flexible indexing.

This class manages a collection of raw histogram data sets, providing both sequential indexing (0, 1, 2, ...) and histogram-number-based access. The flexible indexing is necessary because histogram numbers in data files (especially MusrRoot files with Red/Green options) may not be contiguous.

Example: A MusrRoot file might contain histograms numbered [1, 2, 5, 6] (Red group) and [21, 22, 25, 26] (Green group with offset).

Definition at line 715 of file PMusr.h.

Constructor & Destructor Documentation

◆ PRawRunDataVector()

PRawRunDataVector::PRawRunDataVector ( )
inline

Definition at line 717 of file PMusr.h.

◆ ~PRawRunDataVector()

virtual PRawRunDataVector::~PRawRunDataVector ( )
inlinevirtual

Definition at line 718 of file PMusr.h.

References fDataVec.

Member Function Documentation

◆ Get()

PRawRunDataSet * PRawRunDataVector::Get ( UInt_t histoNo)
virtual

Gets histogram data set by histogram number.

Parameters
histoNoHistogram number from data file
Returns
Pointer to histogram data set, or nullptr if not found

Get the raw data set with histogram number histoNo.

return:

  • pointer to the raw data set if found
  • 0 otherwise
Parameters
histoNohistogram number requested

Definition at line 341 of file PMusr.cpp.

References fDataVec.

Referenced by operator[]().

◆ GetBkgBin()

PIntPair PRawRunDataVector::GetBkgBin ( UInt_t histoNo)
virtual

Gets background bin range for specified histogram.

Parameters
histoNoHistogram number
Returns
Pair (first bin, last bin) of background range

Get the background bins (start, end).

return:

  • background bins if found
  • (-1, -1) otherwise
Parameters
histoNohistogram number requested

Definition at line 462 of file PMusr.cpp.

References fDataVec.

◆ GetData()

PDoubleVector * PRawRunDataVector::GetData ( UInt_t histoNo)
virtual

Gets histogram data vector by histogram number.

Parameters
histoNoHistogram number
Returns
Pointer to data vector, or nullptr if not found

Get the raw data set data with histogram number histoNo.

return:

  • pointer to the raw data set if found
  • 0 otherwise
Parameters
histoNohistogram number requested

Definition at line 384 of file PMusr.cpp.

References fDataVec.

◆ GetGoodDataBin()

PIntPair PRawRunDataVector::GetGoodDataBin ( UInt_t histoNo)
virtual

Gets good data bin range for specified histogram.

Parameters
histoNoHistogram number
Returns
Pair (first bin, last bin) of good data range

Get the first/last good data bin (fgb, lgb).

return:

  • good data bins if found
  • (-1, -1) otherwise
Parameters
histoNohistogram number requested

Definition at line 489 of file PMusr.cpp.

References fDataVec.

◆ GetSet()

PRawRunDataSet * PRawRunDataVector::GetSet ( UInt_t idx)
virtual

Gets histogram data set by sequential index (0, 1, 2, ...).

Parameters
idxSequential index in vector
Returns
Pointer to histogram data set, or nullptr if index out of range

Get the raw data set with the index idx. This routine is different to PRawRunDataVector::Get(UInt_t histoNo) where the internal saved histogram number is used.

return:

  • pointer to the raw data set if found
  • 0 otherwise
Parameters
idxdata set index

Definition at line 319 of file PMusr.cpp.

References fDataVec.

◆ GetT0Bin()

Double_t PRawRunDataVector::GetT0Bin ( UInt_t histoNo)
virtual

Gets time-zero bin for specified histogram.

Parameters
histoNoHistogram number
Returns
Time-zero bin value

Get the T0 bin of raw run data with histogram number histoNo.

return:

  • T0 bin if found
  • PMUSR_UNDEFINED otherwise
Parameters
histoNohistogram number requested

Definition at line 410 of file PMusr.cpp.

References fDataVec.

◆ GetT0BinEstimated()

Double_t PRawRunDataVector::GetT0BinEstimated ( UInt_t histoNo)
virtual

Gets estimated time-zero bin for specified histogram.

Parameters
histoNoHistogram number
Returns
Estimated time-zero bin value

Get the estimated T0 bin of raw run data with histogram number histoNo.

return:

  • estimated T0 bin if found
  • PMUSR_UNDEFINED otherwise
Parameters
histoNohistogram number requested

Definition at line 436 of file PMusr.cpp.

References fDataVec, and PMUSR_UNDEFINED.

◆ IsPresent()

Bool_t PRawRunDataVector::IsPresent ( UInt_t histoNo)
virtual

Checks if a histogram with given number exists in the vector.

Parameters
histoNoHistogram number to search for
Returns
true if histogram is present, false otherwise

Checks if the histogram set with histgram number histoNo is present.

return:

  • true if found
  • false otherwise
Parameters
histoNohistogram number requested

Definition at line 291 of file PMusr.cpp.

References fDataVec.

◆ operator[]()

PRawRunDataSet * PRawRunDataVector::operator[] ( UInt_t histoNo)
virtual

Operator overload for histogram-number-based access.

Parameters
histoNoHistogram number from data file
Returns
Pointer to histogram data set

Get the raw data set with histogram number histoNo.

return:

  • pointer to the raw data set if found
  • 0 otherwise
Parameters
histoNohistogram number requested

Definition at line 367 of file PMusr.cpp.

References Get().

◆ Set()

void PRawRunDataVector::Set ( PRawRunDataSet dataSet,
Int_t idx = -1 )
virtual

Adds or updates a histogram data set in the vector.

Parameters
dataSetHistogram data set to add
idxOptional index; if -1 (default), appends to end

Set a data set at idx. If idx == -1 append it at the end (default), otherwise check if idx is within bounds and if yes, place it there, otherwise resize the data vector and place it where requested.

Parameters
dataSetdata set to be set
idxindex at which to place the data set.

Definition at line 515 of file PMusr.cpp.

References fDataVec.

◆ Size()

virtual UInt_t PRawRunDataVector::Size ( )
inlinevirtual

Returns the number of histogram data sets in this vector.

Definition at line 721 of file PMusr.h.

References fDataVec.

Member Data Documentation

◆ fDataVec

std::vector<PRawRunDataSet> PRawRunDataVector::fDataVec
private

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