00001 00031 #ifndef BMSPILLFILLER_H 00032 #define BMSPILLFILLER_H 00033 00034 #include <BeamDataDbi/BeamMonFiller.h> 00035 00036 #include <Conventions/Munits.h> 00037 00038 #include <deque> 00039 00040 class BeamMonSpill; 00041 00042 class BDEarliest; 00043 class BDScalar; 00044 class BDHornCurrent; 00045 class BDTarget; 00046 class BDHadMuMon; 00047 00048 class BMSpillFiller : public BeamMonFiller { 00049 public: 00051 BMSpillFiller(BDEarliest& bde, 00052 BDScalar* bdpi[4], 00053 BDHornCurrent& bdhc, 00054 BDTarget& target, 00055 BDHadMuMon* hadmu[4]); 00056 00057 ~BMSpillFiller(); 00058 00059 00061 void SetSpillsPerWrite(size_t spills_per_write=3000); 00062 00065 void Spill(const RawBeamMonHeaderBlock& rbmhb, const RawBeamMonBlock& rbmb); 00066 00067 private: 00068 // internal. Will send spill rows to the BD when there are enough 00069 // or if all is true; 00070 void DBU(bool all=false); 00071 00072 BDEarliest& fEarliest; 00073 BDScalar* fToroids[4]; 00074 BDHornCurrent& fHorn; 00075 BDTarget &fTarget; 00076 00077 // Buffer the spills. This assumes time ordering! 00078 std::deque<BeamMonSpill*> fSpills; 00079 size_t fSpillsPerWrite; 00080 BDHadMuMon *fHadMu[4]; 00081 }; 00082 00083 00084 #endif // BMSPILLFILLER_H
1.3.9.1