00001
00002
00003
00004 #ifndef STJTRGRAISETHRESHOLD_H
00005 #define STJTRGRAISETHRESHOLD_H
00006
00007 #include <StjTrg.h>
00008
00009 class StjTrgRaiseThreshold : public StjTrg {
00010
00011 public:
00012 StjTrgRaiseThreshold(StjTrg* src)
00013 : _src(src)
00014 , _runNumber(-1), _eventId(-1) { }
00015 virtual ~StjTrgRaiseThreshold() { }
00016
00017 int id() { return _src->id(); }
00018
00019 int runNumber() { return _src->runNumber(); }
00020 int eventId() { return _src->eventId(); }
00021 bool hard() const { return _src->hard(); }
00022 virtual bool soft() const = 0;
00023 bool passed() const { return (_src->passed() && soft()); }
00024 double prescale() { return _src->prescale(); }
00025 double vertexZ() { return _src->vertexZ(); }
00026
00027 virtual std::vector<int> towers() { return std::vector<int>(); }
00028 virtual std::vector<int> towerDsmAdc() { return std::vector<int>(); }
00029 virtual std::vector<unsigned int> towerAdc() { return std::vector<unsigned int>(); }
00030 virtual std::vector<double> towerEnergy() { return std::vector<double>(); }
00031 virtual std::vector<double> towerEt() { return std::vector<double>(); }
00032
00033 virtual std::vector<int> jetPatches() { return std::vector<int>(); }
00034 virtual std::vector<int> jetPatchDsmAdc() { return std::vector<int>(); }
00035 virtual std::vector<unsigned int> jetPatchAdc() { return std::vector<unsigned int>(); }
00036 virtual std::vector<double> jetPatchEnergy() { return std::vector<double>(); }
00037 virtual std::vector<double> jetPatchEt() { return std::vector<double>(); }
00038
00039
00040 protected:
00041
00042 StjTrg* _src;
00043
00044 void readIfNewEvent() const;
00045
00046 private:
00047
00048 bool isNewEvent() const;
00049 virtual void read() const = 0;
00050
00051 void readNewEvent() const;
00052
00053 mutable int _runNumber;
00054 mutable int _eventId;
00055
00056
00057 ClassDef(StjTrgRaiseThreshold, 1)
00058
00059 };
00060
00061 #endif // STJTRGRAISETHRESHOLD_H