00001 #ifndef NDBMF_H 00002 #define NDBMF_H 00003 00004 #include <TObject.h> 00005 #include <TString.h> 00006 #include <TObjArray.h> 00007 00008 #include "NdbMT.h" 00009 00010 /* ================== NdbMF =================== */ 00011 /* 00012 * Base class for the File Types (MF) 00013 */ 00014 class NdbMF: public TObject 00015 { 00016 protected: 00017 Int_t iMF; // MF number 00018 TString sDescription; // Description of the File TYPE (MF) 00019 TObjArray aSection; // Array of sections (MT) 00020 00021 public: 00022 NdbMF( Int_t aMF, const char *aDesc) 00023 : TObject(), sDescription(aDesc), aSection() { 00024 iMF = aMF; 00025 } 00026 00027 ~NdbMF() {} 00028 00029 // Virtual functions 00030 virtual Int_t Compare(const TObject *o) const 00031 { return ((iMF==((NdbMF*)o)->iMF)? 0 : 00032 (iMF > ((NdbMF*)o)->iMF)? 1 : -1 ); } 00033 00034 // Access functions 00035 inline Int_t MF() const { return iMF; } 00036 inline TString Description() const { return sDescription; } 00037 00038 // Find Section, by type 00039 NdbMT* Section(Int_t id); 00040 00041 // Find Section by name 00042 NdbMT* Section(const char *name); 00043 00044 // Add a new section in the section list 00045 void Add(NdbMT& sec); 00046 00047 // Enumerate sections in ENDF file 00048 Int_t EnumerateENDFType( Int_t sec ); 00049 00050 // Move File pointer to beggining of MF section in ENDF file 00051 void LocateType() {} 00052 00053 ClassDef(NdbMF,1) 00054 00055 }; // NdbMF 00056 00057 #endif