Fixed bug in AliEveEventManager causing frequent crashes. Fixed bug in Storage Manage...
[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);
6ce16778 25 bool UpdateEventPath(struct eventStruct event,const char *newPath);
5eb34a26 26 void RemoveEvent(struct eventStruct event);
fae81379 27 void RemoveEventsWithPath(std::string path);
5eb34a26 28 std::string GetFilePath(struct eventStruct event);
29 struct eventStruct GetOldestEvent();
30 std::vector<serverListStruct> GetList(struct listRequestStruct listStruct);
31
5eb34a26 32 AliESDEvent* GetEvent(struct eventStruct event);
33 AliESDEvent* GetNextEvent(struct eventStruct event);
34 AliESDEvent* GetLastEvent();
a410aca4 35 AliESDEvent* GetPrevEvent(struct eventStruct event);
36 AliESDEvent* GetFirstEvent();
5eb34a26 37private:
38 std::string fHost;
39 std::string fPort;
40 std::string fDatabase;
41 std::string fUID;
42 std::string fPassword;
43 std::string fTable;
44
45 TSQLServer *fServer;
46 std::string fStoragePath;
47
48 AliStorageDatabase(const AliStorageDatabase&);
49 AliStorageDatabase& operator=(const AliStorageDatabase&);
50};
51
52#endif