]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MONITOR/alistoragemanager/AliStorageDatabase.h
Bug in storage manager making possible to delete permanent event fixed
[u/mrichter/AliRoot.git] / MONITOR / alistoragemanager / AliStorageDatabase.h
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
12 class AliStorageDatabase
13 {
14 public:
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         bool UpdateEventPath(struct eventStruct event,const char *newPath);
26         void RemoveEvent(struct eventStruct event);
27     void RemoveEventsWithPath(std::string path);
28         std::string GetFilePath(struct eventStruct event);
29         struct eventStruct GetOldestEvent();
30         std::vector<serverListStruct> GetList(struct listRequestStruct listStruct);
31
32         AliESDEvent* GetEvent(struct eventStruct event);
33         AliESDEvent* GetNextEvent(struct eventStruct event);
34         AliESDEvent* GetLastEvent();
35         AliESDEvent* GetPrevEvent(struct eventStruct event);
36         AliESDEvent* GetFirstEvent();
37 private:
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