1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 //////////////////////////////////////////////////////////////////////////
20 // c interface to AliMDC //
22 //////////////////////////////////////////////////////////////////////////
28 void* alimdcCreate(int compress, int filterMode,
29 double maxSizeTagDB, const char* fileNameTagDB,
30 const char* guidFileFolder,
33 // create an AliMDC object
35 return new AliMDC(compress, kFALSE, AliMDC::EFilterMode(filterMode),
36 maxSizeTagDB, fileNameTagDB,
42 int alimdcOpen(void* alimdc, int mode, const char* fileName)
46 return ((AliMDC*)alimdc)->Open(AliMDC::EWriteMode(mode), fileName);
49 int alimdcProcessEvent(void* alimdc, void* event, int isIovecArray)
53 return ((AliMDC*)alimdc)->ProcessEvent(event, isIovecArray);
56 long long alimdcGetTotalFileSize(void* alimdc)
58 // return the total current file size
60 return ((AliMDC*)alimdc)->GetTotalSize();
63 long long alimdcClose(void* alimdc)
67 return ((AliMDC*)alimdc)->Close();
70 void alimdcDelete(void* alimdc)
72 // delete the AliMDC object
74 delete (AliMDC*)alimdc;
77 void alimdcEnableDebug()
79 // enable debug and log messages
81 AliLog::EnableDebug(kTRUE);
82 AliLog::SetGlobalLogLevel(AliLog::kMaxType);
83 AliLog::SetGlobalDebugLevel(AliLog::kMaxType);
84 AliLog::SetPrintRepetitions(kFALSE);
85 AliLog::SetHandleRootMessages(kTRUE);
88 long long alimdcAutoSave(void* alimdc)
90 // Auto-save the raw-data tree
92 return ((AliMDC*)alimdc)->AutoSave();