//*-- AUTHOR Ilse Koenig //*-- created : 25/06/2009 by Ilse Koenig //_HADES_CLASS_DESCRIPTION /////////////////////////////////////////////////////////////////////// // // HTrb2Correction // /////////////////////////////////////////////////////////////////////// using namespace std; #include "htrb2correction.h" #include "TBuffer.h" #include #include #include #include ClassImp(HTrb2Correction) HTrb2Correction::HTrb2Correction(const Char_t* temperatureSensor) : nValuesPerChannel(256) { // Default constructor with the temperatureSensor identifying the board // Sets the name of the board, but does not create the array for the corrections SetName(temperatureSensor); nChannels=0; highResolutionFlag=-1; subeventId=-1; } Float_t* HTrb2Correction::makeArray() { // Creates the array for the corrections if not existing if (boardType.CompareTo("TRB")==0) { if (nChannels==0) { nChannels=128; corrData.Set(nChannels*nValuesPerChannel); corrData.Reset(); } return corrData.GetArray(); } else { Error("makeArray","Board %s has not type TRB",GetName()); return 0; } } void HTrb2Correction::deleteArray() { // Deletes the array for the corrections nChannels=0; corrData.Set(0); } Float_t HTrb2Correction::getCorrection(Int_t c, Int_t i) { // Returns the correction value for channel c and bin i if (nChannels>0 && c>=0 && c=0 && i0 && c>=0 && c=0 && i0) { Int_t l=0; fout<<"temperatureSensor: "<diff) diff=d; } } return diff; }