X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=FMD%2FAliFMDCalibSampleRate.h;h=30784957626f7a53db8209d1ee485f20e56594ee;hb=133390aca2ec411cbdfc9e7d7ff0b7ddad6c2fcc;hp=7e2ac7b1c4af37e2f6ef9a88beb5e735e8f31f63;hpb=9f662337ab28768a7b1b10a7048d145ae833eb73;p=u%2Fmrichter%2FAliRoot.git diff --git a/FMD/AliFMDCalibSampleRate.h b/FMD/AliFMDCalibSampleRate.h index 7e2ac7b1c4a..30784957626 100644 --- a/FMD/AliFMDCalibSampleRate.h +++ b/FMD/AliFMDCalibSampleRate.h @@ -5,14 +5,33 @@ * * See cxx source for full Copyright notice */ +//____________________________________________________________________ +// +// This class stores the sample rate (that is, how many times the +// ATLRO's sample each VA1 channel). In principle these can be +// controlled per half ring, but in real life it's most likely that +// this value will be the same for all detectors. This value must be +// retrived from DCS or the like. +// +/** @file AliFMDCalibSampleRate.h + @author Christian Holm Christensen + @date Sun Mar 26 18:32:14 2006 + @brief Per digitizer card pulser calibration + @ingroup FMD_base +*/ + +#include #ifndef ROOT_TObject # include #endif +#ifndef ALIFMDUSHORTMAP_H +# include "AliFMDUShortMap.h" +#endif #ifndef ROOT_TArrayI # include #endif //____________________________________________________________________ -/** Gain value and width for each strip in the FMD +/** @brief Per digitizer card pulser calibration @ingroup FMD_base */ class AliFMDCalibSampleRate : public TObject @@ -20,24 +39,60 @@ class AliFMDCalibSampleRate : public TObject public: /** CTOR */ AliFMDCalibSampleRate(); - /** Copy CTOR - @param o Object to copy from */ + /** + * Copy CTOR + * + * @param o Object to copy from + */ AliFMDCalibSampleRate(const AliFMDCalibSampleRate& o); - /** Assignment operator - @param o Object to assign from - @return Reference to assign from */ + /** + * Assignment operator + * + * @param o Object to assign from + * + * @return Reference to this object + */ AliFMDCalibSampleRate& operator=(const AliFMDCalibSampleRate& o); - /** Set sample for a DDL - @param ddl DDL (detector) - @param rate Sample rate */ - void Set(UShort_t ddl, UShort_t rate); - /** Get sample rate for a detector - @param ddl Detector (DDL) identifier - @return Sample rate */ - UShort_t Rate(UShort_t ddl) const; + /** + * Set sample for a sector + * + * @param det Detector # + * @param ring Ring ID + * @param sec Sector # + * @param str Strip number (not used) + * @param rate Sample rate + */ + void Set(UShort_t det, Char_t ring, UShort_t sec, UShort_t str, + UShort_t rate); + /** + * Get sample rate for a sector + * + * @param det Detector # + * @param ring Ring ID + * @param sec Sector # + * @param str Strip number (not used) + * + * @return Sample rate + */ + UShort_t Rate(UShort_t det, Char_t ring, UShort_t sec, UShort_t str=0) const; + /** + * Write stored samplerates to file + * + * @param outFile Output file stream + */ + void WriteToFile(std::ostream & outFile, Bool_t* detectors=0); + /** + * Read information from file and set sample rates + * + * @param inFile input file stream + */ + void ReadFromFile(std::istream & inFile); + + const AliFMDUShortMap& Rates() const { return fRates; } protected: - TArrayI fRates; // Sample rates - ClassDef(AliFMDCalibSampleRate,1); // Sample rates + // TArrayI fRates; // Sample rates + AliFMDUShortMap fRates; // Sample rates + ClassDef(AliFMDCalibSampleRate,2); // Sample rates }; #endif