8 #ifndef __QWEVENTBUFFER__
9 #define __QWEVENTBUFFER__
16 #include "TStopwatch.h"
18 #include "THaCodaData.h"
103 Int_t
OpenDataFile(UInt_t current_run,
const TString rw =
"R");
104 Int_t
OpenDataFile(
const TString filename,
const TString rw =
"R");
107 Int_t
OpenETStream(TString computer, TString session,
int mode,
const TString stationname=
"");
207 const TString&
DataFile(
const UInt_t run,
const Short_t seg);
273 Bool_t okay = kFALSE;
274 UInt_t *localbuff = (UInt_t*)(
fEvStream->getEvBuffer());
278 }
else if (
object.CanUseThisEventType(
fEvtType)){
294 &localbuff[fWordsSoFar],
void SetWordsSoFar(const ULong_t tmpwords)
enum QwEventBuffer::CodaStreamMode fEvStreamMode
std::vector< UInt_t > fEventList
QwParameterFile * fEventListFile
Bool_t DataFileIsSegmented()
Bool_t DecodeSubbankHeader(UInt_t *buffer)
Bool_t GetNextRunRange()
Read the next requested run range, return true if success.
static void SetDefaultDataFileStem(const std::string &stem)
Bool_t FillSubsystemConfigurationData(QwSubsystemArray &subsystems)
Int_t GetSegmentNumber() const
Return CODA file segment number.
void SetEventType(const UInt_t tmptype)
std::vector< Int_t > fRunSegments
void ProcessOptions(QwOptions &options)
Sets internal flags based on the QwOptions.
Int_t WriteFileEvent(int *buffer)
UInt_t fStartingPhysicsEvent
Int_t OpenNextStream()
Opens the event stream (file or ET) based on the internal flags.
Int_t CloseStream()
Closes a currently open event stream.
std::pair< Int_t, Int_t > fRunRange
void ClearEventData(std::vector< VQwSubsystem * > &subsystems)
Int_t OpenETStream(TString computer, TString session, int mode, const TString stationname="")
static void SetDefaultDataFileExtension(const std::string &extension)
const TString & GetDataFile() const
Int_t OpenDataFile(UInt_t current_run, Short_t seg)
Bool_t GetNextEventRange()
Read the next requested event range, return true if success.
Bool_t FillObjectWithEventData(T &t)
std::pair< UInt_t, UInt_t > GetEventRange() const
std::string fRunListFileName
std::string fEventListFileName
Int_t EncodePrestartEvent(int runnumber, int runtype=0)
Double_t fCleanParameter[3]
Scan data/clean data from the green monster.
TString fDataFileExtension
static const UInt_t kNullDataWord
void DecodeEventIDBank(UInt_t *buffer)
Int_t WriteEvent(int *buffer)
QwParameterFile * fRunListFile
QwEventBuffer()
Default constructor.
Int_t EncodeSubsystemData(QwSubsystemArray &subsystems)
void SetEventLength(const ULong_t tmplength)
Int_t GetRunNumber() const
Return CODA file run number.
static std::string fDefaultDataFileStem
std::vector< Int_t >::iterator fRunSegmentIterator
static void DefineOptions(QwOptions &options)
std::pair< Int_t, Int_t > fSegmentRange
static const double T
Magnetic field: base unit is T.
The pure virtual base class of all subsystems.
void SetDataDirectory(const TString datadir)
TStopwatch fRunTimer
Timer used for runlet processing loop.
static const Int_t kNoNextDataFile
static const Int_t kFileHandleNotConfigured
Bool_t FillSubsystemData(QwSubsystemArray &subsystems)
static std::string fDefaultDataFileExtension
TString GetRunLabel() const
Returns a string like <run#> or <run#>.<file#>
Bool_t FillEPICSData(QwEPICSEvent &epics)
std::vector< Int_t > fRunRangeMaxList
Bool_t AreRunletsSplit() const
Return true if file segments are being separated for.
std::pair< UInt_t, UInt_t > fEventRange
UInt_t fEvtNumber
CODA event number; only defined for physics events.
const TString & DataFile(const UInt_t run, const Short_t seg)
std::vector< Int_t > fRunRangeMinList
Bool_t GetNextRunNumber()
Get the next run in the active run range, proceed to next range if needed.
static const Int_t kRunNotSegmented
TStopwatch fStopwatch
Timer used for internal timing.
Bool_t IsROCConfigurationEvent()