Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:57:58

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   //! assignment op
0020   TSinglePedEntry& operator=(const TSinglePedEntry& orig) = default;
0021   //! dtor
0022   ~TSinglePedEntry();
0023 
0024   //! add a single value
0025   void insert(const int& pedestal);
0026   //! get the average of the inserted values
0027   double average() const;
0028   //! get the RMS of the inserted values
0029   double RMS() const;
0030   //! get the squared RMS of the inserted values
0031   double RMSSq() const;
0032 
0033 private:
0034   //! squared sum of entries
0035   int m_pedestalSqSum;
0036   //! sum of entries
0037   int m_pedestalSum;
0038   //! number of entries
0039   int m_entries;
0040 };
0041 
0042 #endif