Hall C ROOT/C++ Analyzer (hcana)
Go to the documentation of this file.
1 #ifndef ROOT_THcTrigDet
2 #define ROOT_THcTrigDet
4 #include <string>
5 #include <vector>
7 #include "THaDetector.h"
8 #include "THcHitList.h"
10 class TDatime;
12 class THaApparatus;
13 class THaEvData;
16 class THcTrigDet : public THaDetector, public THcHitList {
17  public:
18  THcTrigDet(
19  const char* name, const char* description="",
20  THaApparatus* app=NULL
21  );
22  ~THcTrigDet();
24  virtual EStatus Init(const TDatime& date);
26  virtual void Clear(Option_t* opt="");
27  Int_t Decode(const THaEvData& evData);
29  virtual void SetSpectName( const char* name);
30  virtual void AddEvtType(int evtype);
31  virtual void SetEvtType(int evtype);
32  virtual Bool_t IsIgnoreType(Int_t evtype) const;
33  virtual Bool_t HaveIgnoreList() const;
34  Int_t End(THaRunBase* run);
35  //Funtions to get TDCtime for cointime module
36  Double_t Get_CT_Trigtime(Int_t ii) { return (fTrigId[ii]==-1 ? 0. : fTdcTime[fTrigId[ii]]) ;}
37  // SJDK 12/04/21 - New Getter for RF time info
38  // Function to get RFTDC time for RF module
39  Double_t Get_RF_TrigTime(Int_t ii) { return (fRFId[ii]==-1 ? 0. : fTdcTime[fRFId[ii]]) ;}
41  protected:
42  void Setup(const char* name, const char* description);
43  virtual Int_t ReadDatabase(const TDatime& date);
44  virtual Int_t DefineVariables(EMode mode=kDefine);
46  std::string fKwPrefix;
51  Int_t fRFId[2]; // SJDK 12/04/21 - New RF ID for getter above
57  std::vector<std::string> fAdcNames;
58  std::vector<std::string> fTdcNames;
59  std::vector<std::string> fTrigNames;
60  std::vector<std::string> fRFNames;
62  static const int fMaxAdcChannels = 200;
63  static const int fMaxTdcChannels = 200;
90  std::vector<Int_t> eventtypes;
93  private:
94  THcTrigDet();
95  ClassDef(THcTrigDet, 0);
96 };
99 #endif // ROOT_THcTrigDet
virtual Int_t ReadDatabase(const TDatime &date)
Definition: THcTrigDet.cxx:318
Double_t fTdcTime[fMaxTdcChannels]
Definition: THcTrigDet.h:66
Int_t fTrigId[4]
Definition: THcTrigDet.h:50
Int_t fAdcPulseTimeRaw[fMaxAdcChannels]
Definition: THcTrigDet.h:78
Bool_t * fPresentP
Definition: THcTrigDet.h:91
Int_t fAdcPedRaw[fMaxAdcChannels]
Definition: THcTrigDet.h:75
A destructor.
Definition: THcTrigDet.cxx:139
Int_t fAdcPulseAmpRaw[fMaxAdcChannels]
Definition: THcTrigDet.h:77
const char Option_t
static const int fMaxAdcChannels
Definition: THcTrigDet.h:62
virtual void AddEvtType(int evtype)
Definition: THcTrigDet.cxx:558
Builds a Hall C ENGINE style list of raw hits from raw data.
Definition: THcHitList.h:27
Double_t * fTdcTimeWindowMin
Definition: THcTrigDet.h:72
Int_t fAdcPulseIntRaw[fMaxAdcChannels]
Definition: THcTrigDet.h:76
std::vector< std::string > fTrigNames
Definition: THcTrigDet.h:59
int Int_t
bool Bool_t
virtual EStatus Init(const TDatime &date)
Initializes the detector variables.
Definition: THcTrigDet.cxx:148
Double_t * fAdcTimeWindowMax
Definition: THcTrigDet.h:71
std::vector< std::string > fRFNames
Definition: THcTrigDet.h:60
Double_t fAdcPulseInt[fMaxAdcChannels]
Definition: THcTrigDet.h:81
Int_t fRFId[2]
Definition: THcTrigDet.h:51
Int_t fNumAdc
Definition: THcTrigDet.h:48
Int_t fTdcTimeRaw[fMaxTdcChannels]
Definition: THcTrigDet.h:65
virtual Int_t DefineVariables(EMode mode=kDefine)
Definition: THcTrigDet.cxx:404
Double_t fTdcChanperNS
Definition: THcTrigDet.h:55
tuple app
Int_t fTDC_RefTimeCut
Definition: THcTrigDet.h:67
virtual void SetEvtType(int evtype)
Definition: THcTrigDet.cxx:562
Double_t Get_RF_TrigTime(Int_t ii)
Definition: THcTrigDet.h:39
A mock detector to hold trigger related data.
Definition: THcTrigDet.h:16
std::vector< std::string > fTdcNames
Definition: THcTrigDet.h:58
Double_t fAdcPulseAmp[fMaxAdcChannels]
Definition: THcTrigDet.h:82
virtual void SetSpectName(const char *name)
Definition: THcTrigDet.cxx:553
Int_t End(THaRunBase *run)
Definition: THcTrigDet.cxx:583
ClassDef(THcTrigDet, 0)
TString fSpectName
Definition: THcTrigDet.h:89
Double_t fAdcPulseTime[fMaxAdcChannels]
Definition: THcTrigDet.h:83
virtual Bool_t IsIgnoreType(Int_t evtype) const
Definition: THcTrigDet.cxx:568
Int_t fADC_RefTimeCut
Definition: THcTrigDet.h:68
std::vector< Int_t > eventtypes
Definition: THcTrigDet.h:90
virtual Bool_t HaveIgnoreList() const
Definition: THcTrigDet.cxx:577
Double_t * fTdcTimeWindowMax
Definition: THcTrigDet.h:73
void run(bool only_compile=false)
Int_t fAdcMultiplicity[fMaxAdcChannels]
Definition: THcTrigDet.h:86
double Double_t
Double_t fAdcPed[fMaxAdcChannels]
Definition: THcTrigDet.h:80
std::string fKwPrefix
Definition: THcTrigDet.h:46
Int_t Decode(const THaEvData &evData)
Decodes and processes events.
Definition: THcTrigDet.cxx:234
Int_t fNumTdc
Definition: THcTrigDet.h:49
Double_t * fAdcTimeWindowMin
Definition: THcTrigDet.h:70
Double_t fAdcTdcOffset
Definition: THcTrigDet.h:53
std::vector< std::string > fAdcNames
Definition: THcTrigDet.h:57
Double_t Get_CT_Trigtime(Int_t ii)
Definition: THcTrigDet.h:36
Int_t fTdcMultiplicity[fMaxTdcChannels]
Definition: THcTrigDet.h:85
Double_t fTdcOffset
Definition: THcTrigDet.h:54
Double_t fTdcRefTime
Definition: THcTrigDet.h:87
static const int fMaxTdcChannels
Definition: THcTrigDet.h:63
char name[80]
void Setup(const char *name, const char *description)
Definition: THcTrigDet.cxx:310
virtual void Clear(Option_t *opt="")
Clears variables before next event.
Definition: THcTrigDet.cxx:210