StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEEMCReader.cxx
1 /***************************************************************************
2  *
3  *
4  *
5  * Author: Herbert Ward
6  ***************************************************************************
7  *
8  * Description: Offline Wrapper for DAQ EEMC reader classes
9  *
10  ***************************************************************************
11  *
12  *
13  *
14  **************************************************************************/
15 #include <string.h>
16 #include <stdio.h>
17 #include <errno.h>
18 #include <assert.h>
19 #include "StDAQReader.h"
20 #include "StEEMCReader.h"
21 #include "StDaqLib/EEMC/EEMC_Reader.hh"
22 
23 typedef EventInfo DAQEventInfo;
24 
25 StEEMCReader::StEEMCReader(StDAQReader *daqr) {
26  fEEMCImpReader=0;
27  fDAQReader = daqr;
28  delete fEEMCImpReader;
29  fEEMCImpReader = ::getEEMCReader(daqr->getEventReader());
30 }
31 
32 
33 StEEMCReader::~StEEMCReader() {
34 }
35 
36 int StEEMCReader::close() {
37 // delete fEEMCImpReader; fEEMCImpReader=0;
38  return 1;
39 }
40 
41 
42 int StEEMCReader::Update() {
43  delete fEEMCImpReader;
44  fEEMCImpReader = ::getEEMCReader(fDAQReader->getEventReader());
45  // close();
46  cout<<" EEMC Updated**"<<endl;
47  return 1;
48 }
49 
50 
51 u_short *StEEMCReader::getEemcHeadBlock(int fiber,char type) {
52  if(fEEMCImpReader) return fEEMCImpReader->getEemcHeadBlock(fiber,type);
53  return 0;
54 }
55 
56 
57 u_short *StEEMCReader::getEemcDataBlock(int fiber,char type) {
58  if(fEEMCImpReader) return fEEMCImpReader->getEemcDataBlock(fiber,type);
59  return 0;
60 }
61 
62 
63 u_short StEEMCReader::getEemcHead(int fiber,int channel,char type) {
64  if(fEEMCImpReader) return fEEMCImpReader->getEemcHead(fiber,channel,type);
65  return 0;
66 }
67 
68 u_short StEEMCReader::getEemcData(int fiber,int channel,char type) {
69  if(fEEMCImpReader) return fEEMCImpReader->getEemcData(fiber,channel,type);
70  return 0;
71 }
72 
73 int StEEMCReader::isEemcBankIn( char type) {
74  if(fEEMCImpReader) return fEEMCImpReader->isEemcBankIn( type);
75  return 0;
76 }
u_short * getEemcHeadBlock(int fiber, char type)
EEMC_Reader destructor.
Definition: EEMC_Reader.cxx:20