Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
GeneratorInterface
ReggeGribovPartonMCInterface
src
read.cc
Go to the documentation of this file.
1
#include "
LzmaFile.h
"
2
3
#include <stdio.h>
4
#include <stdlib.h>
5
#include <string.h>
6
7
8
9
10
11
12
13
int
14
main
(
int
numArgs,
const
char
*
args
[])
15
{
16
int
res;
17
18
if
(numArgs != 2)
19
{
20
//PrintHelp(rs);
21
return
0;
22
}
23
24
25
{
26
size_t
t4 =
sizeof
(
UInt32
);
27
size_t
t8 =
sizeof
(
UInt64
);
28
if
(t4 != 4 || t8 != 8) {
29
//return PrintError(rs, "Incorrect UInt32 or UInt64");
30
}
31
}
32
33
LzmaFile
lzma;
34
res = lzma.
Open
(args[1]);
35
res = lzma.
DecodeAll
();
36
res = lzma.
Close
();
37
38
if
(res !=
SZ_OK
)
39
{
40
if
(res ==
SZ_ERROR_MEM
) {
41
return
0;
//PrintError(rs, kCantAllocateMessage);
42
}
else
if
(res ==
SZ_ERROR_DATA
) {
43
return
0;
//PrintError(rs, kDataErrorMessage);
44
}
else
if
(res ==
SZ_ERROR_WRITE
) {
45
return
0;
//PrintError(rs, kCantWriteMessage);
46
}
else
if
(res ==
SZ_ERROR_READ
) {
47
return
0;
//PrintError(rs, kCantReadMessage);
48
}
49
return
0;
//PrintErrorNumber(rs, res);
50
}
51
return
0;
52
}
SZ_ERROR_DATA
#define SZ_ERROR_DATA
Definition:
Types.h:27
UInt64
unsigned long long int UInt64
Definition:
Types.h:83
LzmaFile.h
LzmaFile::Close
SRes Close()
Definition:
LzmaFile.cc:391
SZ_ERROR_READ
#define SZ_ERROR_READ
Definition:
Types.h:34
UInt32
unsigned int UInt32
Definition:
Types.h:64
SZ_OK
#define SZ_OK
Definition:
Types.h:25
LzmaFile::DecodeAll
SRes DecodeAll()
Definition:
LzmaFile.cc:339
LzmaFile
Definition:
LzmaFile.h:26
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:47
magneticFieldFilterJSON.main
def main
Definition:
magneticFieldFilterJSON.py:21
createfilelist.args
tuple args
Definition:
createfilelist.py:13
Generated for CMSSW Reference Manual by
1.8.5