]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MONITOR/alistoragemanager/AliStorageDatabase.h
1. Fixing memory leaks in alistorage
[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();
a410aca4 33 AliESDEvent* GetPrevEvent(struct eventStruct event);
34 AliESDEvent* GetFirstEvent();
5eb34a26 35private:
36 std::string fHost;
37 std::string fPort;
38 std::string fDatabase;
39 std::string fUID;
40 std::string fPassword;
41 std::string fTable;
42
43 TSQLServer *fServer;
44 std::string fStoragePath;
45
46 AliStorageDatabase(const AliStorageDatabase&);
47 AliStorageDatabase& operator=(const AliStorageDatabase&);
48};
49
50#endif