Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef MEVarVector_hh
0002 #define MEVarVector_hh
0003 
0004 //

0005 // Authors  : Gautier Hamel de Monchenault and Julie Malcles, Saclay 

0006 //

0007 
0008 #include <vector>
0009 #include "MusEcal.hh"
0010 #include "METimeInterval.hh"
0011 
0012 class MEVarVector
0013 {
0014 
0015 public:
0016 
0017   MEVarVector( int size );
0018   virtual  ~MEVarVector();
0019 
0020   void addTime( ME::Time t );
0021   void setVal(  ME::Time t, int ii, float val, bool check=false );
0022   void setFlag( ME::Time t, int ii, bool flag, bool check=false );
0023   void setValAndFlag( ME::Time t, int ii, float val, bool flag, 
0024               bool check=false );
0025 
0026   // get value of variable var by the time

0027   bool getValByTime( ME::Time time, int ii, 
0028              float& val, bool& flag );
0029   
0030   // get times in interval

0031   void getTime( std::vector< ME::Time >& time,
0032         const METimeInterval* timeInterval=0 );
0033 
0034   // get values of a variable for a given vector of Times

0035   void getValAndFlag( int ii,
0036               const std::vector< ME::Time >& time,
0037               std::vector< float >& val,
0038               std::vector< bool >& flag );
0039 
0040   // get times and values of a variable in interval

0041   void getTimeValAndFlag( int ii,
0042               std::vector< ME::Time >& time, 
0043               std::vector< float >& val,
0044               std::vector< bool >& flag,
0045               const METimeInterval* timeInterval=0 );
0046 
0047 private:
0048 
0049   int _size;
0050   MusEcal::VarVecTimeMap _map;
0051 
0052   ClassDef(MEVarVector,0) // MEVarVector 

0053 };
0054 
0055 #endif