Hall A ROOT/C++ Analyzer (podd)
Loading...
Searching...
No Matches
THaCodaFile.h
Go to the documentation of this file.
1#ifndef Podd_THaCodaFileh_h_
2#define Podd_THaCodaFileh_h_
3
5//
6// THaCodaFile
7// File of CODA data
8//
9// CODA data file, and facilities to open, close, read,
10// write, filter CODA data to disk files, etc.
11// A lot of this relies on the "evio.cpp" code from
12// DAQ group which is a C++ rendition of evio.c that
13// we have used for years, but here are some useful
14// added features.
15//
16// author Robert Michaels (rom@jlab.org)
17//
19
20#include "THaCodaData.h"
21#include "Decoder.h"
22#include <vector>
23
24namespace Decoder {
25
26class THaCodaFile : public THaCodaData {
27
28public:
29
31 explicit THaCodaFile(const char* filename, const char* rw="r");
32 THaCodaFile(const THaCodaFile &fn) = delete;
33 THaCodaFile& operator=(const THaCodaFile &fn) = delete;
34 virtual ~THaCodaFile();
35 virtual Int_t codaOpen(const char* filename, Int_t mode=1);
36 virtual Int_t codaOpen(const char* filename, const char* rw, Int_t mode=1);
37 virtual Int_t codaClose();
38 virtual Int_t codaRead();
40 Int_t filterToFile(const char* output_file); // filter to an output file
41 void addEvTypeFilt(UInt_t evtype_to_filt); // add an event type to list
42 void addEvListFilt(UInt_t event_to_filt); // add an event num to list
43 void setMaxEvFilt(UInt_t max_event); // max num events to filter
44 virtual bool isOpen() const;
45
46private:
47
48 void init(const char* fname="");
51 std::vector<UInt_t> evlist, evtypes;
52
53 ClassDef(THaCodaFile,0) // File of CODA data
54
55};
56
57} // namespace Decoder
58
59#endif
int Int_t
unsigned int UInt_t
#define ClassDef(name, id)
THaCodaFile(const THaCodaFile &fn)=delete
void addEvTypeFilt(UInt_t evtype_to_filt)
virtual bool isOpen() const
virtual Int_t codaOpen(const char *filename, Int_t mode=1)
std::vector< UInt_t > evtypes
Definition THaCodaFile.h:51
void init(const char *fname="")
void setMaxEvFilt(UInt_t max_event)
Int_t filterToFile(const char *output_file)
virtual Int_t codaClose()
virtual Int_t codaRead()
std::vector< UInt_t > evlist
Definition THaCodaFile.h:51
THaCodaFile & operator=(const THaCodaFile &fn)=delete
Int_t codaWrite(const UInt_t *evbuffer)
void addEvListFilt(UInt_t event_to_filt)