Fork me on GitHub

Changeset 295 in svn


Ignore:
Timestamp:
Mar 9, 2009, 12:35:36 AM (16 years ago)
Author:
Xavier Rouby
Message:

vers un Nevnt implemente correctement. Pas fini

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/interface/DataConverter.h

    r260 r295  
    4747public:
    4848
    49   DataConverter() {};
     49  DataConverter() : Nevt(-1) {};
     50  DataConverter(const int &N) : Nevt(N) {};
    5051  ~DataConverter() {};
     52
     53private:
     54  int Nevt; // number of events to read; -1 means "all of them"
    5155};
    5256
  • trunk/interface/HEPEVTConverter.h

    r260 r295  
    8888public:
    8989
    90   HEPEVTConverter(const string& inputFileList, const string& outputFileName);
     90  HEPEVTConverter(const string& inputFileList, const string& outputFileName, const int& Nevents=-1);
    9191
    9292};
  • trunk/interface/LHEFConverter.h

    r260 r295  
    4949public:
    5050
    51   LHEFConverter(const string& inputFileList, const string& outputFileName);
     51  LHEFConverter(const string& inputFileList, const string& outputFileName, const int& Nevents=-1);
    5252  ~LHEFConverter();
    5353
  • trunk/interface/STDHEPConverter.h

    r260 r295  
    4141class STDHEPConverter : public DataConverter {
    4242  public:
    43     STDHEPConverter(const string& inputFileList, const string& outputFileName);
     43    STDHEPConverter(const string& inputFileList, const string& outputFileName, const int& Nevents=-1);
    4444    ~STDHEPConverter();
    4545
  • trunk/src/HEPEVTConverter.cc

    r270 r295  
    5555//------------------------------------------------------------------------------
    5656
    57 //------------------------------------------------------------------------------
     57//Nevents not yet implemented! 08.03.2009
    5858
    5959HEPTreeReader::HEPTreeReader(TTree *tree, HEPEvent *event) : fChain(tree), fCurrentTree(-1), fEvent(event)
     
    169169
    170170
    171 HEPEVTConverter::HEPEVTConverter(const string& inputFileList, const string& outputFileName)
     171HEPEVTConverter::HEPEVTConverter(const string& inputFileList, const string& outputFileName, const int& Nevents) : DataConverter(Nevents)
    172172{
    173173  string buffer;
  • trunk/src/LHEFConverter.cc

    r264 r295  
    103103
    104104//------------------------------------------------------------------------------
    105 
    106 LHEFConverter::LHEFConverter(const string& inputFileList, const string& outputFileName) {
     105//Nevents not yet implemented! 08.03.2009
     106LHEFConverter::LHEFConverter(const string& inputFileList, const string& outputFileName, const int& Nevents) :
     107 DataConverter(Nevents) {
    107108
    108109  ExRootTreeWriter *treeWriter = new ExRootTreeWriter(outputFileName, "GEN");
  • trunk/src/STDHEPConverter.cc

    r270 r295  
    5858void STDHEPConverter::AnalyseParticles(ExRootTreeBranch *branch)
    5959{
     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
    6064  GenParticle *element;
    6165
     
    6468  Int_t number;
    6569
    66   for(number = 0; number < myhepevt.nhep; ++number)
     70  for(number = 0; number < Nmax; ++number)
    6771  {
    6872    element = static_cast<GenParticle*>(branch->NewEntry());
     
    104108//------------------------------------------------------------------------------
    105109
    106 STDHEPConverter::STDHEPConverter(const string& inputFileList, const string& outputFileName)
    107 {
    108 
     110STDHEPConverter::STDHEPConverter(const string& inputFileList, const string& outputFileName, const int& Nevents) : DataConverter(Nevents)
     111{
    109112  int ierr, entryType;
    110113  int istr = 0;
Note: See TracChangeset for help on using the changeset viewer.