| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DaqFormatContext.h

Go to the documentation of this file.
00001 #ifndef DAQFORMATMODULES_DAQFORMATCONTEXT_H
00002 #define DAQFORMATMODULES_DAQFORMATCONTEXT_H
00003 
00004 /*
00005  *  DaqFormatContext.h
00006  *  DaqFormatModules
00007  *
00008  *  Created by Simon Patton on 8/5/10.
00009  *  Copyright 2010 DayaBay Collaboration. All rights reserved.
00010  *
00011  */
00012 #include <vector>
00013 
00014 #include "GaudiKernel/IEvtSelector.h"
00015 
00016 class IMessageSvc;
00017 
00018 class DaqReadoutSvc;
00019 class IDaqReadoutSvc;
00020 
00021 namespace DybDaq {
00022     class DaqFormatSelector;
00023     class EventReadout;
00024     class FileBuffer;
00025     class DaqFromFStream;
00026 }
00027 
00028 namespace DybDaq {
00029     
00030     class DaqFormatContext : public IEvtSelector::Context {
00031         
00032     public:
00033         
00034         friend class DaqFormatSelector;
00035 
00039         const static unsigned int kExitOnInvalid;
00040         
00044         const static unsigned int kSkipInvalid;
00045         
00049         const static unsigned int kProcessInvalid;
00050         
00054         virtual ~DaqFormatContext();
00055         
00056         virtual void* identifier() const;
00057         
00061         const DybDaq::EventReadout* event() const;
00062         
00063     protected:
00064         
00068         DaqFormatContext(const std::vector<std::string>& inputFiles,
00069                          const unsigned int actionOnInvalid,
00070                          IMessageSvc& msgSvc,
00071                          IDaqReadoutSvc& daqSvc);
00072         
00076         StatusCode jump(int distance);
00077         
00081         StatusCode isGoodEvent() const;
00082 
00083     private:
00084         
00088         DaqFormatContext();
00089         
00093         DaqFormatContext(const DaqFormatContext& rhs);
00094         
00098         DaqFormatContext& operator=(const DaqFormatContext& rhs);
00099         
00103         StatusCode moveToNextEvent();
00104         
00108         DybDaq::DaqFromFStream* openNextFile();
00109         
00113         IMessageSvc& m_messageSvc;
00114 
00118         DaqReadoutSvc* m_daqSvc;
00119 
00123         bool m_expiredEndRecord;
00124 
00128         DybDaq::DaqFromFStream* m_reader;
00129         
00133         const DybDaq::EventReadout* m_event;
00134         
00138         std::vector<std::string>::const_iterator m_nextFile;
00139 
00143         std::vector<std::string>::const_iterator m_endFile;
00144 
00148         bool m_warnedAboutSkip;
00149 
00153         unsigned int m_actionOnInvalid;
00154     };
00155     
00156 }
00157 
00158 #endif // DAQFORMATMODULES_DAQFORMATCONTEXT_H
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:46:28 2011 for DaqFormatModules by doxygen 1.4.7