00001 #ifndef _Q_EVENT_FILLER_HH_ 00002 #define _Q_EVENT_FILLER_HH_ 00003 00004 #include "QCuore.hh" 00005 00006 #include <map> 00007 #include <vector> 00008 #include <list> 00009 00010 #include "QBuilderDefs.hh" 00011 #include "QMuonEventBuilder.hh" 00012 00013 namespace Cuore { 00014 class QEvent; 00015 class QPulse; 00016 } 00017 00018 class QTrgInfo; 00019 00020 class QEventFiller 00021 { 00022 public: 00023 QEventFiller(); 00024 virtual ~QEventFiller(); 00025 00026 bool SetMap(const std::map<unsigned short, QBuilderInfo_t>& info); 00027 00028 bool SetSidePulses(const std::map<unsigned short, 00029 std::list<unsigned short> >& sidePulses); 00036 bool SetMuonChannel(const unsigned short& ch); 00037 00044 bool SetHeaterChannel(const unsigned short& ch); 00045 00051 bool SetRunNumber(const unsigned int& run); 00052 00058 bool Consolidate(); 00059 00069 bool FillEvent(QEvent* ev, 00070 const QTrgInfo& mainTrg, 00071 const std::list<QTrgInfo>& triggers); 00072 00080 bool FillSidePulses(std::vector<QPulse>& pulses, 00081 const unsigned short& ch, 00082 const long long& time, 00083 const std::list<QTrgInfo>& triggers); 00084 00092 bool FillPulse(QPulse* pulse, 00093 const QTrgInfo& trgInfo, 00094 const std::list<QTrgInfo>& triggers, 00095 const bool& isMain); 00096 00097 private: 00098 00099 const std::map<unsigned short, QBuilderInfo_t>* fInfo; 00100 00101 const std::map<unsigned short, std::list<unsigned short> >* fSidePulses; 00106 bool fIsReady; 00107 00109 unsigned short fMuonCh; 00110 00112 unsigned short fHeaterCh; 00113 00115 unsigned int fCurrentDaqRun; 00116 00118 time_t fStartRunUnix; 00119 00121 unsigned int fEventNumber; 00122 00124 QMuonEventBuilder fMuonBuilder; 00125 00126 bool FillMuonEvent(QEvent* ev); 00127 }; 00128 #endif