00001 00047 #ifndef _MB_COMPUTE_WEIGHTS_H_ 00048 #define _MB_COMPUTE_WEIGHTS_H_ 00049 00050 #include "QModule.hh" 00051 #include "QBAmplitude.hh" 00052 #include "QMatrix.hh" 00053 #include "QOffset.hh" 00054 #include "QVector.hh" 00055 #include <map> 00056 #include <set> 00057 #include <string> 00058 00059 namespace Cuore {class QTime;} 00060 00061 class MBComputeWeights : public QModule { 00062 00063 public: 00064 MBComputeWeights(QSequence* s); 00065 00066 virtual ~MBComputeWeights(); 00067 00068 // Init method is called before event loop 00069 void Init(); 00070 00071 // Do method is called for each event, getting the event as argument 00072 QEvent* Do( QEvent* ev); 00073 00074 // Done method is called after event loop 00075 void Done(); 00076 00077 private: 00079 void SetUpIdealPulse(const int channel, const QTime& evTime); 00080 00083 std::map<int, QMatrix> fAvgProduct; 00084 00087 std::set<int> fBadChannels; 00088 00090 std::map<int, int> fCount; 00091 00093 std::map<int, QVector> fIdealPulse; 00094 00096 std::string fIdealPulseFilename; 00097 00099 std::map<int, double> fIdealPulseMaxMinusBaseline; 00100 00102 unsigned int fNumFreq; 00103 00105 std::map<int, QOffset> fOffsetAnalyzer; 00106 00108 std::map<int, QVector> fResampledIdealPulse; 00109 00110 }; 00111 00112 #endif