EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Splitter.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Splitter.h
1
/* -------------------------------------------------------------------------- */
2
/* Splitter.h */
3
/* */
4
/* Definitions related to Splitter.cc (C string disassembler) code. */
5
/* */
6
/* A.Kisselev, PNPI, St.Petersburg, Russia. */
7
/* e-mail: kisselev@hermes.desy.de */
8
/* -------------------------------------------------------------------------- */
9
10
#include <cstdio>
11
12
#ifndef _SPLITTER_H
13
#define _SPLITTER_H
14
15
// Yes, do not care about dynamic allocation;
16
#define STRING_LEN_MAX 256
17
#define SUBSTRINGS_MAX 256
18
19
class
Splitter
{
20
public
:
21
Splitter
() {
argn
= 0;};
22
23
int
splitString
(
char
*str);
24
int
splitNextString
(FILE *
ff
);
25
26
// Public access to "argn" & "argp" variables;
27
int
getArgn
() {
return
argn
;};
28
// 'const': yes, read access is assumed;
29
const
char
*
getArgp
(
unsigned
id
) {
return
id
<
argn
?
argp
[id] : 0;};
30
31
private
:
32
// Array with substring pointers;
33
unsigned
argn
;
34
char
*
argp
[
SUBSTRINGS_MAX
];
35
36
// Well, see no good reason to allow too long strings; if ever need this,
37
// just malloc/free this pointer dynamically;
38
char
buffer
[
STRING_LEN_MAX
];
39
40
int
splitStringCore
();
41
} ;
42
43
#endif
EicRoot
blob
master
eic
ayk
Splitter.h
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:33
using
1.8.2 with
EIC GitHub integration