Fork me on GitHub

source: svn/trunk/classes/DelphesSTDHEPReader.h@ 1242

Last change on this file since 1242 was 1129, checked in by Pavel Demin, 12 years ago

use xdr_opaque when reading pipe

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision Date
File size: 1.7 KB
Line 
1#ifndef DelphesSTDHEPReader_h
2#define DelphesSTDHEPReader_h
3
4/** \class DelphesSTDHEPReader
5 *
6 * Reads STDHEP file
7 *
8 *
9 * $Date: 2013-05-29 22:47:35 +0000 (Wed, 29 May 2013) $
10 * $Revision: 1129 $
11 *
12 *
13 * \author P. Demin - UCL, Louvain-la-Neuve
14 *
15 */
16
17#include <stdio.h>
18#include <rpc/types.h>
19#include <rpc/xdr.h>
20
21class TObjArray;
22class TStopwatch;
23class TDatabasePDG;
24class ExRootTreeBranch;
25class DelphesFactory;
26
27class DelphesSTDHEPReader
28{
29public:
30 enum STDHEPBlock
31 {
32 GENERIC = 0,
33 FILEHEADER = 1,
34 EVENTTABLE = 2,
35 EVENTHEADER = 4,
36 MCFIO_STDHEP = 101,
37 MCFIO_STDHEPBEG = 106,
38 MCFIO_STDHEPEND = 107,
39 MCFIO_STDHEP4 = 201
40 };
41
42 DelphesSTDHEPReader();
43 ~DelphesSTDHEPReader();
44
45 void SetInputFile(FILE *inputFile);
46
47 void Clear();
48 bool EventReady();
49
50 bool ReadBlock(DelphesFactory *factory,
51 TObjArray *allParticleOutputArray,
52 TObjArray *stableParticleOutputArray,
53 TObjArray *partonOutputArray);
54
55 void AnalyzeEvent(ExRootTreeBranch *branch, long long eventNumber,
56 TStopwatch *readStopWatch, TStopwatch *procStopWatch);
57
58private:
59
60 void AnalyzeParticles(DelphesFactory *factory,
61 TObjArray *allParticleOutputArray,
62 TObjArray *stableParticleOutputArray,
63 TObjArray *partonOutputArray);
64
65 void SkipBytes(u_int size);
66 void SkipArray(u_int elsize);
67
68 void ReadFileHeader();
69 void ReadEventTable();
70 void ReadSTDHEPHeader(bool skipNTuples);
71 void ReadSTDCM1();
72 void ReadSTDHEP();
73 void ReadSTDHEP4();
74
75 FILE *fInputFile;
76
77 XDR *fInputXDR;
78
79 char *fBuffer;
80
81 TDatabasePDG *fPDG;
82
83 u_int fEntries;
84 int fBlockType, fEventNumber, fEventSize;
85 double fWeight, fAlphaQCD, fAlphaQED;
86
87 u_int fScaleSize;
88 double fScale[10];
89};
90
91#endif // DelphesSTDHEPReader_h
92
93
Note: See TracBrowser for help on using the repository browser.