// parsing of the Focal Surface File // $Id: FocalSurfaceFileParser.hh,v 1.5 2004/09/13 16:43:38 thea Exp $ // M. Pallavicini - created // This class inherits from NumberFileParser (config package) // It is basically an helper class to build the Focal Surface. It is used // by EusoElectronics // #ifndef _FOCALSURFACEFILEPARSER_HH_ #define _FOCALSURFACEFILEPARSER_HH_ #include "euso.hh" #include "EVector.hh" #include "NumbersFileParser.hh" class FocalSurfaceFileParser : public NumbersFileParser { public: // ctor FocalSurfaceFileParser( string& fname ); // dtor virtual ~FocalSurfaceFileParser(); // returns PMT number of the current line // at each call move one line down // returns 0 when number table is over int NewPmtId(); // return macrocell id if we have a new one, otherwise 0 int NewMacroCell(); // return elementary cell id if we have a new one, otherwise 0 int NewElementaryCell(); // return front end chip id if we have a new one, otherwise 0 int NewFrontEndChip(); // row and column position in macrocell inline int GetRowOffset() { return (int) GetNum( fCurrent, CellRowCol ); } inline int GetColOffset() { return (int) GetNum( fCurrent, CellColCol ); } // geometry parameters const EVector& Pos(); const EVector& Norm(); const EVector& Dir(); private: // current line int fCurrent; // keep old values int fOldPmt; int fOldMC; int fOldChip; int fOldEC; // geometry vectors EVector fPos; EVector fNorm; EVector fDir; // file format table enum FileFormatTable { PmtIdCol=0, // pmt identifier MCIdCol, // macrocell identifier PDMIdCol, // pdm identifier ECIdCol, // elementary cell identifier ChipIdCol, // front end chip identifier CellRowCol, // offset row in macrocell CellColCol, // offset column in macrocell, PmtTypeCol, // type pf PMT PosXCol, // position X PosYCol, // position Y, PosZCol, // position Z, NormXCol, // normal X NormYCol, // normal Y NormZCol, // normal Z DirXCol, // direction X DirYCol, // direction Y DirZCol // direction Z }; ClassDef(FocalSurfaceFileParser,0) }; #endif