Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:45

0001 #ifndef DTHVAbstractCheck_H
0002 #define DTHVAbstractCheck_H
0003 /** \class DTHVAbstractCheck
0004  *
0005  *  Description: 
0006  *
0007  *
0008  *  $Date: 2010/04/02 10:30:58 $
0009  *  $Revision: 1.2 $
0010  *  \author Paolo Ronchese INFN Padova
0011  *
0012  */
0013 
0014 //----------------------
0015 // Base Class Headers --
0016 //----------------------
0017 
0018 //------------------------------------
0019 // Collaborating Class Declarations --
0020 //------------------------------------
0021 
0022 //---------------
0023 // C++ Headers --
0024 //---------------
0025 #include <map>
0026 
0027 //              ---------------------
0028 //              -- Class Interface --
0029 //              ---------------------
0030 
0031 class DTHVAbstractCheck {
0032 public:
0033   /** Constructor
0034    */
0035   DTHVAbstractCheck();
0036 
0037   /** Destructor
0038    */
0039   virtual ~DTHVAbstractCheck();
0040 
0041   /** Operations
0042    */
0043   /// check HV status
0044   static DTHVAbstractCheck* getInstance();
0045 
0046   /// check HV status
0047   typedef std::pair<long long int, float> timedMeasurement;
0048   struct flag {
0049     int a;
0050     int c;
0051     int s;
0052   };
0053   static bool chkFlag(const DTHVAbstractCheck::flag& f);
0054   static bool compare(const DTHVAbstractCheck::flag& fl, const DTHVAbstractCheck::flag& fr);
0055   virtual DTHVAbstractCheck::flag checkCurrentStatus(int rawId,
0056                                                      int type,
0057                                                      float valueA,
0058                                                      float valueC,
0059                                                      float valueS,
0060                                                      const std::map<int, timedMeasurement>& snapshotValues,
0061                                                      const std::map<int, int>& aliasMap,
0062                                                      const std::map<int, int>& layerMap) = 0;
0063   virtual void setValue(int rawId,
0064                         int type,
0065                         float valueA,
0066                         float valueC,
0067                         float valueS,
0068                         const std::map<int, timedMeasurement>& snapshotValues,
0069                         const std::map<int, int>& aliasMap,
0070                         const std::map<int, int>& layerMap);
0071   virtual void setStatus(int rawId,
0072                          int flagA,
0073                          int flagC,
0074                          int flagS,
0075                          const std::map<int, timedMeasurement>& snapshotValues,
0076                          const std::map<int, int>& aliasMap,
0077                          const std::map<int, int>& layerMap);
0078 
0079 protected:
0080   static DTHVAbstractCheck* instance;
0081 
0082 private:
0083 };
0084 
0085 #endif  // DTHVAbstractCheck_H