Merging STORAGE-dev to master
[u/mrichter/AliRoot.git] / MONITOR / alistoragemanager / AliStorageDatabase.h
CommitLineData
5eb34a26 1#ifndef AliStorageDatabase_H
2#define AliStorageDatabase_H
3
4#include "AliStorageTypes.h"
5#include "AliESDEvent.h"
6
7#include <string>
8#include <vector>
9
10#include <TSQLServer.h>
11
12class AliStorageDatabase
13{
14public:
15 AliStorageDatabase();
16 ~AliStorageDatabase();
17
18 void InsertEvent(int runNumber,
19 int eventNumber,
20 char *system,
21 int multiplicity,
22 char *filePath); //more parameters of the event can be added to this method
23
24 bool MarkEvent(struct eventStruct event);
25 void RemoveEvent(struct eventStruct event);
26 std::string GetFilePath(struct eventStruct event);
27 struct eventStruct GetOldestEvent();
28 std::vector<serverListStruct> GetList(struct listRequestStruct listStruct);
29
5eb34a26 30 AliESDEvent* GetEvent(struct eventStruct event);
31 AliESDEvent* GetNextEvent(struct eventStruct event);
32 AliESDEvent* GetLastEvent();
5eb34a26 33private:
34 std::string fHost;
35 std::string fPort;
36 std::string fDatabase;
37 std::string fUID;
38 std::string fPassword;
39 std::string fTable;
40
41 TSQLServer *fServer;
42 std::string fStoragePath;
43
44 AliStorageDatabase(const AliStorageDatabase&);
45 AliStorageDatabase& operator=(const AliStorageDatabase&);
46};
47
48#endif