/data3/calcul/jacquem/working_dir/Micromegas/micromegasFrameWork/include/parser/MicrorocReader.hh

Go to the documentation of this file.
00001 /* @version $Revision: 1639 $ * @modifiedby $Author: jacquem $ * @lastmodified $Date: 2012-04-10 10:55:24 +0200 (Tue, 10 Apr 2012) $ */
00002 
00003 #ifndef MICROROCREADER_HH
00004 #define MICROROCREADER_HH
00005 
00006 //////////////////////////////////////////////////////////////////////////
00007 //                                                                      //
00008 // MicrorocReader for MICROMEGAS READOUT                                //
00009 //                                                                      //
00010 //////////////////////////////////////////////////////////////////////////
00011 
00012 #include "mTypes.h"
00013 #include "DifReader.hh"
00014 
00015 
00016 class Run;
00017 class Event;
00018 class Detector;
00019 
00020 #include <set>
00021 
00022 //////////////////////////////////////////////////////////////////////////
00023 ///     CLASS DATAREADER                                                //
00024 //////////////////////////////////////////////////////////////////////////
00025 class MicrorocReader : public DifReader {
00026   public:
00027     MicrorocReader(Run& aRun, FILE *aFile, ui32 lastEventId);
00028     ~MicrorocReader();
00029     static const char *type(const int subtype = 0) ;
00030     virtual int getNextEvent(Event& eventToFill) = 0;
00031 
00032   protected:
00033     virtual int getScData() = 0;
00034     //virtual int getAcqData(Event& event) = 0;
00035     void reset();
00036     int storeEvent(Event& event);
00037     int newHit(Event& event, const Detector& detector, int digital, i16 analog,  const int chNum, const int chipId, const int difId,const ui16 memoryOrder=0);
00038 
00039   // ------ data members -------//
00040   protected:
00041 
00042     // file header : data format
00043     unsigned short CRC;            // current CRC for the whole file
00044 
00045     // global header data
00046     int difId;                     // Id of the current DIF board
00047     ui32 difTriggerCounter;        // trigger counter
00048     ui32 usbBusyTrigger   ;        // usb busy trigger counter 
00049     ui32 informationCounter   ;    // information counter 
00050     ui32 globalTriggerCounter;     // global trigger counter
00051     ui32 bcPeriod;                 // the BC period in nanoseconds, unless otherwise specified
00052     i64 bcId_Abs;                  // absolute bc Id for current DIF, in bcPeriods
00053     i64 bcId_AbsOrg;               // the bcId origin, in bcPeriods, for the whole file
00054     i64 bcId_Dif;                  // current bcId for current DIF
00055     i64 bcId_Hit;                  // bcId du hit
00056     i64 eventTime;                 // event time in milliseconds
00057     i32 difSynchro;                
00058 
00059     int SkippedBcId;               // the number of data skipped because of wrong bcId_Hit
00060 }; // class MicrorocReader
00061 
00062 #endif
00063 

Generated on Mon Jan 7 13:15:20 2013 for MicromegasFramework by  doxygen 1.4.7