9e009b3d3d2baa06c593065ccf972de2b3bb50d3
[u/mrichter/AliRoot.git] / MONITOR / alistoragemanager / AliStorageTypes.h
1 #ifndef AliStorageTypes_H
2 #define AliStorageTypes_H
3
4 #include <TSystem.h>
5
6 inline const char* GetConfigFilePath(){
7         return Form("%s/MONITOR/alistoragemanager/setupStorageDatabase.sh",gSystem->Getenv("ALICE_ROOT"));
8 }
9
10 enum storageSockets{
11         SERVER_COMMUNICATION_REQ=0,
12         SERVER_COMMUNICATION_REP,
13         CLIENT_COMMUNICATION_REQ,
14         CLIENT_COMMUNICATION_REP,
15         EVENTS_SERVER_PUB,
16         EVENTS_SERVER_SUB,
17         XML_PUB,
18         NUMBER_OF_SOCKETS
19 };
20         
21 enum statusType{
22         STATUS_WAITING=1,
23         STATUS_OK,
24         STATUS_ERROR,
25         STATUS_DOWN
26 };
27
28 enum requestType{
29         REQUEST_CONNECTION=1,
30         REQUEST_RECEIVING,
31         REQUEST_SAVING,
32         REQUEST_CURRENT_SIZE,
33         REQUEST_LIST_EVENTS,
34         REQUEST_GET_EVENT,
35         REQUEST_GET_NEXT_EVENT,
36         REQUEST_GET_PREV_EVENT,
37         REQUEST_GET_LAST_EVENT,
38         REQUEST_GET_FIRST_EVENT,
39         REQUEST_MARK_EVENT,
40         REQUEST_SET_PARAMS,
41         REQUEST_GET_PARAMS
42 };
43
44 struct clientRequestStruct{
45         int messageType;
46         int maxStorageSize;
47         int maxOccupation;
48         int removeEvents;
49         int eventsInChunk;
50 };
51
52 struct eventStruct{
53         int runNumber;
54         int eventNumber;
55 };
56
57 struct listRequestStruct{
58         int runNumber[2];
59         int eventNumber[2];
60         int marked[2];
61         int multiplicity[2];
62         char system[2][20];
63 };
64
65 struct serverRequestStruct{
66         int messageType;
67         struct eventStruct event;
68         struct listRequestStruct list;
69 };
70
71 typedef struct serverListStruct{
72         int runNumber;
73         int eventNumber;
74         char system[20];
75         int multiplicity;
76         int marked;
77 }serverListStruct;
78
79 #endif