00001 #ifndef MICROROCXDAQREADER_HH 00002 #define MICROROXDAQCREADER_HH 00003 00004 ////////////////////////////////////////////////////////////////////////// 00005 // // 00006 // MicrorocXDaqReader for MICROMEGAS READOUT // 00007 // From XDaq DAQ in lcio format 00008 // // 00009 ////////////////////////////////////////////////////////////////////////// 00010 00011 #include "mTypes.h" 00012 #include "MicrorocMergeReader.hh" 00013 #include <map> 00014 #include <set> 00015 #include <list> 00016 00017 #define XDAQMR "xdaqMR" 00018 //#define NBLINE 4 00019 #define NBCHIP 16 00020 #define NBCHANNEL 64 00021 00022 #include "IO/LCReader.h" 00023 #include "EVENT/LCEvent.h" 00024 00025 00026 00027 class Run; 00028 class Event; 00029 class Detector; 00030 00031 00032 00033 ////////////////////////////////////////////////////////////////////////// 00034 /// CLASS DATAREADER // 00035 ////////////////////////////////////////////////////////////////////////// 00036 class MicrorocXDaqReader : public MicrorocMergeReader { 00037 public: 00038 MicrorocXDaqReader(Run& aRun, std::string aFilefullPath, ui32 lastEventId, bool forceAnalog,std::set<unsigned int>* = NULL); 00039 ~MicrorocXDaqReader(); 00040 static const char *type(const int subtype = 0) { return XDAQMR; }; 00041 00042 00043 //int getScData(); 00044 int getNextEvent(Event& eventToFill) ; 00045 //int getAcqData(Event& event, unsigned char *bufChar, bool tempExist = false) ; 00046 int getAnalogData(Event& event) ; 00047 //unsigned int getData(const unsigned int nBytes); 00048 unsigned int getSpecificData(const unsigned int nBytes); 00049 00050 00051 00052 private: 00053 void localReset(); 00054 // void display(const int inc = 0) ; 00055 00056 00057 private: 00058 std::list<unsigned char> rawdataList; 00059 std::list<unsigned char>::const_iterator itRawdata; 00060 00061 IO::LCReader *lcReader; 00062 bool firstEvent; 00063 00064 00065 }; // class MicrorocXDaqReader 00066 00067 #endif