CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/CondFormats/SiPixelObjects/interface/SiPixelCalibConfiguration.h

Go to the documentation of this file.
00001 //---------------------------------------------------
00002 
00003 // Author : Freya.Blekman@cern.ch
00004 // Name   : SiPixelCalibConfiguration
00005 
00006 //---------------------------------------------------
00007 
00008 #ifndef SiPixelCalibConfiguration_H
00009 #define SiPixelCalibConfiguration_H
00010 
00011 #include <iostream>
00012 #include <string>
00013 #include <vector>
00014 #include <stdint.h>
00015 #include "CalibFormats/SiPixelObjects/interface/PixelCalibConfiguration.h"
00016 
00017 class SiPixelCalibConfiguration
00018 {
00019   
00020  public :
00021 
00022   SiPixelCalibConfiguration() {;}
00023   SiPixelCalibConfiguration(const pos::PixelCalibConfiguration &fancyConfig);
00024 
00025   virtual ~SiPixelCalibConfiguration(){;}
00026 
00027  //-- Setter/Getter
00028   
00029   short  getNTriggers() const { return fNTriggers;}
00030   void  setNTriggers(const  short & in) { fNTriggers = in; }
00031 
00032   std::vector<short> getRowPattern() const { return fRowPattern;}
00033   void  setRowPattern(const std::vector<short> & in) { fRowPattern = in; }
00034 
00035   std::vector<short> getColumnPattern() const { return fColumnPattern;}
00036   void  setColumnPattern(const std::vector<short> & in) { fColumnPattern = in; }
00037 
00038   void setCalibrationMode(const std::string & in) { fMode = in; }
00039   std::string getCalibrationMode() const {return fMode;}
00040 
00041   const std::vector<short> getVCalValues() const { return fVCalValues;}
00042   void  setVCalValues(const std::vector< short> & in) { fVCalValues = in; }
00043   
00044   // interface with calibration analyzers:
00045   short vcalForEvent(const uint32_t & eventnumber) const;
00046   short vcalIndexForEvent(const uint32_t & eventnumber) const;
00047   std::vector<short> columnPatternForEvent(const uint32_t & eventnumber) const;
00048   std::vector<short> rowPatternForEvent(const uint32_t & eventnumber) const;
00049   uint32_t nextPatternChangeForEvent(const uint32_t & eventnumber) const;
00050   uint32_t expectedTotalEvents () const;
00051   uint32_t  patternSize() const {return fNTriggers*fVCalValues.size();}
00052   uint32_t nPatterns() const {return nRowPatterns()*nColumnPatterns();}
00053   uint32_t nColumnPatterns() const ;
00054   uint32_t nRowPatterns() const ;
00055   uint32_t nVCal() const { return fVCalValues.size();}
00056     
00057  private :
00058 
00059   short                     fNTriggers;//
00060   std::vector<short>        fRowPattern;//
00061   std::vector<short>        fColumnPattern;//
00062   std::vector<short>        fVCalValues;//
00063   std::string               fMode;
00064 };
00065 
00066 #endif
00067