StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
EemcTrigUtil.h
1 // -*- mode:c++ -*-
2 
3 #ifndef EEMC_TRIG_UTIL_HH
4 #define EEMC_TRIG_UTIL_HH
5 
6 #include "TDatime.h"
7 
9 {
10  Int_t date_start;
11  Int_t time_start;// timezone = GMT
12  Int_t date_finish;
13  Int_t time_finish;
14  Int_t HT[3];
15  Int_t TP[3];
16  Int_t JP[3];
17  Int_t HTTPselect;
18  Int_t TPthrSelc;
19  Int_t BEsumthr;
20  Int_t EEsumthr;
21  Int_t JPSIthrSelc;
22  Int_t BarreSide;
23  Int_t EtotThr;
24 };
25 
26 // function class to retrieve information about dsm configuration based on timestamps
27 class EemcTrigUtil {
28  private:
29  static void readPed4(const char *path, int mxChan, int *feePed4);
30  static void genPed4(int ped4val, int mxChan, int *feePed4);
31 
32  public:
33  static void getDsmThresholds(int yyyymmdd, int hhmmss, DsmThreshold &thresholds);
34  static void getFeePed4(const char *path,int yyyymmdd, int hhmmss, int mxChan, int *feePed4);
35  static void getFeePed4(const TDatime& date, int mxChan, int* feePed4);
36  static void getFeeOutMask(const char* maskfile, int* highTowerMask, int* patchSumMask);
37  static void getFeeOutMask(const TDatime& date, int* highTowerMask, int* patchSumMask);
38  static void getDsmAndChannelFromSteveJetPatchAndTriggerPatch(int jetpatch, int triggerpatch, int& dsm, int& chan);
39  static void getTriggerPatchFromDsmAndChannel(int dsm, int chan, int& triggerpatch);
40  static void getTriggerPatchFromSteveJetPatchAndTriggerPatch(int jetpatch, int triggerpatch, int& triggerpatch2);
41  static void getFeeBoardMask(const TDatime& date, int* highTower);
42  static void getFeeBoardFromSteveTriggerPatch(int triggerpatch, int& board);
43 };
44 
45 //
46 // $Id: EemcTrigUtil.h,v 1.5 2011/10/16 21:43:44 pibero Exp $
47 //
48 // $Log: EemcTrigUtil.h,v $
49 // Revision 1.5 2011/10/16 21:43:44 pibero
50 // Implement EEMC FEE boards HT masks
51 //
52 // Revision 1.4 2011/10/16 17:41:59 pibero
53 // Implement EEMC FEE HT & TP masks
54 //
55 // Revision 1.3 2009/11/18 19:12:13 pibero
56 // Added Endcap FEE pedestals for all years.
57 // The code will scan the setup directory /afs/rhic.bnl.gov/star/users/pibero/public/StarTrigSimuSetup/ped
58 // and load pedestals from the DB timestamp.
59 // The plan for the future is to upload the ped4 into the STAR database and retrieve from there.
60 //
61 // Revision 1.2 2009/11/18 15:50:59 pibero
62 // Address several compiler warnings of the type:
63 //
64 // warning: deprecated conversion from string constant 'char*'
65 //
66 // Revision 1.1 2009/10/12 18:04:27 pibero
67 // Moved StEEmcUtil/EEdsm to StTriggerUtilities/Eemc
68 //
69 // Revision 1.3 2009/02/21 09:07:24 ogrebeny
70 // Updates for 2009 DSM thresholds from Pibero and Liaoyuan
71 //
72 // Revision 1.2 2007/12/05 23:44:59 jwebb
73 // Time-dependent DSM thresholds added.
74 //
75 //
76 
77 #endif