StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
StSpinPool
StSpinDbMaker
api
SpinDbIO.h
1
// -*-C++-*-
2
// $Id: SpinDbIO.h,v 1.1 2005/09/30 23:47:48 balewski Exp $:
3
#ifndef __SPIN_DBIO_H_
4
#define __SPIN_DBIO_H_
5
6
// ------------------------------------------------------------------
7
class
SpinDbIOBase
{
8
public
:
9
SpinDbIOBase
(
int
nmemb=0 ,
int
sz=1);
10
virtual
~
SpinDbIOBase
();
11
virtual
int
read (FILE *f) = 0;
12
virtual
int
write(FILE *f) = 0;
13
virtual
char
* setComment(
char
*c) { comment = c;
return
comment; };
14
virtual
char
* getComment() {
return
comment; };
15
void
setData(
char
*ptr) { bytePtr = ptr; };
16
void
resetData(
int
sz=0) { memset(bytePtr,0x00,(sz>0) ? sz : bytes); };
17
char
*getData() {
return
(bytePtr); };
18
int
*getIndices(){
return
(indexArr); };
19
int
getBytes() {
return
(bytes) ; };
20
int
getSize() {
return
(nElem); };
21
// bool checkLine(const char* line);
22
23
protected
:
24
char
*bytePtr;
// pointer to data
25
int
bytes;
// array size
26
int
nElem;
// size of one element
27
int
*indexArr;
// array of indices
28
char
*comment;
29
};
30
31
32
// ------------------------------------------------------------------
33
struct
spinDbV124
;
34
class
SpinDbV124IO
:
public
SpinDbIOBase
{
35
public
:
36
SpinDbV124IO
(
int
n);
37
int
read (FILE *f);
38
int
write(FILE *f);
39
protected
:
40
spinDbV124
*
data
(
int
i=0);
41
};
42
43
44
// ------------------------------------------------------------------
45
struct
spinDbStar
;
46
class
SpinDbStarIO
:
public
SpinDbIOBase
{
47
public
:
48
SpinDbStarIO
(
int
n);
49
int
read (FILE *f);
50
int
write(FILE *f);
51
protected
:
52
spinDbStar
*
data
(
int
i=0);
53
};
54
55
56
57
// ------------------------------------------------------------------
58
struct
spinDbBXmask
;
59
class
SpinDbBXmaskIO
:
public
SpinDbIOBase
{
60
public
:
61
SpinDbBXmaskIO
(
int
n);
62
int
read (FILE *f);
63
int
write(FILE *f);
64
protected
:
65
spinDbBXmask
*
data
(
int
i=0);
66
};
67
68
69
#endif
70
71
72
// $Log: SpinDbIO.h,v $
73
// Revision 1.1 2005/09/30 23:47:48 balewski
74
// start
75
//
SpinDbV124IO
Definition:
SpinDbIO.h:34
SpinDbIOBase
Definition:
SpinDbIO.h:7
spinDbBXmask
Definition:
spinDbBXmask.hh:8
spinDbV124
Definition:
spinDbV124.hh:9
spinDbStar
Definition:
spinDbStar.hh:8
SpinDbStarIO
Definition:
SpinDbIO.h:46
SpinDbBXmaskIO
Definition:
SpinDbIO.h:59
data
Definition:
PMD_Reader.hh:62
Generated by
1.8.5