Changeset 295 in svn
- Timestamp:
- Mar 9, 2009, 12:35:36 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/interface/DataConverter.h
r260 r295 47 47 public: 48 48 49 DataConverter() {}; 49 DataConverter() : Nevt(-1) {}; 50 DataConverter(const int &N) : Nevt(N) {}; 50 51 ~DataConverter() {}; 52 53 private: 54 int Nevt; // number of events to read; -1 means "all of them" 51 55 }; 52 56 -
trunk/interface/HEPEVTConverter.h
r260 r295 88 88 public: 89 89 90 HEPEVTConverter(const string& inputFileList, const string& outputFileName );90 HEPEVTConverter(const string& inputFileList, const string& outputFileName, const int& Nevents=-1); 91 91 92 92 }; -
trunk/interface/LHEFConverter.h
r260 r295 49 49 public: 50 50 51 LHEFConverter(const string& inputFileList, const string& outputFileName );51 LHEFConverter(const string& inputFileList, const string& outputFileName, const int& Nevents=-1); 52 52 ~LHEFConverter(); 53 53 -
trunk/interface/STDHEPConverter.h
r260 r295 41 41 class STDHEPConverter : public DataConverter { 42 42 public: 43 STDHEPConverter(const string& inputFileList, const string& outputFileName );43 STDHEPConverter(const string& inputFileList, const string& outputFileName, const int& Nevents=-1); 44 44 ~STDHEPConverter(); 45 45 -
trunk/src/HEPEVTConverter.cc
r270 r295 55 55 //------------------------------------------------------------------------------ 56 56 57 // ------------------------------------------------------------------------------57 //Nevents not yet implemented! 08.03.2009 58 58 59 59 HEPTreeReader::HEPTreeReader(TTree *tree, HEPEvent *event) : fChain(tree), fCurrentTree(-1), fEvent(event) … … 169 169 170 170 171 HEPEVTConverter::HEPEVTConverter(const string& inputFileList, const string& outputFileName )171 HEPEVTConverter::HEPEVTConverter(const string& inputFileList, const string& outputFileName, const int& Nevents) : DataConverter(Nevents) 172 172 { 173 173 string buffer; -
trunk/src/LHEFConverter.cc
r264 r295 103 103 104 104 //------------------------------------------------------------------------------ 105 106 LHEFConverter::LHEFConverter(const string& inputFileList, const string& outputFileName) { 105 //Nevents not yet implemented! 08.03.2009 106 LHEFConverter::LHEFConverter(const string& inputFileList, const string& outputFileName, const int& Nevents) : 107 DataConverter(Nevents) { 107 108 108 109 ExRootTreeWriter *treeWriter = new ExRootTreeWriter(outputFileName, "GEN"); -
trunk/src/STDHEPConverter.cc
r270 r295 58 58 void STDHEPConverter::AnalyseParticles(ExRootTreeBranch *branch) 59 59 { 60 int Nmax = -1; // useless for the moment -- should be changed in order 61 if(Nmax>0) Nmax = min(Nmax,myhepevt.nhep); // to use Nevt in DataConverter 62 else Nmax = myhepevt.nhep; 63 60 64 GenParticle *element; 61 65 … … 64 68 Int_t number; 65 69 66 for(number = 0; number < myhepevt.nhep; ++number)70 for(number = 0; number < Nmax; ++number) 67 71 { 68 72 element = static_cast<GenParticle*>(branch->NewEntry()); … … 104 108 //------------------------------------------------------------------------------ 105 109 106 STDHEPConverter::STDHEPConverter(const string& inputFileList, const string& outputFileName) 107 { 108 110 STDHEPConverter::STDHEPConverter(const string& inputFileList, const string& outputFileName, const int& Nevents) : DataConverter(Nevents) 111 { 109 112 int ierr, entryType; 110 113 int istr = 0;
Note:
See TracChangeset
for help on using the changeset viewer.