Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:41:36

0001 #ifndef TSinglePedEntry_h
0002 #define TSinglePedEntry_h
0003 
0004 /**
0005  * \file TSinglePedEntry.h
0006  * \brief Transient container for a single entry in pedestal offset studies
0007  *
0008  * $Date:
0009  * $Revision:
0010  * \author P. Govoni (pietro.govoni@cernNOSPAM.ch)
0011  */
0012 
0013 class TSinglePedEntry {
0014 public:
0015   //! ctor
0016   TSinglePedEntry();
0017   //! copy ctor
0018   TSinglePedEntry(const TSinglePedEntry &orig);
0019   //! dtor
0020   ~TSinglePedEntry();
0021 
0022   //! add a single value
0023   void insert(const int &pedestal);
0024   //! get the average of the inserted values
0025   double average() const;
0026   //! get the RMS of the inserted values
0027   double RMS() const;
0028   //! get the squared RMS of the inserted values
0029   double RMSSq() const;
0030 
0031 private:
0032   //! squared sum of entries
0033   int m_pedestalSqSum;
0034   //! sum of entries
0035   int m_pedestalSum;
0036   //! number of entries
0037   int m_entries;
0038 };
0039 
0040 #endif