Project
Loading...
Searching...
No Matches
o2::tpc::TPCScaler Class Reference

#include <TPCScaler.h>

Public Member Functions

 TPCScaler ()=default
 default constructor
 
TPCScaleroperator= (TPCScaler &&other)=default
 default move assignment
 
int getNValues (o2::tpc::Side side) const
 
void setScaler (const std::vector< float > &values, const o2::tpc::Side side)
 
void setIonDriftTimeMS (float ionDriftTimeMS)
 
void setRun (int run)
 
void setFirstTFOrbit (unsigned int firstTFOrbit)
 
void setStartTimeStampMS (double timeStampMS)
 
void setIntegrationTimeMS (float integrationTimeMS)
 
void dumpToFile (const char *file, const char *name)
 
void dumpToFile (const char *file, const char *name, double startTimeMS, double endTimeMS)
 
void dumpToFileSlices (const char *file, const char *name, int minutesPerObject, float marginMS=500, float marginCCDBMinutes=1)
 
void loadFromFile (const char *inpf, const char *name)
 
void setFromTree (TTree &tpcScalerTree)
 set this object from input tree
 
float getScalers (unsigned int idx, o2::tpc::Side side) const
 
const auto & getScalers (o2::tpc::Side side) const
 
float getIonDriftTimeMS () const
 
int getRun () const
 
unsigned int getFirstTFOrbit () const
 
double getStartTimeStampMS () const
 
double getEndTimeStampMS (o2::tpc::Side side) const
 
float getIntegrationTimeMS () const
 
int getNValuesIonDriftTime () const
 
float getMeanScaler (double timestamp, o2::tpc::Side side) const
 
float getDurationMS (o2::tpc::Side side) const
 
void clampScalers (float minThreshold, float maxThreshold, Side side)
 
void setScalerWeights (const TPCScalerWeights &weights)
 setting the weights for the scalers
 
const auto & getScalerWeights () const
 
void useWeights (bool useWeights)
 enable usage of weights
 
bool weightsUsed () const
 return if weights are used
 

Detailed Description

Definition at line 41 of file TPCScaler.h.

Constructor & Destructor Documentation

◆ TPCScaler()

o2::tpc::TPCScaler::TPCScaler ( )
default

default constructor

Member Function Documentation

◆ clampScalers()

void TPCScaler::clampScalers ( float  minThreshold,
float  maxThreshold,
Side  side 
)

clamp scaler values

Parameters
minThresholdminimum accepted scaler value
maxThresholdmaximum accepted scaler value

Definition at line 174 of file TPCScaler.cxx.

◆ dumpToFile() [1/2]

void TPCScaler::dumpToFile ( const char file,
const char name 
)

dump this object to a file

Parameters
fileoutput file

Definition at line 25 of file TPCScaler.cxx.

◆ dumpToFile() [2/2]

void TPCScaler::dumpToFile ( const char file,
const char name,
double  startTimeMS,
double  endTimeMS 
)

dump this object to a file for a given time range

Parameters
fileoutput file
startTimestart time stamp in ms of the dumped object
endTimeend time stamp in ms of the dumped object (if endTimeMS=-1 the end of the stored data is used)

Definition at line 35 of file TPCScaler.cxx.

◆ dumpToFileSlices()

void TPCScaler::dumpToFileSlices ( const char file,
const char name,
int  minutesPerObject,
float  marginMS = 500,
float  marginCCDBMinutes = 1 
)

dump this object to several file each containing the scalers for n minutes

Parameters
fileoutput file
minutesPerObjectminutes each output file is covering
marginMSadditional margin to the beginning of each object (should be >= getIonDriftTimeMS())
marginCCDBMinutesmargin for CCDB timestamp

Definition at line 53 of file TPCScaler.cxx.

◆ getDurationMS()

float o2::tpc::TPCScaler::getDurationMS ( o2::tpc::Side  side) const
inline
Returns
returns duration in ms for which the scalers are defined

Definition at line 128 of file TPCScaler.h.

◆ getEndTimeStampMS()

double o2::tpc::TPCScaler::getEndTimeStampMS ( o2::tpc::Side  side) const
inline
Returns
return end time in ms

Definition at line 115 of file TPCScaler.h.

◆ getFirstTFOrbit()

unsigned int o2::tpc::TPCScaler::getFirstTFOrbit ( ) const
inline
Returns
returns first TF orbit of first data

Definition at line 109 of file TPCScaler.h.

◆ getIntegrationTimeMS()

float o2::tpc::TPCScaler::getIntegrationTimeMS ( ) const
inline
Returns
returns integration time for each scaler value

Definition at line 118 of file TPCScaler.h.

◆ getIonDriftTimeMS()

float o2::tpc::TPCScaler::getIonDriftTimeMS ( ) const
inline
Returns
returns ion drift time in ms

Definition at line 103 of file TPCScaler.h.

◆ getMeanScaler()

float TPCScaler::getMeanScaler ( double  timestamp,
o2::tpc::Side  side 
) const
Returns
returns mean scaler value for last ion drift time
Parameters
timestamptimestamp for which the last values are used to calculate the mean

Definition at line 115 of file TPCScaler.cxx.

◆ getNValues()

int o2::tpc::TPCScaler::getNValues ( o2::tpc::Side  side) const
inline
Returns
returns number of stored TPC scaler values

Definition at line 51 of file TPCScaler.h.

◆ getNValuesIonDriftTime()

int o2::tpc::TPCScaler::getNValuesIonDriftTime ( ) const
inline
Returns
returns numbers of scalers for one ion drift time

Definition at line 121 of file TPCScaler.h.

◆ getRun()

int o2::tpc::TPCScaler::getRun ( ) const
inline
Returns
returns run number for which this object is valid

Definition at line 106 of file TPCScaler.h.

◆ getScalers() [1/2]

const auto & o2::tpc::TPCScaler::getScalers ( o2::tpc::Side  side) const
inline
Returns
returns stored scalers for given side

Definition at line 100 of file TPCScaler.h.

◆ getScalers() [2/2]

float o2::tpc::TPCScaler::getScalers ( unsigned int  idx,
o2::tpc::Side  side 
) const
inline
Returns
returns stored scalers for given side and data index

Definition at line 97 of file TPCScaler.h.

◆ getScalerWeights()

const auto & o2::tpc::TPCScaler::getScalerWeights ( ) const
inline
Returns
returns stored weights for TPC scalers

Definition at line 139 of file TPCScaler.h.

◆ getStartTimeStampMS()

double o2::tpc::TPCScaler::getStartTimeStampMS ( ) const
inline
Returns
return first time in ms

Definition at line 112 of file TPCScaler.h.

◆ loadFromFile()

void TPCScaler::loadFromFile ( const char inpf,
const char name 
)

load parameters from input file (which were written using the writeToFile method)

Parameters
inpfinput file

Definition at line 95 of file TPCScaler.cxx.

◆ operator=()

TPCScaler & o2::tpc::TPCScaler::operator= ( TPCScaler &&  other)
default

default move assignment

◆ setFirstTFOrbit()

void o2::tpc::TPCScaler::setFirstTFOrbit ( unsigned int  firstTFOrbit)
inline
Parameters
firstTFOrbitfirst TF orbit of first data

Definition at line 64 of file TPCScaler.h.

◆ setFromTree()

void TPCScaler::setFromTree ( TTree &  tpcScalerTree)

set this object from input tree

Definition at line 102 of file TPCScaler.cxx.

◆ setIntegrationTimeMS()

void o2::tpc::TPCScaler::setIntegrationTimeMS ( float  integrationTimeMS)
inline
Parameters
integrationTimeMSintegration time for each scaler value

Definition at line 70 of file TPCScaler.h.

◆ setIonDriftTimeMS()

void o2::tpc::TPCScaler::setIonDriftTimeMS ( float  ionDriftTimeMS)
inline
Returns
returns ion drift time in ms

Definition at line 58 of file TPCScaler.h.

◆ setRun()

void o2::tpc::TPCScaler::setRun ( int  run)
inline
Returns
returns run number for which this object is valid

Definition at line 61 of file TPCScaler.h.

◆ setScaler()

void o2::tpc::TPCScaler::setScaler ( const std::vector< float > &  values,
const o2::tpc::Side  side 
)
inline

set TPC scalers

Parameters
valuesscaling values

Definition at line 55 of file TPCScaler.h.

◆ setScalerWeights()

void o2::tpc::TPCScaler::setScalerWeights ( const TPCScalerWeights weights)
inline

setting the weights for the scalers

Definition at line 136 of file TPCScaler.h.

◆ setStartTimeStampMS()

void o2::tpc::TPCScaler::setStartTimeStampMS ( double  timeStampMS)
inline
Parameters
timeStampMSfirst time in ms

Definition at line 67 of file TPCScaler.h.

◆ useWeights()

void o2::tpc::TPCScaler::useWeights ( bool  useWeights)
inline

enable usage of weights

Definition at line 142 of file TPCScaler.h.

◆ weightsUsed()

bool o2::tpc::TPCScaler::weightsUsed ( ) const
inline

return if weights are used

Definition at line 145 of file TPCScaler.h.


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