GRSISort
Created by P.C. Bender
Developement Team: P.C. Bender, R. Dunlop, V. Bildstein
An extension of the ROOT analysis Framework
TChannel Class Reference

The TChannel is designed to hold all non-essential information of a TFragment (now the same as a hit; name, energy coeff, etc..) that would otherwise clog up the FragmentTree. The TChannel class contains a static map to every channel make retrieval fairly easy. The TChannel class also contains the ability to read and write a custom calibration file to set or save the TChannel information. Most of the information is read out of the ODB information in the MIDAS file.

Definition at line 50 of file TChannel.h.

Classes

struct  WaveFormShapePar
 

Public Member Functions

 TChannel ()
 
 TChannel (const char *)
 
 TChannel (TChannel *)
 
 TChannel (const TChannel &)
 
 ~TChannel () override
 
void AddCFDCoefficient (double temp)
 
void AddCTCoefficient (double temp)
 
void AddEFFCoefficient (double temp)
 
void AddEnergyNonlinearityPoint (double x, double y)
 
void AddENGCoefficient (Float_t temp)
 
void AddLEDCoefficient (double temp)
 
void AddTIMECoefficient (double temp)
 
double CalibrateCFD (double) const
 
double CalibrateCFD (int) const
 
double CalibrateEFF (double) const
 
double CalibrateENG (double) const
 
double CalibrateENG (double, int temp_int) const
 
double CalibrateENG (int, int temp_int=0) const
 
double CalibrateLED (double) const
 
double CalibrateLED (int) const
 
double CalibrateTIME (double) const
 
double CalibrateTIME (int) const
 
void Clear (Option_t *opt="") override
 
void DestroyCalibrations ()
 
void DestroyCFDCal ()
 
void DestroyCTCal ()
 
void DestroyEFFCal ()
 
void DestroyEnergyNonlinearity ()
 
void DestroyENGCal ()
 
void DestroyLEDCal ()
 
void DestroyTIMECal ()
 
unsigned int GetAddress () const
 
double GetCFDChi2 () const
 
std::vector< double > GetCFDCoeff () const
 
TClass * GetClassType () const
 
int GetCrystalNumber () const
 
std::vector< double > GetCTCoeff () const
 
int GetDetectorNumber () const
 
EDigitizer GetDigitizerType () const
 
const char * GetDigitizerTypeString () const
 
double GetEFFChi2 () const
 
std::vector< double > GetEFFCoeff () const
 
TGraph GetEnergyNonlinearity () const
 
double GetEnergyNonlinearity (double en) const
 
double GetENGChi2 () const
 
std::vector< Float_t > GetENGCoeff () const
 
int GetIntegration () const
 
double GetLEDChi2 () const
 
std::vector< double > GetLEDCoeff () const
 
const TMnemonicGetMnemonic () const
 
int GetNumber () const
 
int GetSegmentNumber () const
 
int GetStream () const
 
double GetTime (Long64_t timestamp, Float_t cfd, double energy) const
 
double GetTIMEChi2 () const
 
std::vector< double > GetTIMECoeff () const
 
Long64_t GetTimeOffset () const
 
int GetTimeStampUnit () const
 
double GetTZero (double tempd) const
 
double GetTZero (int tempi) const
 
int GetUserInfoNumber () const
 
double GetWaveBaseLine () const
 
double GetWaveDecay () const
 
WaveFormShapePar GetWaveParam () const
 
double GetWaveRise () const
 
void Print (Option_t *opt="") const override
 
void PrintCTCoeffs (Option_t *opt="") const
 
std::string PrintCTToString (Option_t *opt="") const
 
std::string PrintToString (Option_t *opt="") const
 
void SetAddress (unsigned int tmpadd)
 
void SetCFDChi2 (TPriorityValue< double > tmp)
 
void SetCFDCoefficients (TPriorityValue< std::vector< double > > tmp)
 
void SetClassType (TClass *cl_type)
 
void SetCrystalNumber (int tempint)
 
void SetCTCoefficients (TPriorityValue< std::vector< double > > tmp)
 
void SetDetectorNumber (int tempint)
 
void SetDigitizerType (TPriorityValue< std::string > tmp)
 
void SetEFFChi2 (TPriorityValue< double > tmp)
 
void SetEFFCoefficients (TPriorityValue< std::vector< double > > tmp)
 
void SetEnergyNonlinearity (TPriorityValue< TGraph > tmp)
 
void SetENGChi2 (TPriorityValue< double > tmp)
 
void SetENGCoefficients (TPriorityValue< std::vector< Float_t > > tmp)
 
void SetIntegration (TPriorityValue< int > tmp)
 
void SetLEDChi2 (TPriorityValue< double > tmp)
 
void SetLEDCoefficients (TPriorityValue< std::vector< double > > tmp)
 
void SetName (const char *tmpName) override
 
void SetNumber (TPriorityValue< int > tmp)
 
void SetSegmentNumber (int tempint)
 
void SetStream (TPriorityValue< int > tmp)
 
void SetTIMEChi2 (TPriorityValue< double > tmp)
 
void SetTIMECoefficients (TPriorityValue< std::vector< double > > tmp)
 
void SetTimeOffset (TPriorityValue< Long64_t > tmp)
 
void SetUseCalFileIntegration (TPriorityValue< bool > tmp=TPriorityValue< bool >(true, EPriority::kUser))
 
void SetUserInfoNumber (TPriorityValue< int > tmp)
 
void SetUseWaveParam (bool temp=true)
 
void SetWaveBaseLine (double temp)
 
void SetWaveDecay (double temp)
 
void SetWaveParam (WaveFormShapePar temp)
 
void SetWaveRise (double temp)
 
bool UseCalFileIntegration ()
 
bool UseWaveParam () const
 

Static Public Member Functions

static void AddChannel (TChannel *, Option_t *opt="")
 
static bool CompareChannels (const TChannel &, const TChannel &)
 
static void DeleteAllChannels ()
 
static TChannelFindChannelByName (const char *ccName)
 
static std::vector< TChannel * > FindChannelByRegEx (const char *ccName)
 
static TChannelGetChannel (unsigned int temp_address, bool warn=false)
 
static TChannelGetChannelByNumber (int temp_num)
 
static std::unordered_map< unsigned int, TChannel * > * GetChannelMap ()
 
static TChannelGetDefaultChannel ()
 
static std::unordered_map< unsigned int, int > * GetMissingChannelMap ()
 
static TClassRef GetMnemonicClass ()
 
static int GetNumberOfChannels ()
 
static Int_t ParseInputData (const char *inputdata="", Option_t *opt="", EPriority pr=EPriority::kUser)
 
static Int_t ReadCalFile (const char *filename="")
 
static Int_t ReadCalFromCurrentFile (Option_t *opt="overwrite")
 
static Int_t ReadCalFromFile (TFile *tempf, Option_t *opt="overwrite")
 
static Int_t ReadCalFromTree (TTree *, Option_t *opt="overwrite")
 
static void ReadEnergyNonlinearities (TFile *, const char *graphName="EnergyNonlinearity0x", bool all=false)
 
static void SetDigitizerType (const std::string &mnemonic, const char *tmpstr, EPriority pr)
 
static void SetIntegration (const std::string &mnemonic, int tmpint, EPriority pr)
 
static void SetMnemonicClass (TClassRef cl)
 
static void SetUseCalFileIntegration (const std::string &mnemonic, bool flag, EPriority pr)
 
static int UpdateChannel (TChannel *, Option_t *opt="")
 
static void WriteCalBuffer (Option_t *opt="")
 
static void WriteCalFile (const std::string &outfilename="")
 
static void WriteCTCorrections (const std::string &outfilename="")
 
static int WriteToRoot (TFile *fileptr=nullptr)
 

Private Member Functions

void AppendChannel (TChannel *)
 
void OverWriteChannel (TChannel *)
 
void SetupEnergyNonlinearity ()
 

Static Private Member Functions

static void InitChannelInput ()
 
static Int_t ReadFile (TFile *tempf)
 
static void SaveToSelf (const char *)
 
static std::vector< TChannel * > SortedChannels ()
 
static void trim (std::string &)
 

Private Attributes

unsigned int fAddress {0}
 
TPriorityValue< double > fCFDChi2
 
TPriorityValue< std::vector< double > > fCFDCoefficients
 
int fCrystalNumber
 
TPriorityValue< std::vector< double > > fCTCoefficients
 
int fDetectorNumber
 
TPriorityValue< EDigitizerfDigitizerType
 
TPriorityValue< std::string > fDigitizerTypeString
 
TPriorityValue< double > fEFFChi2
 
TPriorityValue< std::vector< double > > fEFFCoefficients
 
TPriorityValue< TGraph > fEnergyNonlinearity
 
TPriorityValue< double > fENGChi2
 
TPriorityValue< std::vector< Float_t > > fENGCoefficients
 
TPriorityValue< int > fIntegration {1}
 
TPriorityValue< double > fLEDChi2
 
TPriorityValue< std::vector< double > > fLEDCoefficients
 
TPriorityValue< TMnemonic * > fMnemonic
 
TPriorityValue< int > fNumber {0}
 
int fSegmentNumber
 
TPriorityValue< int > fStream {0}
 
TPriorityValue< double > fTIMEChi2
 
TPriorityValue< std::vector< double > > fTIMECoefficients
 
TPriorityValue< Long64_t > fTimeOffset
 
TPriorityValue< int > fTimeStampUnit {0}
 
TPriorityValue< bool > fUseCalFileInt {false}
 
TPriorityValue< int > fUserInfoNumber {0}
 
WaveFormShapePar WaveFormShape
 

Static Private Attributes

static std::unordered_map< unsigned int, TChannel * > * fChannelMap = new std::unordered_map<unsigned int, TChannel*>
 
static std::unordered_map< int, TChannel * > * fChannelNumberMap = new std::unordered_map<int, TChannel*>
 
static std::string fFileData
 
static std::string fFileName
 
static std::unordered_map< unsigned int, int > * fMissingChannelMap = new std::unordered_map<unsigned int, int>
 
static TClassRef fMnemonicClass = TClassRef("TMnemonic")
 

#include <TChannel.h>

+ Inheritance diagram for TChannel:
+ Collaboration diagram for TChannel:

Constructor & Destructor Documentation

◆ TChannel() [1/4]

TChannel::TChannel ( )

Definition at line 47 of file TChannel.cxx.

References Clear().

Referenced by ParseInputData(), and ReadEnergyNonlinearities().

◆ TChannel() [2/4]

TChannel::TChannel ( const char *  tempName)

Definition at line 54 of file TChannel.cxx.

References Clear(), and SetName().

◆ TChannel() [3/4]

◆ TChannel() [4/4]

◆ ~TChannel()

TChannel::~TChannel ( )
overridedefault

Member Function Documentation

◆ AddCFDCoefficient()

void TChannel::AddCFDCoefficient ( double  temp)
inline

Definition at line 204 of file TChannel.h.

Referenced by ParseInputData(), and TCFDCal::WriteToChannel().

◆ AddChannel()

void TChannel::AddChannel ( TChannel chan,
Option_t *  opt = "" 
)
static

Add a TChannel to fChannelMap. If the TChannel doesn't exist, create a new TChannel and add that the fChannelMap. Options: "overwrite" - The TChannel in the fChannelMap at the same address is overwritten. If this option is not specified, an Error is returned if the TChannel already exists in the fChannelMap. "save" - The temporary channel is not deleted after being placed in the map.

Definition at line 171 of file TChannel.cxx.

References fChannelMap, fChannelNumberMap, GetAddress(), GetChannel(), GetNumber(), and OverWriteChannel().

Referenced by main(), ParseInputData(), ReadEnergyNonlinearities(), TMidasFile::SetGRIFFOdb(), and TMidasFile::SetTIGOdb().

◆ AddCTCoefficient()

void TChannel::AddCTCoefficient ( double  temp)
inline

Definition at line 208 of file TChannel.h.

Referenced by CrossTalkFix(), main(), and ParseInputData().

◆ AddEFFCoefficient()

void TChannel::AddEFFCoefficient ( double  temp)
inline

Definition at line 207 of file TChannel.h.

Referenced by ParseInputData().

◆ AddEnergyNonlinearityPoint()

void TChannel::AddEnergyNonlinearityPoint ( double  x,
double  y 
)
inline

Definition at line 209 of file TChannel.h.

References TPriorityValue< T >::Address().

Referenced by ParseInputData(), and TSourceCalibration::UpdateChannel().

◆ AddENGCoefficient()

void TChannel::AddENGCoefficient ( Float_t  temp)
inline

◆ AddLEDCoefficient()

void TChannel::AddLEDCoefficient ( double  temp)
inline

Definition at line 205 of file TChannel.h.

Referenced by ParseInputData().

◆ AddTIMECoefficient()

void TChannel::AddTIMECoefficient ( double  temp)
inline

Definition at line 206 of file TChannel.h.

Referenced by ParseInputData(), and TTimeCal::WriteToChannel().

◆ AppendChannel()

◆ CalibrateCFD() [1/2]

double TChannel::CalibrateCFD ( double  cfd) const

Returns the calibrated CFD. The polynomial CFD calibration formula is applied to get the calibrated CFD.

Definition at line 546 of file TChannel.cxx.

References fCFDCoefficients.

Referenced by CalibrateCFD(), TTdrMnemonic::GetTime(), and TGRSIMnemonic::GetTime().

◆ CalibrateCFD() [2/2]

double TChannel::CalibrateCFD ( int  cfd) const

Calibrates the CFD properly.

Definition at line 540 of file TChannel.cxx.

References CalibrateCFD().

◆ CalibrateEFF()

double TChannel::CalibrateEFF ( double  ) const

This needs to be added

Definition at line 611 of file TChannel.cxx.

◆ CalibrateENG() [1/3]

double TChannel::CalibrateENG ( double  charge) const

Returns the calibrated energy. The polynomial energy calibration formula is applied to get the calibrated energy. This function does not use the integration parameter.

Definition at line 525 of file TChannel.cxx.

References fENGCoefficients.

Referenced by CalibrateENG(), CalibrateTIME(), TSiLiHit::GetEnergy(), TDetectorHit::GetEnergy(), TSiLiHit::GetFitEnergy(), TFippsHit::GetNoCTEnergy(), TIfinHit::GetNoCTEnergy(), TGriffinHit::GetNoCTEnergy(), TFippsTACHit::GetTempCorrectedEnergy(), and TTACHit::GetTempCorrectedEnergy().

◆ CalibrateENG() [2/3]

double TChannel::CalibrateENG ( double  charge,
int  temp_int 
) const

Returns the calibrated energy of the channel when a charge is passed to it. This is divided by the integration parameter. The polynomial energy calibration formula is then applied to get the calibrated energy.

Definition at line 503 of file TChannel.cxx.

References CalibrateENG(), fIntegration, and TPriorityValue< T >::Value().

◆ CalibrateENG() [3/3]

double TChannel::CalibrateENG ( int  charge,
int  temp_int = 0 
) const

Returns the calibrated energy of the channel when a charge is passed to it. This is done by first adding a random number between 0 and 1 to the charge bin. This is then taken and divided by the integration parameter. The polynomial energy calibration formula is then applied to get the calibrated energy.

Definition at line 487 of file TChannel.cxx.

References CalibrateENG().

◆ CalibrateLED() [1/2]

double TChannel::CalibrateLED ( double  led) const

Returns the calibrated LED. The polynomial LED calibration formula is applied to get the calibrated LED.

Definition at line 571 of file TChannel.cxx.

References fLEDCoefficients.

Referenced by CalibrateLED().

◆ CalibrateLED() [2/2]

double TChannel::CalibrateLED ( int  led) const

Calibrates the LED

Definition at line 565 of file TChannel.cxx.

References CalibrateLED().

◆ CalibrateTIME() [1/2]

double TChannel::CalibrateTIME ( double  energy) const

uses the values stored in TIMECOefficients to calculate a "walk correction" factor. This function returns the correction not an adjusted time stamp! pcb.

Definition at line 595 of file TChannel.cxx.

References fTIMECoefficients.

Referenced by CalibrateTIME(), and GetTZero().

◆ CalibrateTIME() [2/2]

double TChannel::CalibrateTIME ( int  chg) const

Calibrates the time spectrum

Definition at line 586 of file TChannel.cxx.

References CalibrateENG(), CalibrateTIME(), and fTIMECoefficients.

◆ Clear()

◆ CompareChannels()

bool TChannel::CompareChannels ( const TChannel chana,
const TChannel chanb 
)
static

Compares the names of the two TChannels. Returns true if the names are the same, false if different.

Definition at line 149 of file TChannel.cxx.

Referenced by SortedChannels().

◆ DeleteAllChannels()

void TChannel::DeleteAllChannels ( )
static

Safely deletes fChannelMap and fChannelNumberMap

Definition at line 159 of file TChannel.cxx.

References fChannelMap, and fChannelNumberMap.

Referenced by main(), TMidasFile::SetFileOdb(), and WriteToRoot().

◆ DestroyCalibrations()

void TChannel::DestroyCalibrations ( )

Erases all Cal vectors

Definition at line 476 of file TChannel.cxx.

References DestroyCFDCal(), DestroyCTCal(), DestroyEFFCal(), DestroyENGCal(), DestroyLEDCal(), and DestroyTIMECal().

◆ DestroyCFDCal()

void TChannel::DestroyCFDCal ( )

Erases the CFDCoefficients vector

Definition at line 441 of file TChannel.cxx.

References fCFDCoefficients.

Referenced by DestroyCalibrations(), ParseInputData(), and TCFDCal::WriteToChannel().

◆ DestroyCTCal()

void TChannel::DestroyCTCal ( )

Definition at line 465 of file TChannel.cxx.

References fCTCoefficients.

Referenced by CrossTalkFix(), DestroyCalibrations(), main(), and ParseInputData().

◆ DestroyEFFCal()

void TChannel::DestroyEFFCal ( )

Erases the EffCal vector

Definition at line 459 of file TChannel.cxx.

References fEFFCoefficients.

Referenced by DestroyCalibrations(), and ParseInputData().

◆ DestroyEnergyNonlinearity()

void TChannel::DestroyEnergyNonlinearity ( )

◆ DestroyENGCal()

void TChannel::DestroyENGCal ( )

Erases the ENGCoefficients vector

Definition at line 435 of file TChannel.cxx.

References fENGCoefficients.

Referenced by DestroyCalibrations(), main(), ParseInputData(), TEnergyCal::WriteToChannel(), and TGainMatch::WriteToChannel().

◆ DestroyLEDCal()

void TChannel::DestroyLEDCal ( )

Erases the LEDCoefficients vector

Definition at line 447 of file TChannel.cxx.

References fLEDCoefficients.

Referenced by DestroyCalibrations(), and ParseInputData().

◆ DestroyTIMECal()

void TChannel::DestroyTIMECal ( )

Erases the TimeCal vector

Definition at line 453 of file TChannel.cxx.

References fTIMECoefficients.

Referenced by DestroyCalibrations(), ParseInputData(), and TTimeCal::WriteToChannel().

◆ FindChannelByName()

TChannel * TChannel::FindChannelByName ( const char *  ccName)
static

Finds the TChannel by the name of the channel

Definition at line 375 of file TChannel.cxx.

References fChannelMap.

Referenced by CrossTalkFix(), TSiLiHit::GetSiLiHitChannel(), and main().

◆ FindChannelByRegEx()

std::vector< TChannel * > TChannel::FindChannelByRegEx ( const char *  ccName)
static

Finds the TChannel by the name of the channel

Definition at line 399 of file TChannel.cxx.

References fChannelMap.

◆ GetAddress()

unsigned int TChannel::GetAddress ( ) const
inline

◆ GetCFDChi2()

double TChannel::GetCFDChi2 ( ) const
inline

Definition at line 177 of file TChannel.h.

References TPriorityValue< T >::Value().

Referenced by OverWriteChannel().

◆ GetCFDCoeff()

std::vector<double> TChannel::GetCFDCoeff ( ) const
inline

Definition at line 187 of file TChannel.h.

Referenced by OverWriteChannel(), and TCFDCal::ReadFromChannel().

◆ GetChannel()

◆ GetChannelByNumber()

TChannel * TChannel::GetChannelByNumber ( int  temp_num)
static

Returns the TChannel based on the channel number and not the channel address.

Definition at line 363 of file TChannel.cxx.

References fChannelNumberMap.

Referenced by TGainMatch::CoarseMatch(), TGainMatch::FineMatch(), TGainMatch::FineMatchFast(), main(), MakeGRIFFINChargeHsts(), MakeGRIFFINEnergyHsts(), and TCal::SetChannel().

◆ GetChannelMap()

◆ GetClassType()

◆ GetCrystalNumber()

◆ GetCTCoeff()

std::vector<double> TChannel::GetCTCoeff ( ) const
inline

◆ GetDefaultChannel()

TChannel * TChannel::GetDefaultChannel ( )
static

Definition at line 295 of file TChannel.cxx.

References fChannelMap.

Referenced by TFragHistLoop::Write(), TAnalysisHistLoop::Write(), and WriteToRoot().

◆ GetDetectorNumber()

◆ GetDigitizerType()

EDigitizer TChannel::GetDigitizerType ( ) const
inline

Definition at line 171 of file TChannel.h.

References TPriorityValue< T >::Value().

Referenced by TTdrMnemonic::GetTime(), and TGRSIMnemonic::GetTime().

◆ GetDigitizerTypeString()

const char* TChannel::GetDigitizerTypeString ( ) const
inline

◆ GetEFFChi2()

double TChannel::GetEFFChi2 ( ) const
inline

Definition at line 180 of file TChannel.h.

References TPriorityValue< T >::Value().

Referenced by OverWriteChannel().

◆ GetEFFCoeff()

std::vector<double> TChannel::GetEFFCoeff ( ) const
inline

Definition at line 190 of file TChannel.h.

Referenced by OverWriteChannel().

◆ GetEnergyNonlinearity() [1/2]

TGraph TChannel::GetEnergyNonlinearity ( ) const
inline

◆ GetEnergyNonlinearity() [2/2]

double TChannel::GetEnergyNonlinearity ( double  en) const

Definition at line 1355 of file TChannel.cxx.

References fEnergyNonlinearity, and TPriorityValue< T >::Value().

◆ GetENGChi2()

double TChannel::GetENGChi2 ( ) const
inline

Definition at line 176 of file TChannel.h.

References TPriorityValue< T >::Value().

Referenced by OverWriteChannel().

◆ GetENGCoeff()

std::vector<Float_t> TChannel::GetENGCoeff ( ) const
inline

Definition at line 186 of file TChannel.h.

Referenced by TGainMatch::FineMatch(), TGainMatch::FineMatchFast(), and OverWriteChannel().

◆ GetIntegration()

int TChannel::GetIntegration ( ) const
inline

Definition at line 167 of file TChannel.h.

Referenced by TDetectorHit::GetCharge(), and OverWriteChannel().

◆ GetLEDChi2()

double TChannel::GetLEDChi2 ( ) const
inline

Definition at line 178 of file TChannel.h.

References TPriorityValue< T >::Value().

Referenced by OverWriteChannel().

◆ GetLEDCoeff()

std::vector<double> TChannel::GetLEDCoeff ( ) const
inline

Definition at line 188 of file TChannel.h.

Referenced by OverWriteChannel().

◆ GetMissingChannelMap()

static std::unordered_map<unsigned int, int>* TChannel::GetMissingChannelMap ( )
inlinestatic

Definition at line 69 of file TChannel.h.

References fMissingChannelMap.

◆ GetMnemonic()

◆ GetMnemonicClass()

static TClassRef TChannel::GetMnemonicClass ( )
inlinestatic

Definition at line 77 of file TChannel.h.

References fMnemonicClass.

Referenced by main().

◆ GetNumber()

◆ GetNumberOfChannels()

◆ GetSegmentNumber()

int TChannel::GetSegmentNumber ( ) const

◆ GetStream()

int TChannel::GetStream ( ) const
inline

Definition at line 168 of file TChannel.h.

Referenced by OverWriteChannel().

◆ GetTime()

double TChannel::GetTime ( Long64_t  timestamp,
Float_t  cfd,
double  energy 
) const

Definition at line 1409 of file TChannel.cxx.

References fMnemonic, TMnemonic::GetTime(), and TPriorityValue< T >::Value().

Referenced by TDetectorHit::GetTime().

◆ GetTIMEChi2()

double TChannel::GetTIMEChi2 ( ) const
inline

Definition at line 179 of file TChannel.h.

References TPriorityValue< T >::Value().

Referenced by OverWriteChannel().

◆ GetTIMECoeff()

std::vector<double> TChannel::GetTIMECoeff ( ) const
inline

Definition at line 189 of file TChannel.h.

Referenced by OverWriteChannel(), and TTimeCal::ReadFromChannel().

◆ GetTimeOffset()

Long64_t TChannel::GetTimeOffset ( ) const
inline

◆ GetTimeStampUnit()

int TChannel::GetTimeStampUnit ( ) const
inline

◆ GetTZero() [1/2]

double TChannel::GetTZero ( double  tempd) const
inline

◆ GetTZero() [2/2]

double TChannel::GetTZero ( int  tempi) const
inline

Definition at line 255 of file TChannel.h.

References CalibrateTIME().

◆ GetUserInfoNumber()

int TChannel::GetUserInfoNumber ( ) const
inline

Definition at line 169 of file TChannel.h.

Referenced by OverWriteChannel().

◆ GetWaveBaseLine()

double TChannel::GetWaveBaseLine ( ) const
inline

Definition at line 238 of file TChannel.h.

References TChannel::WaveFormShapePar::BaseLine.

Referenced by TSiLiHit::FitPulseAnalyzer().

◆ GetWaveDecay()

double TChannel::GetWaveDecay ( ) const
inline

Definition at line 237 of file TChannel.h.

References TChannel::WaveFormShapePar::TauDecay.

Referenced by TSiLiHit::FitPulseAnalyzer().

◆ GetWaveParam()

WaveFormShapePar TChannel::GetWaveParam ( ) const
inline

Definition at line 240 of file TChannel.h.

References WaveFormShape.

Referenced by AppendChannel(), OverWriteChannel(), and TChannel().

◆ GetWaveRise()

double TChannel::GetWaveRise ( ) const
inline

Definition at line 236 of file TChannel.h.

References TChannel::WaveFormShapePar::TauRise.

Referenced by TSiLiHit::FitPulseAnalyzer().

◆ InitChannelInput()

void TChannel::InitChannelInput ( )
staticprivate

Definition at line 139 of file TChannel.cxx.

References CYAN, fFileData, kRootFile, ParseInputData(), and RESET_COLOR.

◆ OverWriteChannel()

◆ ParseInputData()

◆ Print()

void TChannel::Print ( Option_t *  opt = "") const
override

Prints out the current TChannel.

Definition at line 674 of file TChannel.cxx.

References PrintToString().

Referenced by TSortingDiagnostics::AddDetectorClass(), and main().

◆ PrintCTCoeffs()

void TChannel::PrintCTCoeffs ( Option_t *  opt = "") const

Prints out the current TChannel.

Definition at line 659 of file TChannel.cxx.

References fAddress, fCTCoefficients, fNumber, and hex().

◆ PrintCTToString()

std::string TChannel::PrintCTToString ( Option_t *  opt = "") const

Definition at line 680 of file TChannel.cxx.

References fAddress, fCTCoefficients, fNumber, and TPriorityValue< T >::Value().

◆ PrintToString()

◆ ReadCalFile()

Int_t TChannel::ReadCalFile ( const char *  filename = "")
static

Makes TChannels from a cal file to be used as the current calibration until grsisort is closed. Returns the number of channels properly read in.

Definition at line 916 of file TChannel.cxx.

References CYAN, DRED, fChannelMap, fChannelNumberMap, kInputFile, ParseInputData(), RESET_COLOR, and SaveToSelf().

Referenced by main(), MakeGRIFFINEnergyHsts(), recalibrate_spectra(), TGRSIint::SetupPipeline(), and TGRSISelector::SlaveBegin().

◆ ReadCalFromCurrentFile()

Int_t TChannel::ReadCalFromCurrentFile ( Option_t *  opt = "overwrite")
static

Definition at line 869 of file TChannel.cxx.

References ReadFile().

◆ ReadCalFromFile()

Int_t TChannel::ReadCalFromFile ( TFile *  tempf,
Option_t *  opt = "overwrite" 
)
static

Reads the TChannel information from a TFile if it has already been written to that File.

Definition at line 880 of file TChannel.cxx.

References ReadFile().

Referenced by main(), and TGRSISelector::Process().

◆ ReadCalFromTree()

Int_t TChannel::ReadCalFromTree ( TTree *  tree,
Option_t *  opt = "overwrite" 
)
static

Reads the TChannel information from a Tree if it has already been written to that Tree.

Definition at line 890 of file TChannel.cxx.

References ReadFile().

Referenced by main(), make_calibration_histograms(), and MakeGRIFFINChargeHsts().

◆ ReadEnergyNonlinearities()

void TChannel::ReadEnergyNonlinearities ( TFile *  file,
const char *  graphName = "EnergyNonlinearity0x",
bool  all = false 
)
static

Read energy nonlinearities as TGraphErrors from provided root file using "graphName%x" as names

Definition at line 1371 of file TChannel.cxx.

References AddChannel(), fEnergyNonlinearity, GetChannel(), hex(), kRootFile, TPriorityValue< T >::Set(), SetAddress(), SetupEnergyNonlinearity(), and TChannel().

◆ ReadFile()

Int_t TChannel::ReadFile ( TFile *  tempf)
staticprivate

Definition at line 902 of file TChannel.cxx.

References GetNumberOfChannels().

Referenced by ReadCalFromCurrentFile(), ReadCalFromFile(), and ReadCalFromTree().

◆ SaveToSelf()

void TChannel::SaveToSelf ( const char *  fname)
staticprivate

Definition at line 957 of file TChannel.cxx.

References fFileData, fFileName, and WriteCalFile().

Referenced by ReadCalFile(), and WriteToRoot().

◆ SetAddress()

void TChannel::SetAddress ( unsigned int  tmpadd)

Sets the address of a TChannel and also overwrites that channel if it is in the channel map

Definition at line 421 of file TChannel.cxx.

References fAddress, fChannelMap, and hex().

Referenced by main(), OverWriteChannel(), ParseInputData(), ReadEnergyNonlinearities(), TMidasFile::SetGRIFFOdb(), TMidasFile::SetTIGDAQOdb(), TMidasFile::SetTIGOdb(), and TChannel().

◆ SetCFDChi2()

void TChannel::SetCFDChi2 ( TPriorityValue< double >  tmp)
inline

Definition at line 212 of file TChannel.h.

Referenced by AppendChannel(), OverWriteChannel(), ParseInputData(), and TChannel().

◆ SetCFDCoefficients()

void TChannel::SetCFDCoefficients ( TPriorityValue< std::vector< double > >  tmp)
inline

Definition at line 196 of file TChannel.h.

Referenced by AppendChannel(), OverWriteChannel(), and TChannel().

◆ SetClassType()

void TChannel::SetClassType ( TClass *  cl_type)

◆ SetCrystalNumber()

void TChannel::SetCrystalNumber ( int  tempint)
inline

Definition at line 155 of file TChannel.h.

Referenced by AppendChannel(), OverWriteChannel(), and TChannel().

◆ SetCTCoefficients()

void TChannel::SetCTCoefficients ( TPriorityValue< std::vector< double > >  tmp)
inline

Definition at line 200 of file TChannel.h.

Referenced by AppendChannel(), OverWriteChannel(), and TChannel().

◆ SetDetectorNumber()

void TChannel::SetDetectorNumber ( int  tempint)
inline

Definition at line 153 of file TChannel.h.

Referenced by AppendChannel(), OverWriteChannel(), and TChannel().

◆ SetDigitizerType() [1/2]

◆ SetDigitizerType() [2/2]

void TChannel::SetDigitizerType ( const std::string &  mnemonic,
const char *  tmpstr,
EPriority  pr 
)
static

Definition at line 645 of file TChannel.cxx.

References GetChannelMap().

◆ SetEFFChi2()

void TChannel::SetEFFChi2 ( TPriorityValue< double >  tmp)
inline

Definition at line 215 of file TChannel.h.

Referenced by AppendChannel(), OverWriteChannel(), ParseInputData(), and TChannel().

◆ SetEFFCoefficients()

void TChannel::SetEFFCoefficients ( TPriorityValue< std::vector< double > >  tmp)
inline

Definition at line 199 of file TChannel.h.

Referenced by AppendChannel(), OverWriteChannel(), and TChannel().

◆ SetEnergyNonlinearity()

void TChannel::SetEnergyNonlinearity ( TPriorityValue< TGraph >  tmp)
inline

Definition at line 201 of file TChannel.h.

Referenced by AppendChannel(), OverWriteChannel(), and TChannel().

◆ SetENGChi2()

void TChannel::SetENGChi2 ( TPriorityValue< double >  tmp)
inline

Definition at line 211 of file TChannel.h.

Referenced by AppendChannel(), OverWriteChannel(), ParseInputData(), and TChannel().

◆ SetENGCoefficients()

void TChannel::SetENGCoefficients ( TPriorityValue< std::vector< Float_t > >  tmp)
inline

◆ SetIntegration() [1/2]

void TChannel::SetIntegration ( TPriorityValue< int >  tmp)
inline

◆ SetIntegration() [2/2]

void TChannel::SetIntegration ( const std::string &  mnemonic,
int  tmpint,
EPriority  pr 
)
static

Definition at line 631 of file TChannel.cxx.

References GetChannelMap().

◆ SetLEDChi2()

void TChannel::SetLEDChi2 ( TPriorityValue< double >  tmp)
inline

Definition at line 213 of file TChannel.h.

Referenced by AppendChannel(), OverWriteChannel(), ParseInputData(), and TChannel().

◆ SetLEDCoefficients()

void TChannel::SetLEDCoefficients ( TPriorityValue< std::vector< double > >  tmp)
inline

Definition at line 197 of file TChannel.h.

Referenced by AppendChannel(), OverWriteChannel(), and TChannel().

◆ SetMnemonicClass()

static void TChannel::SetMnemonicClass ( TClassRef  cl)
inlinestatic

◆ SetName()

void TChannel::SetName ( const char *  tmpName)
override

◆ SetNumber()

void TChannel::SetNumber ( TPriorityValue< int >  tmp)
inline

◆ SetSegmentNumber()

void TChannel::SetSegmentNumber ( int  tempint)
inline

Definition at line 154 of file TChannel.h.

Referenced by AppendChannel(), OverWriteChannel(), and TChannel().

◆ SetStream()

void TChannel::SetStream ( TPriorityValue< int >  tmp)
inline

Definition at line 147 of file TChannel.h.

Referenced by AppendChannel(), OverWriteChannel(), ParseInputData(), and TChannel().

◆ SetTIMEChi2()

void TChannel::SetTIMEChi2 ( TPriorityValue< double >  tmp)
inline

Definition at line 214 of file TChannel.h.

Referenced by AppendChannel(), OverWriteChannel(), ParseInputData(), and TChannel().

◆ SetTIMECoefficients()

void TChannel::SetTIMECoefficients ( TPriorityValue< std::vector< double > >  tmp)
inline

Definition at line 198 of file TChannel.h.

Referenced by AppendChannel(), OverWriteChannel(), and TChannel().

◆ SetTimeOffset()

void TChannel::SetTimeOffset ( TPriorityValue< Long64_t >  tmp)
inline

Definition at line 151 of file TChannel.h.

Referenced by AppendChannel(), main(), OverWriteChannel(), ParseInputData(), and TChannel().

◆ SetupEnergyNonlinearity()

void TChannel::SetupEnergyNonlinearity ( )
private

◆ SetUseCalFileIntegration() [1/2]

void TChannel::SetUseCalFileIntegration ( TPriorityValue< bool >  tmp = TPriorityValue<bool>(true, EPriority::kUser))
inline

Definition at line 182 of file TChannel.h.

Referenced by AppendChannel(), OverWriteChannel(), ParseInputData(), and TChannel().

◆ SetUseCalFileIntegration() [2/2]

void TChannel::SetUseCalFileIntegration ( const std::string &  mnemonic,
bool  flag,
EPriority  pr 
)
static

Writes this UseCalFileIntegration to all channels in the current TChannel Map that starts with the mnemonic. Use "" to write to ALL channels WARNING: This is case sensitive!

Definition at line 617 of file TChannel.cxx.

References GetChannelMap().

◆ SetUserInfoNumber()

void TChannel::SetUserInfoNumber ( TPriorityValue< int >  tmp)
inline

◆ SetUseWaveParam()

void TChannel::SetUseWaveParam ( bool  temp = true)
inline

Definition at line 233 of file TChannel.h.

References TChannel::WaveFormShapePar::InUse.

Referenced by SetWaveBaseLine(), SetWaveDecay(), and SetWaveRise().

◆ SetWaveBaseLine()

void TChannel::SetWaveBaseLine ( double  temp)
inline

Definition at line 227 of file TChannel.h.

References TChannel::WaveFormShapePar::BaseLine, and SetUseWaveParam().

Referenced by ParseInputData().

◆ SetWaveDecay()

void TChannel::SetWaveDecay ( double  temp)
inline

Definition at line 222 of file TChannel.h.

References SetUseWaveParam(), and TChannel::WaveFormShapePar::TauDecay.

Referenced by ParseInputData().

◆ SetWaveParam()

void TChannel::SetWaveParam ( WaveFormShapePar  temp)
inline

Definition at line 234 of file TChannel.h.

Referenced by AppendChannel(), OverWriteChannel(), and TChannel().

◆ SetWaveRise()

void TChannel::SetWaveRise ( double  temp)
inline

Definition at line 217 of file TChannel.h.

References SetUseWaveParam(), and TChannel::WaveFormShapePar::TauRise.

Referenced by ParseInputData().

◆ SortedChannels()

std::vector< TChannel * > TChannel::SortedChannels ( )
staticprivate

Definition at line 790 of file TChannel.cxx.

References CompareChannels(), and fChannelMap.

Referenced by WriteCalBuffer(), WriteCalFile(), and WriteCTCorrections().

◆ trim()

void TChannel::trim ( std::string &  line)
staticprivate

Removes whitespace from the string 'line'

Definition at line 1177 of file TChannel.cxx.

Referenced by ParseInputData().

◆ UpdateChannel()

int TChannel::UpdateChannel ( TChannel chan,
Option_t *  opt = "" 
)
static

If there is information in the chan, the current TChannel with the same address is updated with that information.

Definition at line 280 of file TChannel.cxx.

References AppendChannel(), GetAddress(), and GetChannel().

Referenced by ParseInputData().

◆ UseCalFileIntegration()

bool TChannel::UseCalFileIntegration ( )
inline

◆ UseWaveParam()

bool TChannel::UseWaveParam ( ) const
inline

Definition at line 239 of file TChannel.h.

References TChannel::WaveFormShapePar::InUse.

Referenced by TSiLiHit::FitPulseAnalyzer(), and PrintToString().

◆ WriteCalBuffer()

void TChannel::WriteCalBuffer ( Option_t *  opt = "")
static

writes any TChannels in memory to the internal buffer fFileData. Can be used to over write info that is there or create the buffer if the channels originated from the odb.

Definition at line 852 of file TChannel.cxx.

References fFileData, and SortedChannels().

Referenced by WriteToRoot().

◆ WriteCalFile()

void TChannel::WriteCalFile ( const std::string &  outfilename = "")
static

prints the context of addresschannelmap formatted correctly to stdout if no file name is passed to the function. If a file name is passed to the function prints the context of addresschannelmap formatted correctly to a file with the given name. This will earse and rewrite the file if the file already exisits!

Definition at line 805 of file TChannel.cxx.

References SortedChannels().

Referenced by main(), SaveToSelf(), and TSourceCalibration::WriteCalibration().

◆ WriteCTCorrections()

void TChannel::WriteCTCorrections ( const std::string &  outfilename = "")
static

Definition at line 831 of file TChannel.cxx.

References SortedChannels().

Referenced by main().

◆ WriteToRoot()

int TChannel::WriteToRoot ( TFile *  fileptr = nullptr)
static

Member Data Documentation

◆ fAddress

unsigned int TChannel::fAddress {0}
private

◆ fCFDChi2

TPriorityValue<double> TChannel::fCFDChi2
private

Definition at line 101 of file TChannel.h.

Referenced by AppendChannel(), Clear(), and TChannel().

◆ fCFDCoefficients

TPriorityValue<std::vector<double> > TChannel::fCFDCoefficients
private

◆ fChannelMap

std::unordered_map< unsigned int, TChannel * > * TChannel::fChannelMap = new std::unordered_map<unsigned int, TChannel*>
staticprivate

◆ fChannelNumberMap

std::unordered_map< int, TChannel * > * TChannel::fChannelNumberMap = new std::unordered_map<int, TChannel*>
staticprivate

Definition at line 122 of file TChannel.h.

Referenced by AddChannel(), DeleteAllChannels(), GetChannelByNumber(), and ReadCalFile().

◆ fCrystalNumber

int TChannel::fCrystalNumber
mutableprivate

Definition at line 92 of file TChannel.h.

Referenced by Clear(), and GetCrystalNumber().

◆ fCTCoefficients

TPriorityValue<std::vector<double> > TChannel::fCTCoefficients
private

◆ fDetectorNumber

int TChannel::fDetectorNumber
mutableprivate

Definition at line 90 of file TChannel.h.

Referenced by Clear(), and GetDetectorNumber().

◆ fDigitizerType

TPriorityValue<EDigitizer> TChannel::fDigitizerType
private

Definition at line 83 of file TChannel.h.

Referenced by SetDigitizerType().

◆ fDigitizerTypeString

TPriorityValue<std::string> TChannel::fDigitizerTypeString
private

Definition at line 82 of file TChannel.h.

Referenced by AppendChannel(), Clear(), PrintToString(), SetDigitizerType(), and TChannel().

◆ fEFFChi2

TPriorityValue<double> TChannel::fEFFChi2
private

Definition at line 107 of file TChannel.h.

Referenced by AppendChannel(), Clear(), PrintToString(), and TChannel().

◆ fEFFCoefficients

TPriorityValue<std::vector<double> > TChannel::fEFFCoefficients
private

Definition at line 106 of file TChannel.h.

Referenced by AppendChannel(), Clear(), DestroyEFFCal(), ParseInputData(), PrintToString(), and TChannel().

◆ fEnergyNonlinearity

◆ fENGChi2

TPriorityValue<double> TChannel::fENGChi2
private

Definition at line 99 of file TChannel.h.

Referenced by AppendChannel(), Clear(), PrintToString(), and TChannel().

◆ fENGCoefficients

TPriorityValue<std::vector<Float_t> > TChannel::fENGCoefficients
private

◆ fFileData

std::string TChannel::fFileData
staticprivate

Definition at line 292 of file TChannel.h.

Referenced by InitChannelInput(), SaveToSelf(), WriteCalBuffer(), and WriteToRoot().

◆ fFileName

std::string TChannel::fFileName
staticprivate

Definition at line 291 of file TChannel.h.

Referenced by SaveToSelf().

◆ fIntegration

TPriorityValue<int> TChannel::fIntegration {1}
private

Definition at line 81 of file TChannel.h.

Referenced by AppendChannel(), CalibrateENG(), Clear(), PrintToString(), and TChannel().

◆ fLEDChi2

TPriorityValue<double> TChannel::fLEDChi2
private

Definition at line 103 of file TChannel.h.

Referenced by AppendChannel(), Clear(), and TChannel().

◆ fLEDCoefficients

TPriorityValue<std::vector<double> > TChannel::fLEDCoefficients
private

Definition at line 102 of file TChannel.h.

Referenced by AppendChannel(), CalibrateLED(), Clear(), DestroyLEDCal(), ParseInputData(), and TChannel().

◆ fMissingChannelMap

std::unordered_map< unsigned int, int > * TChannel::fMissingChannelMap = new std::unordered_map<unsigned int, int>
staticprivate

Definition at line 121 of file TChannel.h.

Referenced by GetChannel(), and GetMissingChannelMap().

◆ fMnemonic

◆ fMnemonicClass

TClassRef TChannel::fMnemonicClass = TClassRef("TMnemonic")
staticprivate

Definition at line 96 of file TChannel.h.

Referenced by Clear(), and GetMnemonicClass().

◆ fNumber

TPriorityValue<int> TChannel::fNumber {0}
private

Definition at line 85 of file TChannel.h.

Referenced by AppendChannel(), Clear(), PrintCTCoeffs(), PrintCTToString(), PrintToString(), and TChannel().

◆ fSegmentNumber

int TChannel::fSegmentNumber
mutableprivate

Definition at line 91 of file TChannel.h.

Referenced by Clear(), and GetSegmentNumber().

◆ fStream

TPriorityValue<int> TChannel::fStream {0}
private

Definition at line 86 of file TChannel.h.

Referenced by AppendChannel(), Clear(), and TChannel().

◆ fTIMEChi2

TPriorityValue<double> TChannel::fTIMEChi2
private

Definition at line 105 of file TChannel.h.

Referenced by AppendChannel(), Clear(), and TChannel().

◆ fTIMECoefficients

TPriorityValue<std::vector<double> > TChannel::fTIMECoefficients
private

◆ fTimeOffset

TPriorityValue<Long64_t> TChannel::fTimeOffset
private

Definition at line 94 of file TChannel.h.

Referenced by AppendChannel(), Clear(), PrintToString(), and TChannel().

◆ fTimeStampUnit

TPriorityValue<int> TChannel::fTimeStampUnit {0}
private

Definition at line 84 of file TChannel.h.

Referenced by SetDigitizerType().

◆ fUseCalFileInt

TPriorityValue<bool> TChannel::fUseCalFileInt {false}
private

Definition at line 88 of file TChannel.h.

Referenced by AppendChannel(), Clear(), PrintToString(), and TChannel().

◆ fUserInfoNumber

TPriorityValue<int> TChannel::fUserInfoNumber {0}
private

Definition at line 87 of file TChannel.h.

Referenced by AppendChannel(), Clear(), and TChannel().

◆ WaveFormShape

WaveFormShapePar TChannel::WaveFormShape
private

Definition at line 118 of file TChannel.h.

Referenced by Clear(), GetWaveParam(), and PrintToString().