#ifndef TP_CMSPIXELREADER_H #define TP_CMSPIXELREADER_H #include #include #include #include "pixelForReadout.h" class CMSPixelReader { public: CMSPixelReader(); void open( unsigned int euRunNumber ); void open( unsigned int euRunNumber, int mode );//DP bool isOpen() const { return mtbStream.is_open(); } std::vector getCMSclust( unsigned long & cmsTimeStamp, int& fNpix ); int getChip() const { assert(chip != 0); return chip; } private: std::ifstream mtbStream; int chip; // last read word. Needs to be kept between getCMSclust() calls. unsigned short word; // = 0 static const int empty = 10; static const int tail = 6; static const int ff = 4; // calibration constants, these are set when opening a file // depending on the chip they were taken with int flevel[7]; double amax[52][80]; double gain[52][80]; double horz[52][80]; double vert[52][80]; }; #endif // TP_CMSPIXELREADER_H