Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MainDaqParser.h
Go to the documentation of this file.
1 #ifndef _MAIN_DAQ_PARSER_H_
2 #define _MAIN_DAQ_PARSER_H_
3 #include "DecoData.h"
4 #include "DecoParam.h"
5 #include "DecoError.h"
6 class CodaInputManager;
7 
8 class MainDaqParser {
9  long m_file_size_min;
10  int m_sec_wait;
11  int m_n_wait;
12  CodaInputManager* coda;
13 
15  RunData run_data;
16  SpillDataMap* list_sd;
17  EventDataMap* list_ed;
18 
19  SpillData * sd_now; //< Contain the spill info of the current spill
20  EventDataMap* list_ed_now; //< Contain the event info only in the current spill
21 
22  // Handlers of CODA Event
23  int ProcessCodaPrestart (int* words);
24  int ProcessCodaFee (int* words);
25  int ProcessCodaFeeBoard (int* words);
26  int ProcessCodaFeePrescale(int* words);
27  int ProcessCodaPhysics (int* words);
28 
29  // Handlers of CODA PHYSICS Event
30  int ProcessPhysRunDesc (int* words);
31  int ProcessPhysPrestart (int* words);
32  int ProcessPhysSlow (int* words);
33  int ProcessPhysSpillCounter(int* words);
34  int ProcessPhysBOSEOS (int* words, const int type);
35  int ProcessPhysFlush (int* words);
36 
37  // Handlers of Board data in flush event
38  int ProcessBoardData (int* words, int idx, int idx_roc_end, int e906flag);
39  int ProcessBoardScaler (int* words, int j);
40  int ProcessBoardTriggerBit (int* words, int j);
41  int ProcessBoardTriggerCount(int* words, int j);
42  int ProcessBoardFeeQIE (int* words, int j);
43  int ProcessBoardV1495TDC (int* words, int idx);
44  int ProcessBoardJyTDC2 (int* words, int idx_begin, int idx_roc_end);
45 
46  int ProcessBoardStdTriggerBit (int* words, int idx);
47  int ProcessBoardStdTriggerCount(int* words, int idx);
48  int ProcessBoardStdFeeQIE (int* words, int idx);
49  int ProcessBoardStdV1495TDC (int* words, int idx);
50  int ProcessBoardStdJyTDC2 (int* words, int idx_begin, int idx_roc_end);
51 
52  int PackOneSpillData();
53  int ParseOneSpill();
54  void SetEventInfo(EventInfo* evt, const int eventID);
55 
56 public:
57  typedef enum {
58  TYPE_BOS = 1,
60  } SpillType_t;
61 
62  MainDaqParser();
64 
65  CodaInputManager* GetCoda() { return coda; }
66  int OpenCodaFile(const std::string fname, const long file_size_min=32768, const int sec_wait=15, const int n_wait=40);
67  bool NextPhysicsEvent(EventData*& ed, SpillData*& sd, RunData*& rd);
68  int End();
69 
72 };
73 
74 #endif // _MAIN_DAQ_PARSER_H_
std::map< unsigned int, SpillData > SpillDataMap
Definition: DecoData.h:161
bool NextPhysicsEvent(EventData *&ed, SpillData *&sd, RunData *&rd)
int OpenCodaFile(const std::string fname, const long file_size_min=32768, const int sec_wait=15, const int n_wait=40)
std::map< unsigned int, EventData > EventDataMap
Definition: DecoData.h:219
DecoParam dec_par
Definition: MainDaqParser.h:70
CodaInputManager * GetCoda()
Definition: MainDaqParser.h:65
DecoError dec_err
Definition: MainDaqParser.h:71