QCoSelector.hh

Go to the documentation of this file.
00001 
00002 #ifndef _Q_COSELECTOR_HH_
00003 #define _Q_COSELECTOR_HH_
00004 
00005 #include <map>
00006 #include <list>
00007 #include <string>
00008 
00009 class QCoincidence;
00010 
00017 class QCoSelector
00018 {
00019   enum CoVarType
00020     {
00021       CoEnergy = 0, Mult, InitialTime, DeltaTimeNs, 
00022       EnergyInd, TimeInd, DeltaTimeNsInd, ChannelInd
00023     };
00024 
00025 protected:
00026   std::map<std::string, CoVarType> fVariables;
00027   std::string fIndexVar;
00028 
00029 public:
00030   QCoSelector ();
00031   virtual ~QCoSelector ();
00032 
00033   //* @brief Return list of variables
00034   std::list<std::string> GetVariables();
00035   std::string & GetIndexVar(){return fIndexVar;}
00036 
00037   //* @brief If expression is in fVariables, return its value for coin 
00038   double Select (std::string expression, const QCoincidence & coin);
00039 
00040   
00041   //* @brief fill string expression  with variables names separated by semicolon, 
00042   // to be used in TNtuple creation (Number of index is taken from coin)
00043   // Return number of variables
00044   int GetVariables (std::string & expression, const QCoincidence & coin);
00045 
00046   //* @brief fill vector var with coin variables values , in the order given by GetVariables
00047   // The number of variables is that returned by GetVariables
00048   void Select (double * var, const QCoincidence & coin);
00049 
00050 };
00051 
00052 #endif

Generated on Tue Nov 16 10:49:55 2010 for CUORE Software by  doxygen 1.5.6