]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RAW/mdc.cxx
Avoid warnings on Mac
[u/mrichter/AliRoot.git] / RAW / mdc.cxx
CommitLineData
e10815f1 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/* $Id$ */
17
18//////////////////////////////////////////////////////////////////////////
19// //
20// c interface to AliMDC //
21// //
22//////////////////////////////////////////////////////////////////////////
23
24#include "mdc.h"
25#include "AliMDC.h"
f2cc4e98 26#include "AliLog.h"
e10815f1 27
28void* alimdcCreate(int compress, int filterMode,
29 const char* localRunDB, int rdbmsRunDB,
30 const char* alienHostRunDB, const char* alienDirRunDB,
31 double maxSizeTagDB, const char* fileNameTagDB)
32{
33// create an AliMDC object
34
35 return new AliMDC(compress, kFALSE, AliMDC::EFilterMode(filterMode),
36 localRunDB, rdbmsRunDB, alienHostRunDB, alienDirRunDB,
37 maxSizeTagDB, fileNameTagDB);
38
39}
40
41int alimdcOpen(void* alimdc, int mode, const char* fileName)
42{
43// open a new raw DB
44
45 return ((AliMDC*)alimdc)->Open(AliMDC::EWriteMode(mode), fileName);
46}
47
48int alimdcProcessEvent(void* alimdc, void* event, int isIovecArray)
49{
50// process one event
51
52 return ((AliMDC*)alimdc)->ProcessEvent(event, isIovecArray);
53}
54
d21e9888 55int alimdcGetTotalFileSize(void* alimdc)
56{
57// return the total current file size
58
59 return ((AliMDC*)alimdc)->GetTotalSize();
60}
61
e10815f1 62int alimdcClose(void* alimdc)
63{
64// close the raw DB
65
66 return ((AliMDC*)alimdc)->Close();
67}
68
69void alimdcDelete(void* alimdc)
70{
71// delete the AliMDC object
72
73 delete (AliMDC*)alimdc;
74}
f2cc4e98 75
76void alimdcEnableDebug()
77{
78// enable debug and log messages
79
80 AliLog::EnableDebug(kTRUE);
81 AliLog::SetGlobalLogLevel(AliLog::kMaxType);
82 AliLog::SetGlobalDebugLevel(AliLog::kMaxType);
83 AliLog::SetPrintRepetitions(kFALSE);
f07ec911 84 AliLog::SetHandleRootMessages(kTRUE);
f2cc4e98 85}