Hall A ROOT/C++ Analyzer (podd)
Loading...
Searching...
No Matches
THaEtClient.h
Go to the documentation of this file.
1#ifndef Podd_THaEtClient_h_
2#define Podd_THaEtClient_h_
3
5//
6// THaEtClient
7// Data from ET Online System
8//
9// THaEtClient contains normal CODA data obtained via
10// the ET (Event Transfer) online system invented
11// by the JLab DAQ group.
12// This code works locally or remotely and uses the
13// ET system in a particular mode favored by hall A.
14//
15// Robert Michaels (rom@jlab.org)
16//
18
19#include "THaCodaData.h"
20#include <ctime>
21
22#define ET_CHUNK_SIZE 50
23#ifndef __CINT__
24#include "et.h"
25#endif
26
27class TString;
28
29// The ET memory file will have this prefix. The suffix is $SESSION.
30#define ETMEM_PREFIX "/tmp/et_sys_"
31
32// Hall A computers that run CODA/ET
33//FIXME: un-hardcode these ... sigh
34#define ADAQL1 "129.57.164.53"
35#define ADAQL2 "129.57.164.59"
36#define ADAQEP "129.57.164.78"
37#define ADAQCP "129.57.164.79"
38#define ADAQS2 "129.57.164.44"
39#define ADAQS3 "129.57.164.45"
40
41namespace Decoder {
42
44{
45
46public:
47
48 explicit THaEtClient(Int_t mode=1); // By default, gets data from ADAQS2
49// find data on 'computer'. e.g. computer="129.57.164.44"
50 explicit THaEtClient(const char* computer, Int_t mode=1);
51 THaEtClient(const char* computer, const char* session, Int_t mode=1);
53
54 Int_t codaOpen(const char* computer, Int_t mode=1);
55 Int_t codaOpen(const char* computer, const char* session, Int_t mode=1);
57 Int_t codaRead(); // codaRead() must be called once per event
58 virtual bool isOpen() const;
59
60private:
61
65#ifndef __CINT__
66 et_sys_id id;
67 et_att_id my_att;
68#endif
71 Int_t init(const char* computer="hana_sta");
72
73// rate calculation
76 time_t daqt1;
77 double ratesum;
78
79 ClassDef(THaEtClient,0) // ET client connection for online data
80
81};
82
83}
84
85#endif
int Int_t
#define ClassDef(name, id)
Option_t Option_t TPoint TPoint const char mode
Int_t codaOpen(const char *computer, Int_t mode=1)
THaEtClient(const char *computer, Int_t mode=1)
THaEtClient & operator=(const THaEtClient &fn)
Int_t init(const char *computer="hana_sta")
THaEtClient(const THaEtClient &fn)
THaEtClient(const char *computer, const char *session, Int_t mode=1)
virtual bool isOpen() const