src
GeneratorInterface
ReggeGribovPartonMCInterface
src
read.cc
Go to the documentation of this file.
1
#include "
LzmaFile.h
"
2
3
#include <cstdio>
4
#include <cstdlib>
5
#include <cstring>
6
7
int
main
(
int
numArgs,
const
char
*
args
[]) {
8
int
res
;
9
10
if
(numArgs != 2) {
11
//PrintHelp(rs);
12
return
0;
13
}
14
15
{
16
size_t
t4 =
sizeof
(
UInt32
);
17
size_t
t8 =
sizeof
(
UInt64
);
18
if
(t4 != 4 || t8 != 8) {
19
//return PrintError(rs, "Incorrect UInt32 or UInt64");
20
}
21
}
22
23
LzmaFile
lzma;
24
res
= lzma.
Open
(
args
[1]);
25
res
= lzma.
DecodeAll
();
26
res
= lzma.
Close
();
27
28
if
(
res
!=
SZ_OK
) {
29
if
(
res
==
SZ_ERROR_MEM
) {
30
return
0;
//PrintError(rs, kCantAllocateMessage);
31
}
else
if
(
res
==
SZ_ERROR_DATA
) {
32
return
0;
//PrintError(rs, kDataErrorMessage);
33
}
else
if
(
res
==
SZ_ERROR_WRITE
) {
34
return
0;
//PrintError(rs, kCantWriteMessage);
35
}
else
if
(
res
==
SZ_ERROR_READ
) {
36
return
0;
//PrintError(rs, kCantReadMessage);
37
}
38
return
0;
//PrintErrorNumber(rs, res);
39
}
40
return
0;
41
}
main
int main(int numArgs, const char *args[])
Definition:
read.cc:7
SZ_ERROR_DATA
#define SZ_ERROR_DATA
Definition:
Types.h:27
UInt64
unsigned long long int UInt64
Definition:
Types.h:88
LzmaFile.h
LzmaFile::Close
SRes Close()
Definition:
LzmaFile.cc:351
res
Definition:
Electron.h:6
SZ_ERROR_READ
#define SZ_ERROR_READ
Definition:
Types.h:34
UInt32
unsigned int UInt32
Definition:
Types.h:69
SZ_OK
#define SZ_OK
Definition:
Types.h:25
LzmaFile::DecodeAll
SRes DecodeAll()
Definition:
LzmaFile.cc:306
LzmaFile
Definition:
LzmaFile.h:24
writedatasetfile.args
args
Definition:
writedatasetfile.py:18
SZ_ERROR_MEM
#define SZ_ERROR_MEM
Definition:
Types.h:28
SZ_ERROR_WRITE
#define SZ_ERROR_WRITE
Definition:
Types.h:35
LzmaFile::Open
SRes Open(const std::string &fileName)
Definition:
LzmaFile.cc:44
Generated for CMSSW Reference Manual by
1.8.14