StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjTrgRaiseThreshold.h
1 // -*- mode: c++;-*-
2 // $Id: StjTrgRaiseThreshold.h,v 1.4 2008/09/22 00:06:58 tai Exp $
3 // Copyright (C) 2008 Tai Sakuma <sakuma@bnl.gov>
4 #ifndef STJTRGRAISETHRESHOLD_H
5 #define STJTRGRAISETHRESHOLD_H
6 
7 #include <StjTrg.h>
8 
9 class StjTrgRaiseThreshold : public StjTrg {
10 
11 public:
13  : _src(src)
14  , _runNumber(-1), _eventId(-1) { }
15 virtual ~StjTrgRaiseThreshold() { }
16 
17  int id() { return _src->id(); }
18 
19  int runNumber() { return _src->runNumber(); }
20  int eventId() { return _src->eventId(); }
21  bool hard() const { return _src->hard(); }
22  virtual bool soft() const = 0;
23  bool passed() const { return (_src->passed() && soft()); }
24  double prescale() { return _src->prescale(); }
25  double vertexZ() { return _src->vertexZ(); }
26 
27  virtual std::vector<int> towers() { return std::vector<int>(); }
28  virtual std::vector<int> towerDsmAdc() { return std::vector<int>(); }
29  virtual std::vector<unsigned int> towerAdc() { return std::vector<unsigned int>(); }
30  virtual std::vector<double> towerEnergy() { return std::vector<double>(); }
31  virtual std::vector<double> towerEt() { return std::vector<double>(); }
32 
33  virtual std::vector<int> jetPatches() { return std::vector<int>(); }
34  virtual std::vector<int> jetPatchDsmAdc() { return std::vector<int>(); }
35  virtual std::vector<unsigned int> jetPatchAdc() { return std::vector<unsigned int>(); }
36  virtual std::vector<double> jetPatchEnergy() { return std::vector<double>(); }
37  virtual std::vector<double> jetPatchEt() { return std::vector<double>(); }
38 
39 
40 protected:
41 
42  StjTrg* _src;
43 
44  void readIfNewEvent() const;
45 
46 private:
47 
48  bool isNewEvent() const;
49  virtual void read() const = 0;
50 
51  void readNewEvent() const;
52 
53  mutable int _runNumber;
54  mutable int _eventId;
55 
56 
57  ClassDef(StjTrgRaiseThreshold, 1)
58 
59 };
60 
61 #endif // STJTRGRAISETHRESHOLD_H
Definition: StjTrg.h:11