--- /dev/null
+#-*- Mode: Makefile -*-
+
+include HLT/hlt.conf
+
+EDEFINE := ${HLTDEFS}
+PACKCXXFLAGS := ${HLTCXXFLAGS}
+PACKCFLAGS := ${HLTCLFAGS}
+PACKDCXXFLAGS:= ${HLTDCXXFLAGS}
+
+SRCS:=deroot.cxx
+
+EINCLUDE+= TPC ITS RAW HLT/src HLT/hough HLT/comp HLT/ITS
+
+PACKBLIBS := $(ROOTCLIBS) $(SYSLIBS)
+
+ifdef DATE_ROOT
+
+SRCS += root2date.cxx
+PACKBLIBS += $(shell date-config --monitorlibs)
+ELIBSDIR:=
+ELIBS:=ESD AOD CDB STEER RAWDatabase RAWDatarec RAWDatasim TPCbase TPCsim TPCrec HLTbase AliHLTSrc AliHLTMisc AliHLTHough AliHLTComp AliHLTITS AliHLTMUON ITSbase ITSsim ITSrec MUONsim MUONrec MUONbase MUONgeometry MUONraw MUONcalib MUONmapping
+EINCLUDE+= ${DATE_COMMON_DEFS} ${DATE_MONITOR_DIR}
+
+endif
+
+ifneq (,$(findstring macosx,$(ALICE_TARGET)))
+PACKLDFLAGS:=$(LDFLAGS) $(ELIBS:%=-Wl,-u,_G__cpp_setupG__%)
+endif
--- /dev/null
+// Author: Filimon Roukoutakis 02/08/2006
+
+/******************************************************************************
+ MOOD - Monitor Of On-line Data and Detector Debugger for ALICE Experiment
+******************************************************************************/
+
+#include <TError.h>
+#include <TSysEvtHandler.h>
+#ifdef ALI_DATE
+#include "deroot.h"
+
+int deroot(const char *rootFileName, const char *dateFileName);
+
+int deroot(const char *rootFileName, const char *dateFileName) {
+
+ unsigned char *dateEvent=new unsigned char [100000000];
+
+ FILE *dateFile;
+ size_t gdcCounter, gdcSize;
+ TFile rootFile(rootFileName);
+ TTree *t=(TTree *)rootFile.Get("RAW");
+ if(!t) {
+ cerr << "Error getting RAW tree" << endl;
+ return(1);
+ }
+ AliRawEvent *rootEvent=NULL;
+
+ t->SetBranchAddress("rawevent", &rootEvent);
+
+ if(!(dateFile=fopen(dateFileName, "wb"))) {
+ cerr << "Error opening DATE file" << endl;
+ return(1);
+ }
+
+ for(gdcCounter=0; gdcCounter<t->GetEntries(); gdcCounter++) {
+ rootEvent=new AliRawEvent;
+ t->GetEntry(gdcCounter);
+ gdcSize=Root2Date(rootEvent, dateEvent);
+ delete rootEvent;
+ cerr << "\r \r" << setprecision(3) << 100*(float)(gdcCounter+1)/t->GetEntries() << "% ";
+ fwrite(dateEvent, gdcSize, 1, dateFile);
+ }
+
+ // Cleanup resources
+
+ cerr << "\r \r";
+ cerr.flush();
+ delete t;
+ rootFile.Close();
+ fclose(dateFile);
+ delete [] dateEvent;
+
+ return(0);
+
+}
+
+int main(int argc, char **argv) {
+
+ if (argc != 3) {
+ cerr << "Usage: deroot <input_root_file> <output_date_file>" << endl;
+ return 1;
+ }
+
+ deroot(argv[1], argv[2]);
+
+ return(0);
+
+}
+
+#else
+int main(int /*argc*/, char** /*argv*/)
+{
+ ::Fatal("main", "this program was compiled without DATE");
+
+ return 1;
+}
+#endif
--- /dev/null
+// Author: Filimon Roukoutakis 02/08/2006
+
+/******************************************************************************
+ MOOD - Monitor Of On-line Data and Detector Debugger for ALICE Experiment
+******************************************************************************/
+
+#ifndef DEROOT_H
+#define DEROOT_H
+
+#include "root2date.h"
+#include "TFile.h"
+#include "TTree.h"
+
+#endif
--- /dev/null
+// Author: Filimon Roukoutakis 02/08/2006
+// Cvetan Cheshkov
+
+/******************************************************************************
+ MOOD - Monitor Of On-line Data and Detector Debugger for ALICE Experiment
+******************************************************************************/
+
+#include "root2date.h"
+
+int Root2Date(AliRawEvent *gdcRootEvent, unsigned char *gdcDateEvent) {
+
+ unsigned char *p=gdcDateEvent;
+ int ldcCounter, equipmentCounter, chunkSize;
+ AliRawEquipment *aliEquipment=NULL;
+ AliRawEquipmentHeader *aliEquipmentHeader=NULL;
+ AliRawEventHeaderBase *aliHeader=NULL;
+ AliRawEvent *ldcRootEvent=NULL;
+
+ aliHeader=gdcRootEvent->GetHeader();
+ memcpy(p, aliHeader->HeaderBaseBegin(), chunkSize=aliHeader->HeaderBaseSize());
+ p+=chunkSize;
+ memcpy(p, aliHeader->HeaderBegin(), chunkSize=aliHeader->HeaderSize()); // Write DATE GDC header
+ p+=chunkSize;
+ for(ldcCounter=0; ldcCounter<gdcRootEvent->GetNSubEvents(); ldcCounter++) {
+ ldcRootEvent=gdcRootEvent->GetSubEvent(ldcCounter);
+ aliHeader=ldcRootEvent->GetHeader();
+ memcpy(p, aliHeader->HeaderBaseBegin(), chunkSize=aliHeader->HeaderBaseSize());
+ p+=chunkSize;
+ memcpy(p, aliHeader->HeaderBegin(), chunkSize=aliHeader->HeaderSize()); // Write DATE LDC header
+ p+=chunkSize;
+ for(equipmentCounter=0; equipmentCounter<ldcRootEvent->GetNEquipments(); equipmentCounter++) {
+ aliEquipment=ldcRootEvent->GetEquipment(equipmentCounter);
+ aliEquipmentHeader=aliEquipment->GetEquipmentHeader();
+ if(aliEquipmentHeader->GetEquipmentSize()) {
+ memcpy(p, aliEquipmentHeader->HeaderBegin(), chunkSize=aliEquipmentHeader->HeaderSize()); // Write DATE Equipment header
+ p+=chunkSize;
+ }
+ memcpy(p, aliEquipment->GetRawData()->GetBuffer(), chunkSize=aliEquipment->GetRawData()->GetSize()); // Write Equipment payload (including CDH)
+ p+=chunkSize;
+ }
+ }
+
+ return(p-gdcDateEvent);
+
+}
--- /dev/null
+// Author: Filimon Roukoutakis 02/08/2006
+
+/******************************************************************************
+ MOOD - Monitor Of On-line Data and Detector Debugger for ALICE Experiment
+******************************************************************************/
+
+#ifndef ROOT2DATE_H
+#define ROOT2DATE_H
+
+#include "AliRawData.h"
+#include "AliRawEvent.h"
+#include "AliRawEventHeaderBase.h"
+#include "AliRawEquipment.h"
+#include "AliRawEquipmentHeader.h"
+#include "AliRawReaderRoot.h"
+#include "event.h"
+
+#include <Riostream.h>
+
+int Root2Date(AliRawEvent *gdcRootEvent, unsigned char *gdcDateEvent);
+
+#endif
JETAN/module.mk: JETAN/libJETAN.pkg
MEVSIM/module.mk: MEVSIM/libmevsim.pkg
MICROCERN/module.mk: MICROCERN/libmicrocern.pkg
-MONITOR/module.mk: MONITOR/libMONITOR.pkg MONITOR/binmonitorGDC.pkg MONITOR/binmonitorCheck.pkg
+MONITOR/module.mk: MONITOR/libMONITOR.pkg MONITOR/binmonitorGDC.pkg MONITOR/binmonitorCheck.pkg MONITOR/binderoot.pkg
MUON/module.mk: MUON/libMUONrec.pkg MUON/libMUONsim.pkg MUON/libMUONbase.pkg MUON/libMUONraw.pkg MUON/libMUONmapping.pkg MUON/libMUONshuttle.pkg
LHC/module.mk: LHC/libLHC.pkg
LHAPDF/module.mk: LHAPDF/liblhapdf.pkg