]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
AliMDC API: new method for auto-saving the raw-data tree. Requested by DAQ in order...
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 Apr 2008 11:40:45 +0000 (11:40 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 Apr 2008 11:40:45 +0000 (11:40 +0000)
RAW/AliMDC.cxx
RAW/AliMDC.h
RAW/AliRawDB.cxx
RAW/AliRawDB.h
RAW/mdc.cxx
RAW/mdc.h

index 40de52917eff96a0c5dffe098c79ff794ff696bb..ac0e3a8e5bd902f900316341384e06e6b8b85229 100644 (file)
@@ -445,6 +445,17 @@ Long64_t AliMDC::Close()
   return filesize;
 }
 
+//______________________________________________________________________________
+Long64_t AliMDC::AutoSave()
+{
+  // Auto-save the raw-data
+  // and esd (if any) trees
+
+  if (!fRawDB) return -1;
+
+  return fRawDB->AutoSave();
+}
+
 //______________________________________________________________________________
 Int_t AliMDC::Run(const char* inputFile, Bool_t loop,
                  EWriteMode mode, Double_t maxFileSize, 
index 00392b3bcd05abc3a9b7ad20a716f92139553c6f..5a776a5bc5874723096fd3da7639f10f29d24662 100644 (file)
@@ -73,6 +73,7 @@ public:
    Int_t      ProcessEvent(void* event, Bool_t isIovecArray = kFALSE);
    Long64_t   GetTotalSize();
    Long64_t   Close();
+   Long64_t   AutoSave();
 
    Int_t      Run(const char* inputFile, Bool_t loop,
                  EWriteMode mode, Double_t maxFileSize, 
index ebeae2e6bddae6d9859ebc3b4126782c60fcf8fb..4da8a7e35b44d4472004a53ed3581245b3b48793 100644 (file)
@@ -412,6 +412,19 @@ Long64_t AliRawDB::GetTotalSize()
   return total;
 }
 
+//______________________________________________________________________________
+Long64_t AliRawDB::AutoSave()
+{
+  // Auto-save the raw-data and
+  // esd (if any) trees
+
+  Long64_t nbytes = fTree->AutoSave();
+
+  if (fESDTree) nbytes += fESDTree->AutoSave();
+
+  return nbytes;
+}
+
 //______________________________________________________________________________
 void AliRawDB::WriteStats(AliStats* stats)
 {
index ceb7063ea6aa08db791c2923d53ddb17dc7515cf..e4bf9ca0714d43defac5317e20f259cd521139c8 100644 (file)
@@ -52,6 +52,7 @@ public:
    virtual Long64_t    Close();
    Int_t               Fill();
    Long64_t            GetTotalSize();
+   Long64_t            AutoSave();
 
    void         WriteStats(AliStats* stats);
 
index 8c7237a41d7d1b1f18897a1428ec5e4d83179cfe..46aa4d1fdf88414732f8ec9d5d72baeb6574c8ac 100644 (file)
@@ -82,3 +82,11 @@ void  alimdcEnableDebug()
   AliLog::SetPrintRepetitions(kFALSE);
   AliLog::SetHandleRootMessages(kTRUE);
 }
+
+long long  alimdcAutoSave(void* alimdc)
+{
+  // Auto-save the raw-data tree
+
+  return ((AliMDC*)alimdc)->AutoSave();
+}
+  
index 5cee1ee6037fd8b76d0a477ba895319178370f7a..872fa4989399b78782c4c7449bb10c4fe9bd000a 100644 (file)
--- a/RAW/mdc.h
+++ b/RAW/mdc.h
@@ -24,6 +24,7 @@ long long  alimdcGetTotalFileSize(void* alimdc);
 long long  alimdcClose(void* alimdc);
 void  alimdcDelete(void* alimdc);
 void  alimdcEnableDebug();
+long long  alimdcAutoSave(void* alimdc);
 
 #ifdef __cplusplus
 }