AliHLTPHOSTreeMakerComponent::Write()
{
cout << "Writing file...";
- char filename [50];
+ char filename [256];
sprintf(filename, "%s/run%d_digitTree_%d.root", fDirectory, fRunNb,(fEventCount/fWriteInterval - 1));
TFile *outfile = new TFile(filename,"recreate");
fDigitTreePtr->Write();
--- /dev/null
+include Makefile.arch
+
+
+MAINO = baselineAna.$(ObjSuf)
+
+MAINS = baselineAna.$(SrcSuf)
+
+MAIN = baselineAna$(ExeSuf)
+
+
+OBJS = $(MAINO)
+PROGRAMS = $(MAIN)
+
+
+.SUFFIXES: .$(SrcSuf) .$(ObjSuf) .$(DllSuf)
+
+all: $(PROGRAMS)
+
+
+$(MAIN): $(MAINO)
+ $(LD) $(LDFLAGS) $^ $(LIBS) $(GLIBS) $(ALILIBS) -lTreePlayer -lMathCore -lThread -lpthread $(HLTLIBS) -lHLTbase -lAliHLTUtil -lAliHLTPHOS $(OutPutOpt)$(MAIN)
+ @echo "$@ done"
+# $(LD) $(LDFLAGS) $^ $(LIBS) $(GLIBS) -lTreePlayer -lMathCore -lThread -lpthread $(OutPutOpt)$(MAIN)
+
+
+
+clean:
+ @rm -f $(OBJS) core
+
+distclean: clean
+ @rm -f $(PROGRAMS) *Dict.* *.def *.exp \
+ *.root *.ps *.so *.lib *.dll *.d .def so_locations
+ @rm -rf cxx_repository
+
+.SUFFIXES: .$(SrcSuf)
+
+
+.$(SrcSuf).$(ObjSuf):
+ $(CXX) $(CXXFLAGS) -c $<
--- /dev/null
+# -*- mode: makefile -*-
+#
+# Makefile containing platform dependencies for ROOT based projects.
+#
+# Copyright (c) 2000 Rene Brun and Fons Rademakers
+#
+# Author: Fons Rademakers, 29/2/2000
+
+ROOTCONFIG := root-config
+
+ARCH := $(shell $(ROOTCONFIG) --arch)
+PLATFORM := $(shell $(ROOTCONFIG) --platform)
+
+CXX =
+ObjSuf = o
+SrcSuf = cxx
+ExeSuf =
+DllSuf = so
+OutPutOpt = -o # keep whitespace after "-o"
+
+ROOTCFLAGS := $(shell $(ROOTCONFIG) --cflags)
+ROOTLDFLAGS := $(shell $(ROOTCONFIG) --ldflags)
+ROOTLIBS := $(shell $(ROOTCONFIG) --libs)
+ROOTGLIBS := $(shell $(ROOTCONFIG) --glibs)
+HASTHREAD := $(shell $(ROOTCONFIG) --has-thread)
+
+ifeq ($(ARCH),linux)
+# Linux with egcs, gcc 2.9x, gcc 3.x (>= RedHat 5.2)
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+#CXXFLAGS = -Wall -fPIC -g
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),hpuxacc)
+# HP-UX 10.x with aCC
+CXX = aCC
+CXXFLAGS = -O +Z
+LD = aCC
+LDFLAGS = -O -z
+SOFLAGS = -b
+endif
+
+ifeq ($(ARCH),hpuxia64acc)
+# HP-UX 11i 1.5 (IA-64) with aCC
+CXX = aCC
+CXXFLAGS = +DD64 -O +Z
+LD = aCC
+LDFLAGS = +DD64 -O -z
+SOFLAGS = -b
+endif
+
+ifeq ($(ARCH),hpuxgcc)
+# HP-UX 10.x with g++
+CXXFLAGS = -O -fPIC
+CXX = g++
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -fPIC -shared
+endif
+
+ifeq ($(ARCH),hurddeb)
+# GNU/Hurd
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),aix)
+# IBM AIX xlC 4.x
+CXX = xlC
+CXXFLAGS = -O
+LD = xlC
+LDFLAGS = -O
+SOFLAGS =
+DllSuf = a
+endif
+
+ifeq ($(ARCH),aix5)
+# IBM AIX xlC 5.x
+CXX = xlC
+CXXFLAGS = -O
+LD = xlC
+LDFLAGS = -O
+SOFLAGS =
+DllSuf = a
+endif
+
+ifeq ($(ARCH),aixgcc)
+# IBM AIX with GCC
+CXX = g++
+CXXFLAGS = -O
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+DllSuf = a
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),solaris)
+# Solaris CC
+CXX = /opt/SUNWspro/bin/CC
+CXXFLAGS = -O -KPIC
+LD = /opt/SUNWspro/bin/CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),solarisCC5)
+# Solaris CC 5.0
+CXX = CC
+CXXFLAGS = -O -KPIC
+LD = CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),solarisgcc)
+# Solaris gcc
+CXX = g++
+CXXFLAGS = -O -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),solariskcc)
+# Solaris kcc
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O4 -KPIC
+LD = KCC
+LDFLAGS = -O4
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),solarisx86)
+# Solaris CC on Intel
+CXX = CC
+CXXFLAGS = -O -KPIC
+LD = CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),sgicc)
+# SGI
+CXX = CC -n32 -I/usr/include/CC.sgi
+CXXFLAGS = -O
+LD = CC -n32 -LANG:std -I/usr/include/CC.sgi
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgicc64)
+# SGI
+CXX = CC -64 -I/usr/include/CC.sgi
+CXXFLAGS = -O
+LD = CC -64 -LANG:std -I/usr/include/CC.sgi
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgigcc)
+# SGI 6.x with gcc
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O -Wl,-u,__builtin_new -Wl,-u,__builtin_delete -Wl,-u,__nw__FUiPv
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgin32gcc)
+# SGI 6.x with gcc for n32 ABI
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O -L/usr/lib32 -Wl,-woff,134 -lgen
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgikcc)
+# SGI with KCC
+CXX = KCC -n32 --one_instantiation_per_object
+CXXFLAGS = -O
+LD = KCC -n32
+LDFLAGS = -O
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),alphagcc)
+# Alpha/OSF with gcc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -Wl,-expect_unresolved,* -shared
+endif
+
+ifeq ($(ARCH),alphakcc)
+# Alpha/OSF with kai compiler (not yet valid)
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O -fPIC
+LD = KCC
+LDFLAGS = -O
+SOFLAGS = -Wl,-expect_unresolved,* -shared
+endif
+
+ifeq ($(ARCH),alphacxx6)
+# Alpha/OSF with cxx6
+CXX = cxx
+CXXFLAGS = -O
+LD = cxx
+LDFLAGS = -O
+SOFLAGS = -shared -nocxxstd -Wl,-expect_unresolved,*,-msym
+endif
+
+ifeq ($(ARCH),linuxrh51)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxrh42)
+# Linux with gcc 2.7.2.x (RedHat 4.2)
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxdeb)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O1 -Wall -fPIC
+LD = g++
+LDFLAGS = -O1
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxdeb2ppc)
+# Debian/Linux on the PowerPC
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxsuse6)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxkcc)
+# Linux with the KAI compiler
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O -fPIC +K0
+LD = KCC
+LDFLAGS = -O $(shell $(ROOTCONFIG) --cflags)
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),linuxicc)
+# Linux with Intel icc compiler
+ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f1)
+ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+ifeq ($(ICC_MAJOR),8)
+ifneq ($(ICC_MINOR),0)
+CXXFLAGS += -wd1572
+endif
+endif
+endif
+
+ifeq ($(ARCH),linuxppcgcc)
+# MkLinux with gcc and glibc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64gcc)
+# Itanium Linux with gcc 2.9x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64sgi)
+# Itanium Linux with sgiCC
+CXX = sgiCC
+CXXFLAGS = -O -Wall -fPIC
+LD = gsgiCC
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64ecc)
+# Itanium Linux with Intel icc (was ecc)
+ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f1)
+ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+ifeq ($(ICC_MAJOR),8)
+ifneq ($(ICC_MINOR),0)
+CXXFLAGS += -wd1572
+endif
+endif
+endif
+
+ifeq ($(ARCH),linuxx8664gcc)
+# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxppc64gcc)
+# PPC64 Linux with gcc 3.x
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxx8664icc)
+# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476 -wd1572
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxalphagcc)
+# Alpha Linux with gcc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxarm)
+# ARM Linux with egcs
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),mklinux)
+# MkLinux with libc5
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),freebsd)
+# FreeBSD with libc5
+CXX = g++
+CXXFLAGS = -O -pipe -W -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),freebsd4)
+# FreeBSD with glibc
+CXXFLAGS += -W -Wall -fPIC
+LD = $(CXX)
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),freebsd5)
+# FreeBSD with glibc
+CXXFLAGS += -W -Wall -fPIC
+LD = $(CXX)
+endif
+
+ifeq ($(ARCH),openbsd)
+# OpenBSD with libc
+CXX = g++
+CXXFLAGS = -O -pipe -W -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),macosx)
+# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = c++
+CXXFLAGS = -O2 -pipe -Wall -W -Woverloaded-virtual
+LDFLAGS = -O2 -bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
+else
+ifeq ($(MACOSX_MINOR),3)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.3 c++
+else
+UNDEFOPT = suppress
+LD = c++
+endif
+endif
+SOFLAGS = -dynamiclib -single_module -undefined $(UNDEFOPT)
+endif
+
+ifeq ($(ARCH),macosxicc)
+# MacOS X with Intel icc compiler
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LDFLAGS = -O
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 icpc
+endif
+SOFLAGS = -dynamiclib -single_module -Xlinker -undefined dynamic_lookup
+endif
+
+ifeq ($(ARCH),macosx64)
+# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
+# Only specific option (-m64) comes from root-config
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = c++
+CXXFLAGS = -O2 -pipe -Wall -W -Woverloaded-virtual
+LDFLAGS = -O2 -bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
+SOFLAGS = -dynamiclib -single_module -undefined dynamic_lookup
+endif
+
+ifeq ($(ARCH),macosxxlc)
+# MacOS X with IBM xlC compiler
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = xlC
+CXXFLAGS = -O
+LDFLAGS = -O -Wl,-bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 xlC
+else
+ifeq ($(MACOSX_MINOR),3)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.3 xlC
+else
+UNDEFOPT = suppress
+LD = xlC
+endif
+endif
+SOFLAGS = -qmkshrobj -single_module -undefined $(UNDEFOPT)
+endif
+
+ifeq ($(ARCH),win32)
+# Windows with the VC++ compiler
+VC_MAJOR := $(shell unset VS_UNICODE_OUTPUT; cl.exe 2>&1 | awk '{ if (NR==1) print $$8 }' | \
+ cut -d'.' -f1)
+ObjSuf = obj
+SrcSuf = cxx
+ExeSuf = .exe
+DllSuf = dll
+OutPutOpt = -out:
+CXX = cl
+CXXOPT = -O2
+#CXXOPT = -Z7
+CXXFLAGS = $(CXXOPT) -nologo -I$(shell $(ROOTCONFIG) --incdir) -FIw32pragma.h
+LD = link
+LDOPT = -opt:ref
+#LDOPT = -debug
+LDFLAGS = $(LDOPT) -pdb:none -nologo
+SOFLAGS = -DLL
+
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),win32old)
+# Windows with the VC++ compiler
+ObjSuf = obj
+SrcSuf = cxx
+ExeSuf = .exe
+DllSuf = dll
+OutPutOpt = -out:
+CXX = cl
+CXXOPT = -O2
+#CXXOPT = -Z7
+CXXFLAGS = $(CXXOPT) -G5 -GR -GX -MD -DWIN32 -D_WINDOWS -nologo \
+ -DVISUAL_CPLUSPLUS -D_X86_=1 -D_DLL
+LD = link
+LDOPT = -opt:ref
+#LDOPT = -debug
+LDFLAGS = $(LDOPT) -pdb:none -nologo
+SOFLAGS = -DLL
+
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),win32gcc)
+# Windows with gcc
+DllSuf = dll
+ExeSuf = .exe
+CXX = g++
+CXXFLAGS = -O -pipe -Wall -Woverloaded-virtual -I/usr/X11R6/include
+LD = g++
+LDFLAGS = -O -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc \
+ -L/usr/X11R6/lib
+SOFLAGS = -shared -D_DLL -Wl,--export-all-symbols
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(CXX),)
+$(error $(ARCH) invalid architecture)
+endif
+
+#CXXFLAGS += $(ROOTCFLAGS) -I/home/odjuvsla/Workspace/alice/AliRootDev/RAW -I/home/odjuvsla/Workspace/alice/AliRootDev/include
+CXXFLAGS += $(ROOTCFLAGS) -I$(ALICE_ROOT)/RAW -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/PHOS -I$(ALIHLT_BASEDIR)/PHOS -I$(ALIHLT_BASEDIR)/BASE
+LDFLAGS += $(ROOTLDFLAGS)
+LIBS = $(ROOTLIBS) $(SYSLIBS)
+GLIBS = $(ROOTGLIBS) $(SYSLIBS)
+ROOTLIBS = -L$(ROOTSYS)/lib -lXMLIO -lMinuit -lGeom -lVMC -lEG
+ALILIBS = -L$(ALICE_ROOT)/lib/tgt_linux
+HLTLIBS = -L$(ALIHLT_LIBDIR)
+#ALILIBS = -L/home/odjuvsla/Workspace/alice/AliRootDev/lib/tgt_linux -lESD -lCDB
+
+GLIBS = $(ROOTGLIBS) $(SYSLIBS)
--- /dev/null
+
+#include "TTree.h"
+#include "TChain.h"
+#include "TClonesArray.h"
+#include "AliHLTPHOSBaseline.h"
+#include <iostream>
+#include "TH1F.h"
+#include "TFile.h"
+
+using namespace std;
+
+Int_t baselineAna(const char*);
+
+int main(int argc, const char** argv)
+{
+ baselineAna(argv[1]);
+ return 0;
+}
+
+Int_t baselineAna(const char* runNb)
+{
+ char filepath [50];
+ char outfile [50];
+
+ bool finished = false;
+
+ TChain *tree= new TChain("baselineTree");
+
+ sprintf(filepath, "/tmp/phoshlt/analysis/data/baselines/run%s/*", runNb);
+ sprintf(outfile, "/home/phoshlt/analysis/output/run%s/baselines.root", runNb);
+ tree->Add(filepath);
+
+ TClonesArray *baselineArray = new TClonesArray("AliHLTPHOSBaseline" , 100);
+ tree->SetBranchAddress("Baselines", &baselineArray);
+ TH1F *baselineHist = new TH1F("baselineHist", "Baselines", 100, 0, 99);
+ AliHLTPHOSBaseline *baseline = 0;
+
+ cout << endl << "Tree with " << tree->GetEntries() << " events...\n";
+ for(int k = 0; k < tree->GetEntries(); k++)
+ {
+ tree->GetEntry(k);
+ for(int j = 0; j < baselineArray->GetEntriesFast(); j++)
+ {
+ baseline = (AliHLTPHOSBaseline*)baselineArray->At(j);
+ baselineHist->Fill(baseline->GetBaseline());
+ }
+ }
+
+
+ cout << "Printing file...";
+
+
+ TFile *file = new TFile(outfile,"recreate");
+ baselineHist->Write();
+ file->Close();
+ delete file;
+ file = 0;
+ cout << "Done!\n";
+
+ return 0;
+}
+
+
--- /dev/null
+include Makefile.arch
+
+
+MAINO = crazyness.$(ObjSuf)
+
+MAINS = crazyness.$(SrcSuf)
+
+MAIN = crazyness$(ExeSuf)
+
+
+OBJS = $(MAINO)
+PROGRAMS = $(MAIN)
+
+
+.SUFFIXES: .$(SrcSuf) .$(ObjSuf) .$(DllSuf)
+
+all: $(PROGRAMS)
+
+
+$(MAIN): $(MAINO)
+ $(LD) $(LDFLAGS) $^ $(LIBS) $(GLIBS) $(ALILIBS) -lTreePlayer -lMathCore -lThread -lpthread $(HLTLIBS) -lHLTbase -lAliHLTUtil -lAliHLTPHOS $(OutPutOpt)$(MAIN)
+ @echo "$@ done"
+# $(LD) $(LDFLAGS) $^ $(LIBS) $(GLIBS) -lTreePlayer -lMathCore -lThread -lpthread $(OutPutOpt)$(MAIN)
+
+
+
+clean:
+ @rm -f $(OBJS) core
+
+distclean: clean
+ @rm -f $(PROGRAMS) *Dict.* *.def *.exp \
+ *.root *.ps *.so *.lib *.dll *.d .def so_locations
+ @rm -rf cxx_repository
+
+.SUFFIXES: .$(SrcSuf)
+
+
+.$(SrcSuf).$(ObjSuf):
+ $(CXX) $(CXXFLAGS) -c $<
--- /dev/null
+# -*- mode: makefile -*-
+#
+# Makefile containing platform dependencies for ROOT based projects.
+#
+# Copyright (c) 2000 Rene Brun and Fons Rademakers
+#
+# Author: Fons Rademakers, 29/2/2000
+
+ROOTCONFIG := root-config
+
+ARCH := $(shell $(ROOTCONFIG) --arch)
+PLATFORM := $(shell $(ROOTCONFIG) --platform)
+
+CXX =
+ObjSuf = o
+SrcSuf = cxx
+ExeSuf =
+DllSuf = so
+OutPutOpt = -o # keep whitespace after "-o"
+
+ROOTCFLAGS := $(shell $(ROOTCONFIG) --cflags)
+ROOTLDFLAGS := $(shell $(ROOTCONFIG) --ldflags)
+ROOTLIBS := $(shell $(ROOTCONFIG) --libs)
+ROOTGLIBS := $(shell $(ROOTCONFIG) --glibs)
+HASTHREAD := $(shell $(ROOTCONFIG) --has-thread)
+
+ifeq ($(ARCH),linux)
+# Linux with egcs, gcc 2.9x, gcc 3.x (>= RedHat 5.2)
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+#CXXFLAGS = -Wall -fPIC -g
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),hpuxacc)
+# HP-UX 10.x with aCC
+CXX = aCC
+CXXFLAGS = -O +Z
+LD = aCC
+LDFLAGS = -O -z
+SOFLAGS = -b
+endif
+
+ifeq ($(ARCH),hpuxia64acc)
+# HP-UX 11i 1.5 (IA-64) with aCC
+CXX = aCC
+CXXFLAGS = +DD64 -O +Z
+LD = aCC
+LDFLAGS = +DD64 -O -z
+SOFLAGS = -b
+endif
+
+ifeq ($(ARCH),hpuxgcc)
+# HP-UX 10.x with g++
+CXXFLAGS = -O -fPIC
+CXX = g++
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -fPIC -shared
+endif
+
+ifeq ($(ARCH),hurddeb)
+# GNU/Hurd
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),aix)
+# IBM AIX xlC 4.x
+CXX = xlC
+CXXFLAGS = -O
+LD = xlC
+LDFLAGS = -O
+SOFLAGS =
+DllSuf = a
+endif
+
+ifeq ($(ARCH),aix5)
+# IBM AIX xlC 5.x
+CXX = xlC
+CXXFLAGS = -O
+LD = xlC
+LDFLAGS = -O
+SOFLAGS =
+DllSuf = a
+endif
+
+ifeq ($(ARCH),aixgcc)
+# IBM AIX with GCC
+CXX = g++
+CXXFLAGS = -O
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+DllSuf = a
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),solaris)
+# Solaris CC
+CXX = /opt/SUNWspro/bin/CC
+CXXFLAGS = -O -KPIC
+LD = /opt/SUNWspro/bin/CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),solarisCC5)
+# Solaris CC 5.0
+CXX = CC
+CXXFLAGS = -O -KPIC
+LD = CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),solarisgcc)
+# Solaris gcc
+CXX = g++
+CXXFLAGS = -O -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),solariskcc)
+# Solaris kcc
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O4 -KPIC
+LD = KCC
+LDFLAGS = -O4
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),solarisx86)
+# Solaris CC on Intel
+CXX = CC
+CXXFLAGS = -O -KPIC
+LD = CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),sgicc)
+# SGI
+CXX = CC -n32 -I/usr/include/CC.sgi
+CXXFLAGS = -O
+LD = CC -n32 -LANG:std -I/usr/include/CC.sgi
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgicc64)
+# SGI
+CXX = CC -64 -I/usr/include/CC.sgi
+CXXFLAGS = -O
+LD = CC -64 -LANG:std -I/usr/include/CC.sgi
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgigcc)
+# SGI 6.x with gcc
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O -Wl,-u,__builtin_new -Wl,-u,__builtin_delete -Wl,-u,__nw__FUiPv
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgin32gcc)
+# SGI 6.x with gcc for n32 ABI
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O -L/usr/lib32 -Wl,-woff,134 -lgen
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgikcc)
+# SGI with KCC
+CXX = KCC -n32 --one_instantiation_per_object
+CXXFLAGS = -O
+LD = KCC -n32
+LDFLAGS = -O
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),alphagcc)
+# Alpha/OSF with gcc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -Wl,-expect_unresolved,* -shared
+endif
+
+ifeq ($(ARCH),alphakcc)
+# Alpha/OSF with kai compiler (not yet valid)
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O -fPIC
+LD = KCC
+LDFLAGS = -O
+SOFLAGS = -Wl,-expect_unresolved,* -shared
+endif
+
+ifeq ($(ARCH),alphacxx6)
+# Alpha/OSF with cxx6
+CXX = cxx
+CXXFLAGS = -O
+LD = cxx
+LDFLAGS = -O
+SOFLAGS = -shared -nocxxstd -Wl,-expect_unresolved,*,-msym
+endif
+
+ifeq ($(ARCH),linuxrh51)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxrh42)
+# Linux with gcc 2.7.2.x (RedHat 4.2)
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxdeb)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O1 -Wall -fPIC
+LD = g++
+LDFLAGS = -O1
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxdeb2ppc)
+# Debian/Linux on the PowerPC
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxsuse6)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxkcc)
+# Linux with the KAI compiler
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O -fPIC +K0
+LD = KCC
+LDFLAGS = -O $(shell $(ROOTCONFIG) --cflags)
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),linuxicc)
+# Linux with Intel icc compiler
+ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f1)
+ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+ifeq ($(ICC_MAJOR),8)
+ifneq ($(ICC_MINOR),0)
+CXXFLAGS += -wd1572
+endif
+endif
+endif
+
+ifeq ($(ARCH),linuxppcgcc)
+# MkLinux with gcc and glibc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64gcc)
+# Itanium Linux with gcc 2.9x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64sgi)
+# Itanium Linux with sgiCC
+CXX = sgiCC
+CXXFLAGS = -O -Wall -fPIC
+LD = gsgiCC
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64ecc)
+# Itanium Linux with Intel icc (was ecc)
+ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f1)
+ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+ifeq ($(ICC_MAJOR),8)
+ifneq ($(ICC_MINOR),0)
+CXXFLAGS += -wd1572
+endif
+endif
+endif
+
+ifeq ($(ARCH),linuxx8664gcc)
+# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxppc64gcc)
+# PPC64 Linux with gcc 3.x
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxx8664icc)
+# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476 -wd1572
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxalphagcc)
+# Alpha Linux with gcc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxarm)
+# ARM Linux with egcs
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),mklinux)
+# MkLinux with libc5
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),freebsd)
+# FreeBSD with libc5
+CXX = g++
+CXXFLAGS = -O -pipe -W -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),freebsd4)
+# FreeBSD with glibc
+CXXFLAGS += -W -Wall -fPIC
+LD = $(CXX)
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),freebsd5)
+# FreeBSD with glibc
+CXXFLAGS += -W -Wall -fPIC
+LD = $(CXX)
+endif
+
+ifeq ($(ARCH),openbsd)
+# OpenBSD with libc
+CXX = g++
+CXXFLAGS = -O -pipe -W -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),macosx)
+# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = c++
+CXXFLAGS = -O2 -pipe -Wall -W -Woverloaded-virtual
+LDFLAGS = -O2 -bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
+else
+ifeq ($(MACOSX_MINOR),3)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.3 c++
+else
+UNDEFOPT = suppress
+LD = c++
+endif
+endif
+SOFLAGS = -dynamiclib -single_module -undefined $(UNDEFOPT)
+endif
+
+ifeq ($(ARCH),macosxicc)
+# MacOS X with Intel icc compiler
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LDFLAGS = -O
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 icpc
+endif
+SOFLAGS = -dynamiclib -single_module -Xlinker -undefined dynamic_lookup
+endif
+
+ifeq ($(ARCH),macosx64)
+# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
+# Only specific option (-m64) comes from root-config
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = c++
+CXXFLAGS = -O2 -pipe -Wall -W -Woverloaded-virtual
+LDFLAGS = -O2 -bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
+SOFLAGS = -dynamiclib -single_module -undefined dynamic_lookup
+endif
+
+ifeq ($(ARCH),macosxxlc)
+# MacOS X with IBM xlC compiler
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = xlC
+CXXFLAGS = -O
+LDFLAGS = -O -Wl,-bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 xlC
+else
+ifeq ($(MACOSX_MINOR),3)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.3 xlC
+else
+UNDEFOPT = suppress
+LD = xlC
+endif
+endif
+SOFLAGS = -qmkshrobj -single_module -undefined $(UNDEFOPT)
+endif
+
+ifeq ($(ARCH),win32)
+# Windows with the VC++ compiler
+VC_MAJOR := $(shell unset VS_UNICODE_OUTPUT; cl.exe 2>&1 | awk '{ if (NR==1) print $$8 }' | \
+ cut -d'.' -f1)
+ObjSuf = obj
+SrcSuf = cxx
+ExeSuf = .exe
+DllSuf = dll
+OutPutOpt = -out:
+CXX = cl
+CXXOPT = -O2
+#CXXOPT = -Z7
+CXXFLAGS = $(CXXOPT) -nologo -I$(shell $(ROOTCONFIG) --incdir) -FIw32pragma.h
+LD = link
+LDOPT = -opt:ref
+#LDOPT = -debug
+LDFLAGS = $(LDOPT) -pdb:none -nologo
+SOFLAGS = -DLL
+
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),win32old)
+# Windows with the VC++ compiler
+ObjSuf = obj
+SrcSuf = cxx
+ExeSuf = .exe
+DllSuf = dll
+OutPutOpt = -out:
+CXX = cl
+CXXOPT = -O2
+#CXXOPT = -Z7
+CXXFLAGS = $(CXXOPT) -G5 -GR -GX -MD -DWIN32 -D_WINDOWS -nologo \
+ -DVISUAL_CPLUSPLUS -D_X86_=1 -D_DLL
+LD = link
+LDOPT = -opt:ref
+#LDOPT = -debug
+LDFLAGS = $(LDOPT) -pdb:none -nologo
+SOFLAGS = -DLL
+
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),win32gcc)
+# Windows with gcc
+DllSuf = dll
+ExeSuf = .exe
+CXX = g++
+CXXFLAGS = -O -pipe -Wall -Woverloaded-virtual -I/usr/X11R6/include
+LD = g++
+LDFLAGS = -O -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc \
+ -L/usr/X11R6/lib
+SOFLAGS = -shared -D_DLL -Wl,--export-all-symbols
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(CXX),)
+$(error $(ARCH) invalid architecture)
+endif
+
+#CXXFLAGS += $(ROOTCFLAGS) -I/home/odjuvsla/Workspace/alice/AliRootDev/RAW -I/home/odjuvsla/Workspace/alice/AliRootDev/include
+CXXFLAGS += $(ROOTCFLAGS) -I$(ALICE_ROOT)/RAW -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/PHOS -I$(ALIHLT_BASEDIR)/PHOS -I$(ALIHLT_BASEDIR)/BASE
+LDFLAGS += $(ROOTLDFLAGS)
+LIBS = $(ROOTLIBS) $(SYSLIBS)
+GLIBS = $(ROOTGLIBS) $(SYSLIBS)
+ROOTLIBS = -L$(ROOTSYS)/lib -lXMLIO -lMinuit -lGeom -lVMC -lEG
+ALILIBS = -L$(ALICE_ROOT)/lib/tgt_linux
+HLTLIBS = -L$(ALIHLT_LIBDIR)
+#ALILIBS = -L/home/odjuvsla/Workspace/alice/AliRootDev/lib/tgt_linux -lESD -lCDB
+
+GLIBS = $(ROOTGLIBS) $(SYSLIBS)
--- /dev/null
+
+Int_t crazyness(const char* runNb)
+{
+
+ gROOT->ProcessLine(".L ../digits/AliHLTPHOSDebugRawDigit.cxx++");
+ TChain *tree= new TChain("digitTree");
+ char filepath [50];
+
+ sprintf(filepath, "/tmp/phoshlt/analysis/data/run%s/*", runNb);
+ tree->Add(filepath);
+
+ TClonesArray *digArray = new TClonesArray("AliHLTPHOSDebugRawDigit" , 100);
+ //tree->SetBranchAddress("digits", &digArray);
+ tree->SetBranchAddress("DebugRawDigit", &digArray);
+ TH1I *crazyHist = new TH1I("crazyHist", "Crazyness", 27, -6, 20);
+ TH2I *crazyChannelHist = new TH2I("crazyChannelHist", "Crazy channels", 64, 0, 63, 56, 0, 55);
+ AliHLTPHOSDebugRawDigit *digit = 0;
+
+ cout << endl << "Tree with " << tree->GetEntries() << " events...\n";
+ for(int k = 0; k < tree->GetEntries(); k++)
+ {
+ tree->GetEntry(k);
+ for(int j = 0; j < digArray->GetEntriesFast(); j++)
+ {
+ digit = (AliHLTPHOSDebugRawDigit*)digArray->At(j);
+ crazyHist->Fill(digit->GetCrazyness());
+ if(digit->GetCrazyness() == 0 && digit->GetGain() == 1)
+ {
+ crazyChannelHist->Fill(digit->GetX(), digit->GetZ());
+ }
+ }
+ }
+ // crazyHist->Write();
+ crazyChannelHist->Draw();
+
+ return 0;
+}
+
+
--- /dev/null
+
+#include "TTree.h"
+#include "TChain.h"
+#include "TClonesArray.h"
+#include "AliHLTPHOSDebugRawDigit.h"
+#include <iostream>
+#include "TH1I.h"
+#include "TH2I.h"
+#include "TFile.h"
+
+using namespace std;
+
+Int_t sanityFix(const char*);
+
+int main(int argc, const char** argv)
+{
+ sanityFix(argv[1]);
+ return 0;
+}
+
+Int_t sanityFix(const char* runNb)
+{
+ char filepath [50];
+ char outfile [50];
+
+ TChain *tree= new TChain("digitTree");
+
+ sprintf(filepath, "/tmp/phoshlt/analysis/data/run%s/*", runNb);
+ sprintf(outfile, "/home/phoshlt/analysis/output/run%s/crazyness.root", runNb);
+ tree->Add(filepath);
+
+ TClonesArray *digArray = new TClonesArray("AliHLTPHOSDebugRawDigit" , 100);
+ //tree->SetBranchAddress("digits", &digArray);
+ tree->SetBranchAddress("DebugRawDigit", &digArray);
+ TH1I *crazyHist = new TH1I("crazyHist", "Crazyness", 27, -6, 20);
+ TH2I *crazyChannelHist = new TH2I("crazyChannelHist", "Crazy channels", 64, 0, 63, 56, 0, 55);
+ AliHLTPHOSDebugRawDigit *digit = 0;
+
+ cout << endl << "Tree with " << tree->GetEntries() << " events...\n";
+ for(int k = 0; k < tree->GetEntries(); k++)
+ {
+ tree->GetEntry(k);
+ for(int j = 0; j < digArray->GetEntriesFast(); j++)
+ {
+ digit = (AliHLTPHOSDebugRawDigit*)digArray->At(j);
+ crazyHist->Fill(digit->GetCrazyness());
+ if(digit->GetCrazyness() == 0 && digit->GetGain() == 1)
+ {
+ crazyChannelHist->Fill(digit->GetX(), digit->GetZ());
+ }
+ }
+ }
+ cout << "Printing file...";
+ TFile *file = new TFile(outfile,"recreate");
+ crazyHist->Write();
+ crazyChannelHist->Write();
+ file->Close();
+ delete file;
+ file = 0;
+ cout << "Done!\n";
+
+ return 0;
+}
+
+
--- /dev/null
+include Makefile.arch
+
+
+MAINO = deadChannelMap.$(ObjSuf)
+
+MAINS = deadChannelMap.$(SrcSuf)
+
+MAIN = deadChannelMap$(ExeSuf)
+
+
+OBJS = $(MAINO)
+PROGRAMS = $(MAIN)
+
+
+.SUFFIXES: .$(SrcSuf) .$(ObjSuf) .$(DllSuf)
+
+all: $(PROGRAMS)
+
+
+$(MAIN): $(MAINO)
+ $(LD) $(LDFLAGS) $^ $(LIBS) $(GLIBS) $(ALILIBS) -lTreePlayer -lMathCore -lThread -lpthread $(HLTLIBS) -lHLTbase -lAliHLTUtil -lAliHLTPHOS $(OutPutOpt)$(MAIN)
+ @echo "$@ done"
+# $(LD) $(LDFLAGS) $^ $(LIBS) $(GLIBS) -lTreePlayer -lMathCore -lThread -lpthread $(OutPutOpt)$(MAIN)
+
+
+
+clean:
+ @rm -f $(OBJS) core
+
+distclean: clean
+ @rm -f $(PROGRAMS) *Dict.* *.def *.exp \
+ *.root *.ps *.so *.lib *.dll *.d .def so_locations
+ @rm -rf cxx_repository
+
+.SUFFIXES: .$(SrcSuf)
+
+
+.$(SrcSuf).$(ObjSuf):
+ $(CXX) $(CXXFLAGS) -c $<
--- /dev/null
+# -*- mode: makefile -*-
+#
+# Makefile containing platform dependencies for ROOT based projects.
+#
+# Copyright (c) 2000 Rene Brun and Fons Rademakers
+#
+# Author: Fons Rademakers, 29/2/2000
+
+ROOTCONFIG := root-config
+
+ARCH := $(shell $(ROOTCONFIG) --arch)
+PLATFORM := $(shell $(ROOTCONFIG) --platform)
+
+CXX =
+ObjSuf = o
+SrcSuf = cxx
+ExeSuf =
+DllSuf = so
+OutPutOpt = -o # keep whitespace after "-o"
+
+ROOTCFLAGS := $(shell $(ROOTCONFIG) --cflags)
+ROOTLDFLAGS := $(shell $(ROOTCONFIG) --ldflags)
+ROOTLIBS := $(shell $(ROOTCONFIG) --libs)
+ROOTGLIBS := $(shell $(ROOTCONFIG) --glibs)
+HASTHREAD := $(shell $(ROOTCONFIG) --has-thread)
+
+ifeq ($(ARCH),linux)
+# Linux with egcs, gcc 2.9x, gcc 3.x (>= RedHat 5.2)
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+#CXXFLAGS = -Wall -fPIC -g
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),hpuxacc)
+# HP-UX 10.x with aCC
+CXX = aCC
+CXXFLAGS = -O +Z
+LD = aCC
+LDFLAGS = -O -z
+SOFLAGS = -b
+endif
+
+ifeq ($(ARCH),hpuxia64acc)
+# HP-UX 11i 1.5 (IA-64) with aCC
+CXX = aCC
+CXXFLAGS = +DD64 -O +Z
+LD = aCC
+LDFLAGS = +DD64 -O -z
+SOFLAGS = -b
+endif
+
+ifeq ($(ARCH),hpuxgcc)
+# HP-UX 10.x with g++
+CXXFLAGS = -O -fPIC
+CXX = g++
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -fPIC -shared
+endif
+
+ifeq ($(ARCH),hurddeb)
+# GNU/Hurd
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),aix)
+# IBM AIX xlC 4.x
+CXX = xlC
+CXXFLAGS = -O
+LD = xlC
+LDFLAGS = -O
+SOFLAGS =
+DllSuf = a
+endif
+
+ifeq ($(ARCH),aix5)
+# IBM AIX xlC 5.x
+CXX = xlC
+CXXFLAGS = -O
+LD = xlC
+LDFLAGS = -O
+SOFLAGS =
+DllSuf = a
+endif
+
+ifeq ($(ARCH),aixgcc)
+# IBM AIX with GCC
+CXX = g++
+CXXFLAGS = -O
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+DllSuf = a
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),solaris)
+# Solaris CC
+CXX = /opt/SUNWspro/bin/CC
+CXXFLAGS = -O -KPIC
+LD = /opt/SUNWspro/bin/CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),solarisCC5)
+# Solaris CC 5.0
+CXX = CC
+CXXFLAGS = -O -KPIC
+LD = CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),solarisgcc)
+# Solaris gcc
+CXX = g++
+CXXFLAGS = -O -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),solariskcc)
+# Solaris kcc
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O4 -KPIC
+LD = KCC
+LDFLAGS = -O4
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),solarisx86)
+# Solaris CC on Intel
+CXX = CC
+CXXFLAGS = -O -KPIC
+LD = CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),sgicc)
+# SGI
+CXX = CC -n32 -I/usr/include/CC.sgi
+CXXFLAGS = -O
+LD = CC -n32 -LANG:std -I/usr/include/CC.sgi
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgicc64)
+# SGI
+CXX = CC -64 -I/usr/include/CC.sgi
+CXXFLAGS = -O
+LD = CC -64 -LANG:std -I/usr/include/CC.sgi
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgigcc)
+# SGI 6.x with gcc
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O -Wl,-u,__builtin_new -Wl,-u,__builtin_delete -Wl,-u,__nw__FUiPv
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgin32gcc)
+# SGI 6.x with gcc for n32 ABI
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O -L/usr/lib32 -Wl,-woff,134 -lgen
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgikcc)
+# SGI with KCC
+CXX = KCC -n32 --one_instantiation_per_object
+CXXFLAGS = -O
+LD = KCC -n32
+LDFLAGS = -O
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),alphagcc)
+# Alpha/OSF with gcc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -Wl,-expect_unresolved,* -shared
+endif
+
+ifeq ($(ARCH),alphakcc)
+# Alpha/OSF with kai compiler (not yet valid)
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O -fPIC
+LD = KCC
+LDFLAGS = -O
+SOFLAGS = -Wl,-expect_unresolved,* -shared
+endif
+
+ifeq ($(ARCH),alphacxx6)
+# Alpha/OSF with cxx6
+CXX = cxx
+CXXFLAGS = -O
+LD = cxx
+LDFLAGS = -O
+SOFLAGS = -shared -nocxxstd -Wl,-expect_unresolved,*,-msym
+endif
+
+ifeq ($(ARCH),linuxrh51)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxrh42)
+# Linux with gcc 2.7.2.x (RedHat 4.2)
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxdeb)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O1 -Wall -fPIC
+LD = g++
+LDFLAGS = -O1
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxdeb2ppc)
+# Debian/Linux on the PowerPC
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxsuse6)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxkcc)
+# Linux with the KAI compiler
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O -fPIC +K0
+LD = KCC
+LDFLAGS = -O $(shell $(ROOTCONFIG) --cflags)
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),linuxicc)
+# Linux with Intel icc compiler
+ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f1)
+ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+ifeq ($(ICC_MAJOR),8)
+ifneq ($(ICC_MINOR),0)
+CXXFLAGS += -wd1572
+endif
+endif
+endif
+
+ifeq ($(ARCH),linuxppcgcc)
+# MkLinux with gcc and glibc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64gcc)
+# Itanium Linux with gcc 2.9x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64sgi)
+# Itanium Linux with sgiCC
+CXX = sgiCC
+CXXFLAGS = -O -Wall -fPIC
+LD = gsgiCC
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64ecc)
+# Itanium Linux with Intel icc (was ecc)
+ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f1)
+ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+ifeq ($(ICC_MAJOR),8)
+ifneq ($(ICC_MINOR),0)
+CXXFLAGS += -wd1572
+endif
+endif
+endif
+
+ifeq ($(ARCH),linuxx8664gcc)
+# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxppc64gcc)
+# PPC64 Linux with gcc 3.x
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxx8664icc)
+# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476 -wd1572
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxalphagcc)
+# Alpha Linux with gcc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxarm)
+# ARM Linux with egcs
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),mklinux)
+# MkLinux with libc5
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),freebsd)
+# FreeBSD with libc5
+CXX = g++
+CXXFLAGS = -O -pipe -W -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),freebsd4)
+# FreeBSD with glibc
+CXXFLAGS += -W -Wall -fPIC
+LD = $(CXX)
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),freebsd5)
+# FreeBSD with glibc
+CXXFLAGS += -W -Wall -fPIC
+LD = $(CXX)
+endif
+
+ifeq ($(ARCH),openbsd)
+# OpenBSD with libc
+CXX = g++
+CXXFLAGS = -O -pipe -W -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),macosx)
+# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = c++
+CXXFLAGS = -O2 -pipe -Wall -W -Woverloaded-virtual
+LDFLAGS = -O2 -bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
+else
+ifeq ($(MACOSX_MINOR),3)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.3 c++
+else
+UNDEFOPT = suppress
+LD = c++
+endif
+endif
+SOFLAGS = -dynamiclib -single_module -undefined $(UNDEFOPT)
+endif
+
+ifeq ($(ARCH),macosxicc)
+# MacOS X with Intel icc compiler
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LDFLAGS = -O
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 icpc
+endif
+SOFLAGS = -dynamiclib -single_module -Xlinker -undefined dynamic_lookup
+endif
+
+ifeq ($(ARCH),macosx64)
+# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
+# Only specific option (-m64) comes from root-config
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = c++
+CXXFLAGS = -O2 -pipe -Wall -W -Woverloaded-virtual
+LDFLAGS = -O2 -bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
+SOFLAGS = -dynamiclib -single_module -undefined dynamic_lookup
+endif
+
+ifeq ($(ARCH),macosxxlc)
+# MacOS X with IBM xlC compiler
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = xlC
+CXXFLAGS = -O
+LDFLAGS = -O -Wl,-bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 xlC
+else
+ifeq ($(MACOSX_MINOR),3)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.3 xlC
+else
+UNDEFOPT = suppress
+LD = xlC
+endif
+endif
+SOFLAGS = -qmkshrobj -single_module -undefined $(UNDEFOPT)
+endif
+
+ifeq ($(ARCH),win32)
+# Windows with the VC++ compiler
+VC_MAJOR := $(shell unset VS_UNICODE_OUTPUT; cl.exe 2>&1 | awk '{ if (NR==1) print $$8 }' | \
+ cut -d'.' -f1)
+ObjSuf = obj
+SrcSuf = cxx
+ExeSuf = .exe
+DllSuf = dll
+OutPutOpt = -out:
+CXX = cl
+CXXOPT = -O2
+#CXXOPT = -Z7
+CXXFLAGS = $(CXXOPT) -nologo -I$(shell $(ROOTCONFIG) --incdir) -FIw32pragma.h
+LD = link
+LDOPT = -opt:ref
+#LDOPT = -debug
+LDFLAGS = $(LDOPT) -pdb:none -nologo
+SOFLAGS = -DLL
+
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),win32old)
+# Windows with the VC++ compiler
+ObjSuf = obj
+SrcSuf = cxx
+ExeSuf = .exe
+DllSuf = dll
+OutPutOpt = -out:
+CXX = cl
+CXXOPT = -O2
+#CXXOPT = -Z7
+CXXFLAGS = $(CXXOPT) -G5 -GR -GX -MD -DWIN32 -D_WINDOWS -nologo \
+ -DVISUAL_CPLUSPLUS -D_X86_=1 -D_DLL
+LD = link
+LDOPT = -opt:ref
+#LDOPT = -debug
+LDFLAGS = $(LDOPT) -pdb:none -nologo
+SOFLAGS = -DLL
+
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),win32gcc)
+# Windows with gcc
+DllSuf = dll
+ExeSuf = .exe
+CXX = g++
+CXXFLAGS = -O -pipe -Wall -Woverloaded-virtual -I/usr/X11R6/include
+LD = g++
+LDFLAGS = -O -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc \
+ -L/usr/X11R6/lib
+SOFLAGS = -shared -D_DLL -Wl,--export-all-symbols
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(CXX),)
+$(error $(ARCH) invalid architecture)
+endif
+
+#CXXFLAGS += $(ROOTCFLAGS) -I/home/odjuvsla/Workspace/alice/AliRootDev/RAW -I/home/odjuvsla/Workspace/alice/AliRootDev/include
+CXXFLAGS += $(ROOTCFLAGS) -I$(ALICE_ROOT)/RAW -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/PHOS -I$(ALIHLT_BASEDIR)/PHOS -I$(ALIHLT_BASEDIR)/BASE
+LDFLAGS += $(ROOTLDFLAGS)
+LIBS = $(ROOTLIBS) $(SYSLIBS)
+GLIBS = $(ROOTGLIBS) $(SYSLIBS)
+ROOTLIBS = -L$(ROOTSYS)/lib -lXMLIO -lMinuit -lGeom -lVMC -lEG
+ALILIBS = -L$(ALICE_ROOT)/lib/tgt_linux
+HLTLIBS = -L$(ALIHLT_LIBDIR)
+#ALILIBS = -L/home/odjuvsla/Workspace/alice/AliRootDev/lib/tgt_linux -lESD -lCDB
+
+GLIBS = $(ROOTGLIBS) $(SYSLIBS)
--- /dev/null
+
+Int_t deadChannelMap(const char* runNb)
+{
+ char filepath [50];
+ gROOT->ProcessLine(".L ../digits/AliHLTPHOSAltroConfig.cxx++");
+ gROOT->ProcessLine(".L ../digits/AliHLTPHOSConfig.cxx++");
+ gROOT->ProcessLine(".L ../digits/AliHLTPHOSBase.cxx++");
+ gROOT->ProcessLine(".L ../digits/AliHLTPHOSDigit.cxx++");
+ TChain *tree= new TChain("digitTree");
+
+ sprintf(filepath, "/tmp/phoshlt/aldaqpc019/hlt/run%s*", runNb);
+ tree->Add(filepath);
+
+ TClonesArray *digArray = new TClonesArray("AliHLTPHOSDigit" , 100);
+ //tree->SetBranchAddress("digits", &digArray);
+ tree->SetBranchAddress("Digit", &digArray);
+ TH2D *deadMap = new TH2D("deadMap", "Dead Channel Map", 64, 0, 63, 56, 0, 55);
+ AliHLTPHOSDigit *digit = 0;
+
+ cout << endl << "Chain with " << tree->GetEntries() << " events...\n";
+ for(int k = 0; k < tree->GetEntries(); k++)
+ {
+ tree->GetEntry(k);
+ // cout << " Event with " << digArray->GetEntriesFast() << " digits\n";
+ for(int j = 0; j < digArray->GetEntriesFast(); j++)
+ {
+ digit = (AliHLTPHOSDigit*)digArray->At(j);
+ if(digit->GetGain() == 1)
+ {
+ for(int i = 0; i < 70; i++)
+ {
+ if((digit->GetRawData())[i] > 300)
+ {
+ if((digit->GetRawData())[i+1] > 300)
+ {
+ if((digit->GetRawData())[i+2] > 300)
+ {
+ if((digit->GetRawData())[i+3] > 300)
+ {
+ deadMap->SetBinContent(digit->GetX(), digit->GetZ(), 10);
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+ deadMap->Draw();
+
+ return 0;
+}
+
+
--- /dev/null
+
+#include "TTree.h"
+#include "TChain.h"
+#include "TClonesArray.h"
+#include "AliHLTPHOSDebugRawDigit.h"
+#include <iostream>
+#include "TH2D.h"
+#include "TFile.h"
+
+using namespace std;
+
+Int_t deadChannelMap(const char*);
+
+int main(int argc, const char** argv)
+{
+ deadChannelMap(argv[1]);
+ return 0;
+}
+
+Int_t deadChannelMap(const char* runNb)
+{
+ char filepath [50];
+ char outfile [50];
+
+ TChain *tree= new TChain("digitTree");
+
+ sprintf(filepath, "/tmp/phoshlt/analysis/data/run%s/*", runNb);
+ sprintf(outfile, "/home/phoshlt/analysis/output/run%s/deadMap.root", runNb);
+ tree->Add(filepath);
+
+ TClonesArray *digArray = new TClonesArray("AliHLTPHOSDebugRawDigit" , 100);
+ //tree->SetBranchAddress("digits", &digArray);
+ tree->SetBranchAddress("DebugRawDigit", &digArray);
+ TH2D *deadMap = new TH2D("deadMap", "Dead Channel Map", 64, 0, 63, 56, 0, 55);
+ AliHLTPHOSDebugRawDigit *digit = 0;
+
+ cout << endl << "Chain with " << tree->GetEntries() << " events...\n";
+ for(int k = 0; k < tree->GetEntries(); k++)
+ {
+ tree->GetEntry(k);
+ // cout << " Event with " << digArray->GetEntriesFast() << " digits\n";
+ for(int j = 0; j < digArray->GetEntriesFast(); j++)
+ {
+ digit = (AliHLTPHOSDebugRawDigit*)digArray->At(j);
+ for(int i = 0; i < 70; i++)
+ {
+ if((digit->GetRawData())[i] > 55)
+ {
+ if((digit->GetRawData())[i+1] > 55)
+ {
+ if((digit->GetRawData())[i+2] > 55)
+ {
+ if((digit->GetRawData())[i+3] > 55)
+ {
+ deadMap->SetBinContent(digit->GetX(), digit->GetZ(), 10);
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+ cout << "Printing file...";
+
+
+ TFile *file = new TFile(outfile,"recreate");
+ deadMap->Write();
+ file->Close();
+ delete file;
+ file = 0;
+ cout << "Done!\n";
+
+
+
+ return 0;
+}
+
+
--- /dev/null
+include Makefile.arch
+
+
+MAINO = deadChannelMapAll.$(ObjSuf)
+
+MAINS = deadChannelMapAll.$(SrcSuf)
+
+MAIN = deadChannelMapAll$(ExeSuf)
+
+
+OBJS = $(MAINO)
+PROGRAMS = $(MAIN)
+
+
+.SUFFIXES: .$(SrcSuf) .$(ObjSuf) .$(DllSuf)
+
+all: $(PROGRAMS)
+
+
+$(MAIN): $(MAINO)
+ $(LD) $(LDFLAGS) $^ $(LIBS) $(GLIBS) $(ALILIBS) -lTreePlayer -lMathCore -lThread -lpthread $(HLTLIBS) -lHLTbase -lAliHLTUtil -lAliHLTPHOS $(OutPutOpt)$(MAIN)
+ @echo "$@ done"
+# $(LD) $(LDFLAGS) $^ $(LIBS) $(GLIBS) -lTreePlayer -lMathCore -lThread -lpthread $(OutPutOpt)$(MAIN)
+
+
+
+clean:
+ @rm -f $(OBJS) core
+
+distclean: clean
+ @rm -f $(PROGRAMS) *Dict.* *.def *.exp \
+ *.root *.ps *.so *.lib *.dll *.d .def so_locations
+ @rm -rf cxx_repository
+
+.SUFFIXES: .$(SrcSuf)
+
+
+.$(SrcSuf).$(ObjSuf):
+ $(CXX) $(CXXFLAGS) -c $<
--- /dev/null
+# -*- mode: makefile -*-
+#
+# Makefile containing platform dependencies for ROOT based projects.
+#
+# Copyright (c) 2000 Rene Brun and Fons Rademakers
+#
+# Author: Fons Rademakers, 29/2/2000
+
+ROOTCONFIG := root-config
+
+ARCH := $(shell $(ROOTCONFIG) --arch)
+PLATFORM := $(shell $(ROOTCONFIG) --platform)
+
+CXX =
+ObjSuf = o
+SrcSuf = cxx
+ExeSuf =
+DllSuf = so
+OutPutOpt = -o # keep whitespace after "-o"
+
+ROOTCFLAGS := $(shell $(ROOTCONFIG) --cflags)
+ROOTLDFLAGS := $(shell $(ROOTCONFIG) --ldflags)
+ROOTLIBS := $(shell $(ROOTCONFIG) --libs)
+ROOTGLIBS := $(shell $(ROOTCONFIG) --glibs)
+HASTHREAD := $(shell $(ROOTCONFIG) --has-thread)
+
+ifeq ($(ARCH),linux)
+# Linux with egcs, gcc 2.9x, gcc 3.x (>= RedHat 5.2)
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+#CXXFLAGS = -Wall -fPIC -g
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),hpuxacc)
+# HP-UX 10.x with aCC
+CXX = aCC
+CXXFLAGS = -O +Z
+LD = aCC
+LDFLAGS = -O -z
+SOFLAGS = -b
+endif
+
+ifeq ($(ARCH),hpuxia64acc)
+# HP-UX 11i 1.5 (IA-64) with aCC
+CXX = aCC
+CXXFLAGS = +DD64 -O +Z
+LD = aCC
+LDFLAGS = +DD64 -O -z
+SOFLAGS = -b
+endif
+
+ifeq ($(ARCH),hpuxgcc)
+# HP-UX 10.x with g++
+CXXFLAGS = -O -fPIC
+CXX = g++
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -fPIC -shared
+endif
+
+ifeq ($(ARCH),hurddeb)
+# GNU/Hurd
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),aix)
+# IBM AIX xlC 4.x
+CXX = xlC
+CXXFLAGS = -O
+LD = xlC
+LDFLAGS = -O
+SOFLAGS =
+DllSuf = a
+endif
+
+ifeq ($(ARCH),aix5)
+# IBM AIX xlC 5.x
+CXX = xlC
+CXXFLAGS = -O
+LD = xlC
+LDFLAGS = -O
+SOFLAGS =
+DllSuf = a
+endif
+
+ifeq ($(ARCH),aixgcc)
+# IBM AIX with GCC
+CXX = g++
+CXXFLAGS = -O
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+DllSuf = a
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),solaris)
+# Solaris CC
+CXX = /opt/SUNWspro/bin/CC
+CXXFLAGS = -O -KPIC
+LD = /opt/SUNWspro/bin/CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),solarisCC5)
+# Solaris CC 5.0
+CXX = CC
+CXXFLAGS = -O -KPIC
+LD = CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),solarisgcc)
+# Solaris gcc
+CXX = g++
+CXXFLAGS = -O -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),solariskcc)
+# Solaris kcc
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O4 -KPIC
+LD = KCC
+LDFLAGS = -O4
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),solarisx86)
+# Solaris CC on Intel
+CXX = CC
+CXXFLAGS = -O -KPIC
+LD = CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),sgicc)
+# SGI
+CXX = CC -n32 -I/usr/include/CC.sgi
+CXXFLAGS = -O
+LD = CC -n32 -LANG:std -I/usr/include/CC.sgi
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgicc64)
+# SGI
+CXX = CC -64 -I/usr/include/CC.sgi
+CXXFLAGS = -O
+LD = CC -64 -LANG:std -I/usr/include/CC.sgi
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgigcc)
+# SGI 6.x with gcc
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O -Wl,-u,__builtin_new -Wl,-u,__builtin_delete -Wl,-u,__nw__FUiPv
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgin32gcc)
+# SGI 6.x with gcc for n32 ABI
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O -L/usr/lib32 -Wl,-woff,134 -lgen
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgikcc)
+# SGI with KCC
+CXX = KCC -n32 --one_instantiation_per_object
+CXXFLAGS = -O
+LD = KCC -n32
+LDFLAGS = -O
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),alphagcc)
+# Alpha/OSF with gcc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -Wl,-expect_unresolved,* -shared
+endif
+
+ifeq ($(ARCH),alphakcc)
+# Alpha/OSF with kai compiler (not yet valid)
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O -fPIC
+LD = KCC
+LDFLAGS = -O
+SOFLAGS = -Wl,-expect_unresolved,* -shared
+endif
+
+ifeq ($(ARCH),alphacxx6)
+# Alpha/OSF with cxx6
+CXX = cxx
+CXXFLAGS = -O
+LD = cxx
+LDFLAGS = -O
+SOFLAGS = -shared -nocxxstd -Wl,-expect_unresolved,*,-msym
+endif
+
+ifeq ($(ARCH),linuxrh51)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxrh42)
+# Linux with gcc 2.7.2.x (RedHat 4.2)
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxdeb)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O1 -Wall -fPIC
+LD = g++
+LDFLAGS = -O1
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxdeb2ppc)
+# Debian/Linux on the PowerPC
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxsuse6)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxkcc)
+# Linux with the KAI compiler
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O -fPIC +K0
+LD = KCC
+LDFLAGS = -O $(shell $(ROOTCONFIG) --cflags)
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),linuxicc)
+# Linux with Intel icc compiler
+ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f1)
+ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+ifeq ($(ICC_MAJOR),8)
+ifneq ($(ICC_MINOR),0)
+CXXFLAGS += -wd1572
+endif
+endif
+endif
+
+ifeq ($(ARCH),linuxppcgcc)
+# MkLinux with gcc and glibc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64gcc)
+# Itanium Linux with gcc 2.9x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64sgi)
+# Itanium Linux with sgiCC
+CXX = sgiCC
+CXXFLAGS = -O -Wall -fPIC
+LD = gsgiCC
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64ecc)
+# Itanium Linux with Intel icc (was ecc)
+ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f1)
+ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+ifeq ($(ICC_MAJOR),8)
+ifneq ($(ICC_MINOR),0)
+CXXFLAGS += -wd1572
+endif
+endif
+endif
+
+ifeq ($(ARCH),linuxx8664gcc)
+# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxppc64gcc)
+# PPC64 Linux with gcc 3.x
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxx8664icc)
+# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476 -wd1572
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxalphagcc)
+# Alpha Linux with gcc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxarm)
+# ARM Linux with egcs
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),mklinux)
+# MkLinux with libc5
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),freebsd)
+# FreeBSD with libc5
+CXX = g++
+CXXFLAGS = -O -pipe -W -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),freebsd4)
+# FreeBSD with glibc
+CXXFLAGS += -W -Wall -fPIC
+LD = $(CXX)
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),freebsd5)
+# FreeBSD with glibc
+CXXFLAGS += -W -Wall -fPIC
+LD = $(CXX)
+endif
+
+ifeq ($(ARCH),openbsd)
+# OpenBSD with libc
+CXX = g++
+CXXFLAGS = -O -pipe -W -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),macosx)
+# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = c++
+CXXFLAGS = -O2 -pipe -Wall -W -Woverloaded-virtual
+LDFLAGS = -O2 -bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
+else
+ifeq ($(MACOSX_MINOR),3)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.3 c++
+else
+UNDEFOPT = suppress
+LD = c++
+endif
+endif
+SOFLAGS = -dynamiclib -single_module -undefined $(UNDEFOPT)
+endif
+
+ifeq ($(ARCH),macosxicc)
+# MacOS X with Intel icc compiler
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LDFLAGS = -O
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 icpc
+endif
+SOFLAGS = -dynamiclib -single_module -Xlinker -undefined dynamic_lookup
+endif
+
+ifeq ($(ARCH),macosx64)
+# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
+# Only specific option (-m64) comes from root-config
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = c++
+CXXFLAGS = -O2 -pipe -Wall -W -Woverloaded-virtual
+LDFLAGS = -O2 -bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
+SOFLAGS = -dynamiclib -single_module -undefined dynamic_lookup
+endif
+
+ifeq ($(ARCH),macosxxlc)
+# MacOS X with IBM xlC compiler
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = xlC
+CXXFLAGS = -O
+LDFLAGS = -O -Wl,-bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 xlC
+else
+ifeq ($(MACOSX_MINOR),3)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.3 xlC
+else
+UNDEFOPT = suppress
+LD = xlC
+endif
+endif
+SOFLAGS = -qmkshrobj -single_module -undefined $(UNDEFOPT)
+endif
+
+ifeq ($(ARCH),win32)
+# Windows with the VC++ compiler
+VC_MAJOR := $(shell unset VS_UNICODE_OUTPUT; cl.exe 2>&1 | awk '{ if (NR==1) print $$8 }' | \
+ cut -d'.' -f1)
+ObjSuf = obj
+SrcSuf = cxx
+ExeSuf = .exe
+DllSuf = dll
+OutPutOpt = -out:
+CXX = cl
+CXXOPT = -O2
+#CXXOPT = -Z7
+CXXFLAGS = $(CXXOPT) -nologo -I$(shell $(ROOTCONFIG) --incdir) -FIw32pragma.h
+LD = link
+LDOPT = -opt:ref
+#LDOPT = -debug
+LDFLAGS = $(LDOPT) -pdb:none -nologo
+SOFLAGS = -DLL
+
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),win32old)
+# Windows with the VC++ compiler
+ObjSuf = obj
+SrcSuf = cxx
+ExeSuf = .exe
+DllSuf = dll
+OutPutOpt = -out:
+CXX = cl
+CXXOPT = -O2
+#CXXOPT = -Z7
+CXXFLAGS = $(CXXOPT) -G5 -GR -GX -MD -DWIN32 -D_WINDOWS -nologo \
+ -DVISUAL_CPLUSPLUS -D_X86_=1 -D_DLL
+LD = link
+LDOPT = -opt:ref
+#LDOPT = -debug
+LDFLAGS = $(LDOPT) -pdb:none -nologo
+SOFLAGS = -DLL
+
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),win32gcc)
+# Windows with gcc
+DllSuf = dll
+ExeSuf = .exe
+CXX = g++
+CXXFLAGS = -O -pipe -Wall -Woverloaded-virtual -I/usr/X11R6/include
+LD = g++
+LDFLAGS = -O -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc \
+ -L/usr/X11R6/lib
+SOFLAGS = -shared -D_DLL -Wl,--export-all-symbols
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(CXX),)
+$(error $(ARCH) invalid architecture)
+endif
+
+#CXXFLAGS += $(ROOTCFLAGS) -I/home/odjuvsla/Workspace/alice/AliRootDev/RAW -I/home/odjuvsla/Workspace/alice/AliRootDev/include
+CXXFLAGS += $(ROOTCFLAGS) -I$(ALICE_ROOT)/RAW -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/PHOS -I$(ALIHLT_BASEDIR)/PHOS -I$(ALIHLT_BASEDIR)/BASE
+LDFLAGS += $(ROOTLDFLAGS)
+LIBS = $(ROOTLIBS) $(SYSLIBS)
+GLIBS = $(ROOTGLIBS) $(SYSLIBS)
+ROOTLIBS = -L$(ROOTSYS)/lib -lXMLIO -lMinuit -lGeom -lVMC -lEG
+ALILIBS = -L$(ALICE_ROOT)/lib/tgt_linux
+HLTLIBS = -L$(ALIHLT_LIBDIR)
+#ALILIBS = -L/home/odjuvsla/Workspace/alice/AliRootDev/lib/tgt_linux -lESD -lCDB
+
+GLIBS = $(ROOTGLIBS) $(SYSLIBS)
--- /dev/null
+
+#include "TTree.h"
+#include "TChain.h"
+#include "TClonesArray.h"
+#include "AliHLTPHOSDebugRawDigit.h"
+#include <iostream>
+#include "TH2D.h"
+#include "TFile.h"
+
+using namespace std;
+
+Int_t deadChannelMapAll();
+
+int main(int argc, const char** argv)
+{
+ deadChannelMapAll();
+ return 0;
+}
+
+Int_t deadChannelMapAll()
+{
+ char filepath [50];
+ char outfile [50];
+
+ TChain *tree= new TChain("digitTree");
+ TChain *treeOld = new TChain("digitTree");
+ TChain *treeOlder = new TChain("digitTree");
+
+ sprintf(outfile, "/home/phoshlt/analysis/output/all/deadMapAll.root");
+ tree->Add("/tmp/phoshlt/analysis/data/run7798/*");
+ tree->Add("/tmp/phoshlt/analysis/data/run7799/*");
+ tree->Add("/tmp/phoshlt/analysis/data/run7800/*");
+ tree->Add("/tmp/phoshlt/analysis/data/run7801/*");
+ tree->Add("/tmp/phoshlt/analysis/data/run7802/*");
+ tree->Add("/tmp/phoshlt/analysis/data/run7804/*");
+ tree->Add("/tmp/phoshlt/analysis/data/run7805/*");
+ tree->Add("/tmp/phoshlt/analysis/data/run7806/*");
+
+ // tree->Add("/tmp/phoshlt/analysis/data/run7775/*");
+ // tree->Add("/tmp/phoshlt/analysis/data/run7776/*");
+ // tree->Add("/tmp/phoshlt/analysis/data/run7777/*");
+ // tree->Add("/tmp/phoshlt/analysis/data/run7778/*");
+ // tree->Add("/tmp/phoshlt/analysis/data/run7780/*");
+ // tree->Add("/tmp/phoshlt/analysis/data/run7781/*");
+ // tree->Add("/tmp/phoshlt/analysis/data/run7785/*");
+ // tree->Add("/tmp/phoshlt/analysis/data/run7786/*");
+ // tree->Add("/tmp/phoshlt/analysis/data/run7789/*");
+ // tree->Add("/tmp/phoshlt/analysis/data/run7790/*");
+ // tree->Add("/tmp/phoshlt/analysis/data/run7791/*");
+ // tree->Add("/tmp/phoshlt/analysis/data/run7792/*");
+ // tree->Add("/tmp/phoshlt/analysis/data/run7793/*");
+ // tree->Add("/tmp/phoshlt/analysis/data/run7794/*");
+ // tree->Add("/tmp/phoshlt/analysis/data/run7795/*");
+ // tree->Add("/tmp/phoshlt/analysis/data/run7796/*");
+ // tree->Add("/tmp/phoshlt/analysis/data/run7797/*");
+ // tree->Add("/home/phoshlt/analysis/data/run7798/*");
+
+
+
+ // treeOld->Add("/tmp/phoshlt/analysis/data_old/run7762/*");
+ // treeOld->Add("/tmp/phoshlt/analysis/data_old/run7765/*");
+ // treeOld->Add("/tmp/phoshlt/analysis/data_old/run7767/*");
+ // treeOld->Add("/tmp/phoshlt/analysis/data_old/run7768/*");
+ // treeOld->Add("/tmp/phoshlt/analysis/data_old/run7769/*");
+ // treeOld->Add("/tmp/phoshlt/analysis/data_old/run7771/*");
+
+ // treeOlder->Add("/tmp/phoshlt/analysis/data_old/run7758/*");
+ // treeOlder->Add("/tmp/phoshlt/analysis/data_old/run7760/*");
+ // treeOlder->Add("/tmp/phoshlt/analysis/data_old/run7761/*");
+
+
+
+ TClonesArray *digArray = new TClonesArray("AliHLTPHOSDebugRawDigit" , 100);
+ TClonesArray *digArrayOld = new TClonesArray("AliHLTPHOSDebugRawDigit" , 100);
+ TClonesArray *digArrayOlder = new TClonesArray("AliHLTPHOSDebugRawDigit" , 100);
+ //tree->SetBranchAddress("digits", &digArray);
+ tree->SetBranchAddress("DebugRawDigit", &digArray);
+ treeOld->SetBranchAddress("DebugDigitsRaw", &digArrayOld);
+ treeOlder->SetBranchAddress("digits", &digArrayOlder);
+
+ TH2D *deadMapAll = new TH2D("deadMapAll", "Dead Channel Map All runs", 64, 0, 63, 56, 0, 55);
+ AliHLTPHOSDebugRawDigit *digit = 0;
+
+ cout << endl << "tree is a cain with " << tree->GetEntries() << " events...\n";
+ // cout << "treeOld is a cain with " << treeOld->GetEntries() << " events...\n";
+ // cout << "treeOlder is a cain with " << treeOlder->GetEntries() << " events...\n";
+ // cout << "Gives a total of " << tree->GetEntries() + treeOld->GetEntries() + treeOlder->GetEntries() << "events\n";
+
+ for(int k = 0; k < tree->GetEntries(); k++)
+ {
+ tree->GetEntry(k);
+ // cout << " Event with " << digArray->GetEntriesFast() << " digits\n";
+ for(int j = 0; j < digArray->GetEntriesFast(); j++)
+ {
+ digit = (AliHLTPHOSDebugRawDigit*)digArray->At(j);
+ for(int i = 0; i < 70; i++)
+ {
+ if((digit->GetRawData())[i] > 60)
+ {
+ if((digit->GetRawData())[i+1] > 60)
+ {
+ if((digit->GetRawData())[i+2] > 60)
+ {
+ if((digit->GetRawData())[i+3] > 60)
+ {
+ deadMapAll->SetBinContent(digit->GetX(), digit->GetZ(), 10);
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ for(int k = 0; k < treeOld->GetEntries(); k++)
+ {
+ treeOld->GetEntry(k);
+ // cout << " Event with " << digArray->GetEntriesFast() << " digits\n";
+ for(int j = 0; j < digArrayOld->GetEntriesFast(); j++)
+ {
+ digit = (AliHLTPHOSDebugRawDigit*)digArrayOld->At(j);
+ for(int i = 0; i < 70; i++)
+ {
+ if((digit->GetRawData())[i] > 30)
+ {
+ if((digit->GetRawData())[i+1] > 30)
+ {
+ if((digit->GetRawData())[i+2] > 30)
+ {
+ if((digit->GetRawData())[i+3] > 30)
+ {
+ deadMapAll->SetBinContent(digit->GetX(), digit->GetZ(), 10);
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ for(int k = 0; k < treeOlder->GetEntries(); k++)
+ {
+ treeOlder->GetEntry(k);
+ // cout << " Event with " << digArray->GetEntriesFast() << " digits\n";
+ for(int j = 0; j < digArrayOlder->GetEntriesFast(); j++)
+ {
+ digit = (AliHLTPHOSDebugRawDigit*)digArrayOlder->At(j);
+ for(int i = 0; i < 70; i++)
+ {
+ if((digit->GetRawData())[i] > 30)
+ {
+ if((digit->GetRawData())[i+1] > 30)
+ {
+ if((digit->GetRawData())[i+2] > 30)
+ {
+ if((digit->GetRawData())[i+3] > 30)
+ {
+ deadMapAll->SetBinContent(digit->GetX(), digit->GetZ(), 10);
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ cout << "Printing file...";
+
+
+ TFile *file = new TFile(outfile,"recreate");
+ deadMapAll->Write();
+ file->Close();
+ delete file;
+ file = 0;
+ cout << "Done!\n";
+
+
+
+ return 0;
+}
+
+
--- /dev/null
+Int_t convertFiles(Int_t runNb, Int_t nFiles)
+{
+ gROOT->ProcessLine(".L ../digits/AliHLTPHOSAltroConfig.cxx++");
+ gROOT->ProcessLine(".L ../digits/AliHLTPHOSDebugRawDigit.cxx++");
+ gROOT->ProcessLine(".L ../digits/AliHLTPHOSDigit.cxx++");
+ gROOT->ProcessLine(".L digitConverter.C++");
+
+ for(Int_t i = 0; i < nFiles; i++)
+ {
+ digitConverter(runNb, i);
+ }
+ return 0;
+}
+
--- /dev/null
+#include "TChain.h"
+#include "TTree.h"
+#include "TClonesArray.h"
+#include "TFile.h"
+#include "../digits/AliHLTPHOSDebugRawDigit.h"
+#include "../digits/AliHLTPHOSDigit.h"
+#include "../digits/AliHLTPHOSAltroConfig.h"
+#include <iostream>
+
+Int_t digitConverter(Int_t runNb, Int_t segNb)
+{
+ gROOT->ProcessLine(".L ../digits/AliHLTPHOSDigit.cxx+");
+ gROOT->ProcessLine(".L ../digits/AliHLTPHOSDebugRawDigit.cxx+");
+ char filename [50];
+ sprintf(filename, "/tmp/phoshlt/aldaqpc019/hlt/run%d_digitTree_%d.root", runNb, segNb);
+
+ char filepath [50];
+
+ bool finished = false;
+
+ TChain *tree= new TChain("digitTree");
+ TTree *newTree = new TTree("digitTree", "Digits tree" );
+
+ tree->Add(filename);
+ TClonesArray *rawDigArray = new TClonesArray("AliHLTPHOSDebugRawDigit" , 100);
+ TClonesArray *oldDigArray = new TClonesArray("AliHLTPHOSDigit" , 100);
+ TClonesArray *newDigArray = new TClonesArray("AliHLTPHOSDigit" , 100);
+
+ newTree->Branch("Digit", &newDigArray);
+ tree->SetBranchAddress("DebugRawDigit", &digArray);
+ AliHLTPHOSDebugRawDigit *digit = 0;
+ AliHLTPHOSDigit *newDigit = 0;
+ cout << endl << "Opening file: " << filename << endl;
+ cout << "Converting tree with " << tree->GetEntries() << " events\n";
+
+ for(int k = 0; k < tree->GetEntries(); k++)
+ {
+ tree->GetEntry(k);
+ for(int j = 0; j < digArray->GetEntriesFast(); j++)
+ {
+ digit = (AliHLTPHOSDebugRawDigit*)digArray->At(j);
+ newDigit = (AliHLTPHOSDigit*)newDigArray->New(j);
+ newDigit->SetX(digit->GetX());
+ newDigit->SetZ(digit->GetZ());
+ newDigit->SetAmplitude(digit->GetAmplitude());
+ newDigit->SetTime(digit->GetTime());
+ newDigit->SetEnergy(digit->GetEnergy());
+ newDigit->SetGain(digit->GetGain());
+ newDigit->SetRawData((Int_t*)(digit->GetRawData()));
+ if(digit->GetCrazyness() == 0)
+ newDigit->SetCrazyness(1);
+ if(digit->GetCrazyness() == 1)
+ newDigit->SetCrazyness(0);
+ newDigit->SetBaseline(digit->GetBaseline());
+ }
+ newTree->Fill();
+ newDigArray->Clear();
+ }
+ cout << "Conversion done, writing file: " << filename << endl;;
+ TFile *outfile = new TFile(filename,"recreate");
+ newTree->Write();
+ delete outfile;
+ outfile = 0;
+ cout << "Done!\n";
+ return 0;
+}
+
+
--- /dev/null
+// $Id$
+
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project *
+ * ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
+ * Timm Steinbeck <timm@kip.uni-heidelberg.de> *
+ * Jochen Thaeder <thaeder@kip.uni-heidelberg.de> *
+ * for The ALICE HLT Project. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/** @file AliHLTDataTypes.cxx
+ @author Matthias Richter, Timm Steinbeck, Jochen Thaeder
+ @date
+ @brief Implementation of data types. */
+
+#include "AliHLTDataTypes.h"
+
+// those types can not be implemented in the header files as rootcint
+// can not cope with the type id and origin defines.
+
+/** multiple output data types */
+const AliHLTComponentDataType kAliHLTMultipleDataType = {
+ sizeof(AliHLTComponentDataType),
+ {'M','U','L','T','I','P','L','E'},
+ kAliHLTDataOriginPrivate
+};
+
+/** data to file exchange subscriber */
+const AliHLTComponentDataType kAliHLTDataTypeFXSCalib = {
+ sizeof(AliHLTComponentDataType),
+ kAliHLTFXSCalibDataTypeID,
+ kAliHLTDataOriginOut
+};
+
+/** DDL list data type */
+const AliHLTComponentDataType kAliHLTDataTypeDDL = {
+ sizeof(AliHLTComponentDataType),
+ kAliHLTDDLDataTypeID,
+ kAliHLTDataOriginOut
+};
+
+/** SOR data type */
+const AliHLTComponentDataType kAliHLTDataTypeSOR = {
+ sizeof(AliHLTComponentDataType),
+ kAliHLTSORDataTypeID,
+ kAliHLTDataOriginPrivate
+};
+
+/** EOR data type */
+const AliHLTComponentDataType kAliHLTDataTypeEOR = {
+ sizeof(AliHLTComponentDataType),
+ kAliHLTEORDataTypeID,
+ kAliHLTDataOriginPrivate
+};
+
+/** Event type specification */
+const AliHLTComponentDataType kAliHLTDataTypeEvent = {
+ sizeof(AliHLTComponentDataType),
+ kAliHLTEventDataTypeID,
+ kAliHLTDataOriginPrivate
+};
--- /dev/null
+// @(#) $Id$
+
+#ifndef ALIHLTDATATYPES_H
+#define ALIHLTDATATYPES_H
+/* This file is property of and copyright by the ALICE HLT Project *
+ * ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/** @file AliHLTDataTypes.h
+ @author Matthias Richter, Timm Steinbeck, Jochen Thaeder
+ @date
+ @brief Data type declaration for the HLT module.
+*/
+
+//////////////////////////////////////////////////////////////////////////
+//
+// version no of HLT data types
+//
+//////////////////////////////////////////////////////////////////////////
+
+/* Version Description
+ * 1 first version until June 07; implicite, not tagged
+ * 2 introduced June 07, enhanced/cleaned/arranged structure
+ */
+#define ALIHLT_DATA_TYPES_VERSION 2
+
+//////////////////////////////////////////////////////////////////////////
+//
+// HLT data origin defines
+//
+//////////////////////////////////////////////////////////////////////////
+
+/** field size of datat type origin */
+const int kAliHLTComponentDataTypefOriginSize=4;
+
+
+/** invalid data origin */
+# define kAliHLTVoidDataOrigin "\0\0\0"
+
+/** special id for any data type origin */
+# define kAliHLTAnyDataOrigin "***"
+
+/** HLT out */
+# define kAliHLTDataOriginOut {'H','L','T',' '}
+
+/** HLT/PubSub private internal */
+# define kAliHLTDataOriginPrivate {'P','R','I','V'}
+
+/** TPC */
+# define kAliHLTDataOriginTPC {'T','P','C',' '}
+
+/** PHOS */
+# define kAliHLTDataOriginPHOS {'P','H','O','S'}
+
+/** MUON */
+# define kAliHLTDataOriginMUON {'M','U','O','N'}
+
+/** TRD */
+# define kAliHLTDataOriginTRD {'T','R','D',' '}
+
+/** ITS */
+# define kAliHLTDataOriginITS {'I','T','S',' '}
+
+//////////////////////////////////////////////////////////////////////////
+//
+// HLT common data type defines
+//
+//////////////////////////////////////////////////////////////////////////
+
+/** field size of data type id */
+const int kAliHLTComponentDataTypefIDsize=8;
+
+
+/** invalid data type id */
+# define kAliHLTVoidDataTypeID "\0\0\0\0\0\0\0"
+
+/** special id for any data type id */
+# define kAliHLTAnyDataTypeID "*******"
+
+/** calibration data for file exchange subscriber */
+# define kAliHLTFXSCalibDataTypeID {'F','X','S','_','C','A','L',' '}
+
+/** start of run (SOR) event
+ * @ref AliHLTRunDesc
+ */
+# define kAliHLTSORDataTypeID {'S','T','A','R','T','O','F','R'}
+
+/** end of run (EOR) event
+ * @ref AliHLTRunDesc
+ */
+# define kAliHLTEORDataTypeID {'E','N','D','O','F','R','U','N'}
+
+/** DDL list event
+ * @ref AliHLTEventDDL
+ */
+# define kAliHLTDDLDataTypeID {'D','D','L','L','I','S','T',' '}
+
+/** EventType event
+ * - empty payload, specification gives eventType
+ */
+# define kAliHLTEventDataTypeID {'E','V','E','N','T','T','Y','P'}
+
+using namespace std;
+
+extern "C" {
+ //////////////////////////////////////////////////////////////////////////
+ //
+ // Basic HLT data types
+ //
+ //////////////////////////////////////////////////////////////////////////
+
+ typedef unsigned char AliHLTUInt8_t;
+
+ typedef unsigned short AliHLTUInt16_t;
+
+ typedef unsigned int AliHLTUInt32_t;
+
+ typedef unsigned long long AliHLTUInt64_t;
+
+ typedef AliHLTUInt64_t AliHLTEventID_t;
+
+ //////////////////////////////////////////////////////////////////////////
+ //
+ // HLT logging levels
+ //
+ //////////////////////////////////////////////////////////////////////////
+
+ enum AliHLTComponentLogSeverity {
+ kHLTLogNone = 0,
+ kHLTLogBenchmark = 0x1,
+ kHLTLogDebug = 0x2,
+ kHLTLogInfo = 0x4,
+ kHLTLogWarning = 0x8,
+ kHLTLogError = 0x10,
+ kHLTLogFatal = 0x20,
+ kHLTLogAll = 0x3f,
+ kHLTLogDefault = 0x3d
+};
+
+ //////////////////////////////////////////////////////////////////////////
+ //
+ // HLT data structures for data exchange and external interface
+ //
+ //////////////////////////////////////////////////////////////////////////
+
+ /**
+ * @struct AliHLTComponentEventData
+ * Event descriptor
+ */
+ struct AliHLTComponentEventData
+ {
+ AliHLTUInt32_t fStructSize;
+ AliHLTEventID_t fEventID;
+ AliHLTUInt32_t fEventCreation_s;
+ AliHLTUInt32_t fEventCreation_us;
+ AliHLTUInt32_t fBlockCnt;
+ };
+
+ /**
+ * @struct AliHLTComponentShmData
+ * Shared memory descriptor.
+ * Irrelevant for analysis components.
+ */
+ struct AliHLTComponentShmData
+ {
+ AliHLTUInt32_t fStructSize;
+ AliHLTUInt32_t fShmType;
+ AliHLTUInt64_t fShmID;
+ };
+
+ /**
+ * @struct AliHLTComponentDataType
+ * Data type descriptor for data blocks transferred through the processing
+ * chain.
+ */
+ struct AliHLTComponentDataType
+ {
+ AliHLTUInt32_t fStructSize;
+ char fID[kAliHLTComponentDataTypefIDsize]; //!
+ char fOrigin[kAliHLTComponentDataTypefOriginSize]; //!
+ };
+
+ /**
+ * @struct AliHLTComponentBlockData
+ * Descriptor for data blocks.
+ */
+ struct AliHLTComponentBlockData
+ {
+ AliHLTUInt32_t fStructSize;
+ AliHLTComponentShmData fShmKey;
+ AliHLTUInt32_t fOffset;
+ void* fPtr;
+ AliHLTUInt32_t fSize;
+ AliHLTComponentDataType fDataType;
+ AliHLTUInt32_t fSpecification;
+ };
+
+ /**
+ * @struct AliHLTComponentTriggerData
+ * Trigger data, not yet defined
+ */
+ struct AliHLTComponentTriggerData
+ {
+ AliHLTUInt32_t fStructSize;
+ AliHLTUInt32_t fDataSize;
+ void* fData;
+ };
+
+ /**
+ * @struct AliHLTComponentEventDoneData
+ *
+ */
+ struct AliHLTComponentEventDoneData
+ {
+ AliHLTUInt32_t fStructSize;
+ AliHLTUInt32_t fDataSize;
+ void* fData;
+ };
+
+ /**
+ * @struct AliHLTRunDesc
+ * Event descriptor.
+ * The struct is send with the SOR and EOR events.
+ */
+ struct AliHLTRunDesc
+ {
+ AliHLTUInt32_t fStructSize;
+ AliHLTUInt32_t fRunNo;
+ AliHLTUInt32_t fRunType;
+ };
+
+ /** size of the DDL list */
+ static const int gkAliHLTDDLListSize = 29;
+
+ /**
+ * @struct AliHLTEventDDL
+ * DDL list event.
+ * The struct is send with the DDLLIST event.
+ */
+ struct AliHLTEventDDL
+ {
+ AliHLTUInt32_t fCount;
+ AliHLTUInt32_t fList[gkAliHLTDDLListSize];
+ };
+
+ //////////////////////////////////////////////////////////////////////////
+ //
+ // HLT Event Type Specification
+ //
+ //////////////////////////////////////////////////////////////////////////
+
+ /** Unknown eventType specification */
+ static const AliHLTUInt32_t gkAliEventTypeUnknown = ~(AliHLTUInt32_t)0;
+ /** SOR eventType specification */
+ static const AliHLTUInt32_t gkAliEventTypeStartOfRun=1;
+ /** Data eventType specification */
+ static const AliHLTUInt32_t gkAliEventTypeData=2;
+ /** EOR eventType specification */
+ static const AliHLTUInt32_t gkAliEventTypeEndOfRun=4;
+ /** Corrupt eventType specification */
+ static const AliHLTUInt32_t gkAliEventTypeCorruptID=8;
+ /** Calibration eventType specification */
+ static const AliHLTUInt32_t gkAliEventTypeCalibration=16;
+ /** DataReplay eventType specification */
+ static const AliHLTUInt32_t gkAliEventTypeDataReplay=32;
+ /** Tick eventType specification */
+ static const AliHLTUInt32_t gkAliEventTypeTick=64;
+ /** Max eventType specification */
+ static const AliHLTUInt32_t gkAliEventTypeMax=64;
+
+ //////////////////////////////////////////////////////////////////////////
+ //
+ // HLT defines and defaults
+ //
+ //////////////////////////////////////////////////////////////////////////
+
+ /** invalid event id */
+ const AliHLTEventID_t kAliHLTVoidEventID=~(AliHLTEventID_t)0;
+
+ /** invalid data specification */
+ const AliHLTUInt32_t kAliHLTVoidDataSpec = ~(AliHLTUInt32_t)0;
+
+ /** invalid shared memory type */
+ const AliHLTUInt32_t gkAliHLTComponentInvalidShmType = 0;
+
+ /** invalid shared memory id */
+ const AliHLTUInt64_t gkAliHLTComponentInvalidShmID = ~(AliHLTUInt64_t)0;
+
+ /** invalid data type */
+ const AliHLTComponentDataType kAliHLTVoidDataType = {
+ sizeof(AliHLTComponentDataType),
+ kAliHLTVoidDataTypeID,
+ kAliHLTVoidDataOrigin
+ };
+
+ // there is currently a problem with rootcint if the predefined ids
+ // (commented below) are used. rootcint does not find the id if they
+ // are char arrays defined with {} and individual chars. If strings
+ // are used it works fine
+ /** any data type */
+ const AliHLTComponentDataType kAliHLTAnyDataType = {
+ sizeof(AliHLTComponentDataType),
+ kAliHLTAnyDataTypeID,
+ kAliHLTAnyDataOrigin
+ };
+
+ /** multiple output data types */
+ extern const AliHLTComponentDataType kAliHLTMultipleDataType;
+
+ /** data to file exchange subscriber */
+ extern const AliHLTComponentDataType kAliHLTDataTypeFXSCalib;
+
+ /** DDL list data type */
+ extern const AliHLTComponentDataType kAliHLTDataTypeDDL;
+
+ /** SOR data type */
+ extern const AliHLTComponentDataType kAliHLTDataTypeSOR;
+
+ /** EOR data type */
+ extern const AliHLTComponentDataType kAliHLTDataTypeEOR;
+
+ /** Event type specification */
+ extern const AliHLTComponentDataType kAliHLTDataTypeEvent;
+
+ //////////////////////////////////////////////////////////////////////////
+ //
+ // FXS subscriber meta information
+ //
+ //////////////////////////////////////////////////////////////////////////
+
+ static const int gkAliHLTFXSHeaderfOriginSize = 4;
+ static const int gkAliHLTFXSHeaderfFileIDSize = 128;
+ static const int gkAliHLTFXSHeaderfDDLNumberSize = 64;
+
+ /** Header in front of the data payload, in order to sent data to the FXS. */
+ struct AliHLTFXSHeader
+ {
+ AliHLTUInt32_t fHeaderVersion;
+ AliHLTUInt32_t fRunNumber;
+ char fOrigin[gkAliHLTFXSHeaderfOriginSize];
+ char fFileID[gkAliHLTFXSHeaderfFileIDSize];
+ char fDDLNumber[gkAliHLTFXSHeaderfDDLNumberSize];
+ };
+
+ //////////////////////////////////////////////////////////////////////////
+ //
+ // Component running environment
+ //
+ //////////////////////////////////////////////////////////////////////////
+
+ /** logging function */
+ typedef int (*AliHLTfctLogging)( void* param,
+ AliHLTComponentLogSeverity severity,
+ const char* origin,
+ const char* keyword,
+ const char* message);
+
+ /**
+ * @struct AliHLTComponentEnvironment
+ * Running environment for analysis components.
+ * The struct describes function callbacks for
+ */
+ struct AliHLTComponentEnvironment
+ {
+ AliHLTUInt32_t fStructSize;
+ void* fParam;
+ void* (*fAllocMemoryFunc)( void* param, unsigned long size );
+#if 0
+ // future addition already foreseen/envisioned
+ // IMPORTANT: don not just remove the defines as this breaks the binary
+ // compatibility
+ int (*fAllocShmMemoryFunc)( void* param, unsigned long size, AliHLTComponentBlockData* blockLocation );
+#endif
+ int (*fGetEventDoneDataFunc)( void* param, AliHLTEventID_t eventID, unsigned long size, AliHLTComponentEventDoneData** edd );
+ AliHLTfctLogging fLoggingFunc;
+ };
+}
+
+//////////////////////////////////////////////////////////////////////////
+//
+// Data type helper functions
+//
+//////////////////////////////////////////////////////////////////////////
+
+inline bool operator==( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
+ {
+ for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ )
+ if ( dt1.fID[i] != dt2.fID[i] )
+ return false;
+ for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
+ if ( dt1.fOrigin[i] != dt2.fOrigin[i] )
+ return false;
+ return true;
+ }
+
+inline bool operator!=( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
+ {
+ for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ )
+ if ( dt1.fID[i] != dt2.fID[i] )
+ return true;
+ for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
+ if ( dt1.fOrigin[i] != dt2.fOrigin[i] )
+ return true;
+ return false;
+ }
+
+
+#endif
--- /dev/null
+/**************************************************************************
+ * This file is property of and copyright by the Experimental Nuclear *
+ * Physics Group, Dep. of Physics *
+ * University of Oslo, Norway, 2007 *
+ * *
+ * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project.*
+ * Contributors are mentioned in the code where appropriate. *
+ * Please report bugs to perthi@fys.uio.no *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+#include "AliHLTPHOSAltroConfig.h"
+#include <stdio.h>
+
+
+AliHLTPHOSAltroConfig::AliHLTPHOSAltroConfig() : fNPresamples(55),
+ fNSamples(15),
+ fIsAltroZeroSupressed(false),
+ fIsAltroBaselineSubtraction(false)
+{
+ fNTotalSamples = fNPresamples + fNSamples ;
+
+ FILE *fp = fopen("hltAltroConfig.txt", "r");
+ if(fp == 0)
+ {
+ // printf("\nAliHLTPHOSConfig::AliHLTPHOSConfig(): WARNING: Could not fine file \"hltConfig.txt\" \n");
+ // printf("Default values will be used\n");
+ // PrintAltroDefaultValues();
+ }
+ else
+ {
+ printf("Reading PHOS HLT configurations from file is no yest implemented\n");
+ printf("You can use Setter functions of AliHLTPHOSConfig to set the appropriate parameters\n");
+ printf("See AliHLTPHOSConfig.h for details\n");
+ printf("Using default values for the moment\n");
+ PrintAltroDefaultValues();
+ }
+
+}
+
+
+AliHLTPHOSAltroConfig::~AliHLTPHOSAltroConfig()
+{
+
+}
+
+void
+AliHLTPHOSAltroConfig:: PrintAltroDefaultValues()
+{
+ printf("\n AliHLTPHOSAltroConfig Default Values\n");
+ printf("Presamples = \n", fNPresamples);
+ printf("NSamples = \n", fNSamples);
+
+ if(fIsAltroZeroSupressed == true)
+ {
+ printf("fIsAltroZeroSupressed = true\n");
+ }
+ else
+ {
+ printf("fIsAltroZeroSupressed = false\n");
+ }
+
+
+ if(fIsAltroBaselineSubtraction == true)
+ {
+ printf("fIsAltroBaselineSubtraction = true\n");
+ }
+ else
+ {
+ printf("fIsAltroBaselineSubtraction = false\n");
+ }
+ // `fIsSoftwareBaselinesubtraction
+}
+
+
+void
+AliHLTPHOSAltroConfig::SetNPresSamples(int presamples)
+{
+ fNPresamples = presamples;
+}
+
+void
+AliHLTPHOSAltroConfig::SetNSamples(int samples)
+{
+ fNSamples = samples;
+}
+
+void
+AliHLTPHOSAltroConfig::SetAltroZeroSupression(bool isZeroSupressed)
+{
+ fIsAltroZeroSupressed = isZeroSupressed;
+}
+
+void
+AliHLTPHOSAltroConfig::SetAltroBaselineSubtraction(bool isAltroBaselineSubtraction)
+{
+ fIsAltroBaselineSubtraction = isAltroBaselineSubtraction;
+}
+
+
--- /dev/null
+#ifndef ALIHLTPHOSALTROCONFIG_H
+#define ALIHLTPHOSALTROCONFIG_H
+
+/**************************************************************************
+ * This file is property of and copyright by the Experimental Nuclear *
+ * Physics Group, Dep. of Physics *
+ * University of Oslo, Norway, 2007 *
+ * *
+ * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project.*
+ * Contributors are mentioned in the code where appropriate. *
+ * Please report bugs to perthi@fys.uio.no *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+
+
+class AliHLTPHOSAltroConfig
+{
+public:
+ AliHLTPHOSAltroConfig();
+ virtual ~AliHLTPHOSAltroConfig();
+ void SetNPresSamples(int presamples);
+ void SetNSamples(int samples);
+ void SetAltroZeroSupression(bool isZerosupressed);
+ void SetAltroBaselineSubtraction(bool isAltroBaselineSubtraction);
+ // void SetSoftwareBaselineSubtraction(bool isSoftwareBaselineSubtraction);
+ inline int GetNPresSamples(){return fNPresamples;};
+ inline int GetNSamples(){return fNSamples;};
+ inline bool GetIsAltroZroSupresses(){return fIsAltroZeroSupressed;};
+ inline bool GetIsAltroBaselineSubtraction(){return fIsAltroBaselineSubtraction;};
+ void PrintAltroDefaultValues();
+
+protected:
+ //Altro Config
+ int fNPresamples;
+ int fNSamples;
+ int fNTotalSamples;
+ bool fIsAltroZeroSupressed;
+ bool fIsAltroBaselineSubtraction;
+};
+
+#endif
--- /dev/null
+/**************************************************************************
+ * This file is property of and copyright by the Experimental Nuclear *
+ * Physics Group, Dep. of Physics *
+ * University of Oslo, Norway, 2007 *
+ * *
+ * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project.*
+ * Contributors are mentioned in the code where appropriate. *
+ * Please report bugs to perthi@fys.uio.no *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+#include "AliHLTPHOSBase.h"
+#include "AliHLTPHOSConfig.h"
+#include "AliHLTPHOSAltroConfig.h"
+
+
+AliHLTPHOSBase::AliHLTPHOSBase(): AliHLTPHOSConfig(),
+ AliHLTPHOSAltroConfig()
+{
+ // fConfigPtr = new AliHLTPHOSConfig();
+ // fAltroConfigPtr = new AliHLTPHOSAltroConfig();
+}
+
+
+AliHLTPHOSBase::~AliHLTPHOSBase()
+{
+
+}
+
--- /dev/null
+#ifndef ALIHLTPHOSBASE_H
+#define ALIHLTPHOSBASE_H
+
+/**************************************************************************
+ * This file is property of and copyright by the Experimental Nuclear *
+ * Physics Group, Dep. of Physics *
+ * University of Oslo, Norway, 2007 *
+ * *
+ * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project.*
+ * Contributors are mentioned in the code where appropriate. *
+ * Please report bugs to perthi@fys.uio.no *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+#include <iostream>
+#include <Rtypes.h>
+#include "TString.h"
+#include "AliHLTDataTypes.h"
+#include "AliHLTPHOSConstants.h"
+#include "AliHLTPHOSConfig.h"
+#include "AliHLTPHOSAltroConfig.h"
+
+using namespace PhosHLTConst;
+using namespace std;
+
+
+class AliHLTPHOSConfig;
+class AliHLTPHOSAltroConfig;
+
+class AliHLTPHOSBase : public AliHLTPHOSConfig, public AliHLTPHOSAltroConfig
+{
+public:
+ AliHLTPHOSBase();
+ virtual ~AliHLTPHOSBase();
+
+
+ template<typename T>
+ void DumpData(T *array, int N, int nPerLine)
+ {
+ cout << "DumpData N= " << N <<endl;
+ for(int i= 0; i< N; i++)
+ {
+ if((i%nPerLine == 0) && (i != 0))
+ {
+ printf("\n");
+ }
+
+ cout << array[i]<< "\t";
+
+ }
+ }
+
+ template<typename T>
+ void ResetArray(T *array, int N)
+ {
+ for(int i= 0; i< N; i++)
+ {
+ array[i] = 0;
+ }
+ }
+
+ template<typename T>
+ T MaxValue(T *array, int N)
+ {
+ // Double_t tmpMax = 0;
+
+ T tmpMax = 0;
+
+ for(int i = 0; i < N; i++)
+ {
+ if(array[i] > tmpMax)
+ {
+ tmpMax = array[i];
+ }
+ }
+
+ return tmpMax;
+ }
+
+
+protected:
+ AliHLTPHOSConfig *fConfigPtr;
+ AliHLTPHOSConfig *fAltroConfigPtr;
+
+private:
+ AliHLTPHOSBase(const AliHLTPHOSBase & );
+ AliHLTPHOSBase & operator = (const AliHLTPHOSBase &);
+};
+
+#endif
--- /dev/null
+
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project *
+ * All rights reserved. *
+ * *
+ * Primary Authors: Oystein Djuvsland *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+#include "AliHLTPHOSBaseline.h"
+#include "AliHLTPHOSConstants.h"
+
+ClassImp(AliHLTPHOSBaseline);
+
+AliHLTPHOSBaseline::AliHLTPHOSBaseline() :
+ TObject(),
+ fBaseline(-1),
+ fX(-1),
+ fZ(-1),
+ fGain(-1),
+ fEntries(0)
+{
+}
+
+AliHLTPHOSBaseline::~AliHLTPHOSBaseline()
+{
+}
+
+
--- /dev/null
+
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project *
+ * All rights reserved. *
+ * *
+ * Primary Authors: Oystein Djuvsland *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+#ifndef ALIHLTPHOSBASELINE_H
+#define ALIHLTPHOSBASELINE_H
+
+#include "TObject.h"
+#include "AliHLTPHOSConstants.h"
+
+using namespace PhosHLTConst;
+
+class AliHLTPHOSBaseline : public TObject
+{
+
+public:
+ AliHLTPHOSBaseline();
+ virtual ~AliHLTPHOSBaseline();
+
+ void SetBaseline(Float_t baseline) { fBaseline = baseline; }
+ void SetX(Int_t x) { fX = x; }
+ void SetZ(Int_t z) { fZ = z; }
+ void SetGain(Int_t gain) { fGain = gain; }
+ void SetEntries(Int_t entries) { fEntries = 0; }
+
+ Float_t GetBaseline() { return fBaseline; }
+ Int_t GetX() { return fX; }
+ Int_t GetZ() { return fZ; }
+ Int_t GetGain() { return fGain; }
+ Int_t GetEntries() { return fEntries; }
+
+private:
+
+ Float_t fBaseline;
+ Int_t fX;
+ Int_t fZ;
+ Int_t fGain;
+ Int_t fEntries;
+
+ ClassDef(AliHLTPHOSBaseline, 1);
+
+};
+
+#endif
--- /dev/null
+/**************************************************************************
+ * This file is property of and copyright by the Experimental Nuclear *
+ * Physics Group, Dep. of Physics *
+ * University of Oslo, Norway, 2007 *
+ * *
+ * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project.*
+ * Contributors are mentioned in the code where appropriate. *
+ * Please report bugs to perthi@fys.uio.no *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+#include "AliHLTPHOSConfig.h"
+#include <stdio.h>
+
+
+AliHLTPHOSConfig::AliHLTPHOSConfig() :
+ fIsSoftwareBaselineSubtraction(true)
+{
+ /*
+ FILE *fp = fopen("hltConfig.txt", "r");
+
+
+ if(fp == 0)
+ {
+ printf("\nAliHLTPHOSConfig::AliHLTPHOSConfig(): WARNING: Could not find file \"hltConfig.txt\" \n");
+ printf("Default values will be used\n");
+ PrintDefaultValues();
+ }
+ else
+ {
+ printf("Reading PHOS HLT configurations from file is no yest implemented\n");
+ printf("You can use Setter functions of AliHLTPHOSConfig to set the appropriate parameters\n");
+ printf("See AliHLTPHOSConfig.h for details\n");
+ printf("Using default values for the moment\n");
+ PrintDefaultValues();
+ }
+ */
+
+}
+
+
+AliHLTPHOSConfig::~AliHLTPHOSConfig()
+{
+
+}
+
+void
+AliHLTPHOSConfig:: PrintDefaultValues()
+{
+ printf("\n AliHLTPHOSConfig Default Values\n");
+
+
+ if(fIsSoftwareBaselineSubtraction == true)
+ {
+ printf("fisSoftwarebaselinesubtraction = true\n");
+ }
+ else
+ {
+ printf("fisSoftwarebaselinesubtraction == false\n");
+ }
+
+}
+
+
+void
+AliHLTPHOSConfig::SetSoftwareBaselineSubtraction(bool isSoftwareBaselineSubtraction)
+{
+ fIsSoftwareBaselineSubtraction = isSoftwareBaselineSubtraction;
+}
--- /dev/null
+#ifndef ALIHLTPHOSCONFIG_H
+#define ALIHLTPHOSCONFIG_H
+
+/**************************************************************************
+ * This file is property of and copyright by the Experimental Nuclear *
+ * Physics Group, Dep. of Physics *
+ * University of Oslo, Norway, 2007 *
+ * *
+ * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project.*
+ * Contributors are mentioned in the code where appropriate. *
+ * Please report bugs to perthi@fys.uio.no *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+
+
+class AliHLTPHOSConfig
+{
+public:
+ AliHLTPHOSConfig();
+ virtual ~AliHLTPHOSConfig();
+ void SetSoftwareBaselineSubtraction(bool isSoftwareBaselineSubtraction);
+ void PrintDefaultValues();
+
+protected:
+ bool fIsSoftwareBaselineSubtraction;
+};
+
+#endif
--- /dev/null
+/**************************************************************************
+ * This file is property of and copyright by the Experimental Nuclear *
+ * Physics Group, Dep. of Physics *
+ * University of Oslo, Norway, 2006 *
+ * *
+ * Author: Per Thomas Hille perthi@fys.uio.no for the ALICE DCS Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * Please report bugs to perthi@fys.uio.no *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+#ifndef ALIHLTPHOSCONSTANTS_H
+#define ALIHLTPHOSCONSTANTS_H
+
+namespace PhosHLTConst
+{
+ const int MAX_HOSTS = 20;
+ const int DEFAULT_EVENT_PORT = 42001;
+ const int MAX_BIN_VALUE = 1023;
+ const unsigned int HIGH_GAIN = 1;
+ const unsigned int LOW_GAIN = 0;
+
+ const unsigned int ALTRO_MAX_SAMPLES = 1008; /**<The maximum number of samples of the ALTRO*/
+ // const unsigned int ALTRO_MAX_TRALER_SIZE = 7;
+ // const unsigned int DDL_BLOCK_SIZE = 5;
+
+ const unsigned int N_ZROWS_RCU = 28; /**<Number of rows per module*/
+ const unsigned int N_XCOLUMNS_RCU = 32;
+ const unsigned int N_ZROWS_MOD = 56; /**<Number of rows per module*/
+ const unsigned int N_XCOLUMNS_MOD = 64; /**<Number of columns per module*/
+ const unsigned int N_GAINS = 2; /**<Number of gains per ALTRO channel*/
+ const unsigned int N_DATATYPES = 10;
+
+ const unsigned int PF_MAX_PATH_LENGTH = 256;
+
+#ifndef __CINT__
+ const unsigned char PF_VECTOR_DIR[] = "/HLT/PHOS/PFVectors";
+#endif
+
+ const unsigned int PF_DEFAULT_N_SAMPLES = 70;
+ const unsigned int PF_DEFAULT_STARTINDEX = 0;
+
+ const unsigned int DEFAULT_TAU = 2; /**<Assume that the signal rise time of the altrp pulses is 2 us (nominal value of the electronics)*/
+ const unsigned int DEFAULT_FS = 10; /**<Assume that the signal is samples with 10 MHZ samle rate*/
+
+ const unsigned int MODULE_0 = 0;
+ const unsigned int MODULE_1 = 1;
+ const unsigned int MODULE_2 = 2;
+ const unsigned int MODULE_3 = 3;
+ const unsigned int MODULE_4 = 4;
+
+ const unsigned int CSPS_PER_FEE = 32;
+ const unsigned int RCU_0 = 0;
+ const unsigned int RCU_1 = 1;
+ const unsigned int RCU_2 = 2;
+ const unsigned int RCU_3 = 3;
+
+ const unsigned int Z_0 = 0;
+ const unsigned int Z_1 = 1;
+ const unsigned int X_0 = 0;
+ const unsigned int X_1 = 1;
+
+ const unsigned int N_MODULES = 5; /**<Number of modules of the PHOS detector*/
+ const unsigned int N_RCUS = 4; /**<Number of RCUs per Module*/
+ const unsigned int N_RCUS_PER_MODULE = 4 ; /**<Number of RCUs per Module*/
+ const unsigned int N_RCUS_PER_TOTAL = N_MODULES*N_RCUS_PER_MODULE; /**<Total number of RCUs for PHOS*/
+ const unsigned int N_FEECS = 14; /**<Number of Frontend cards per branch*/
+ const unsigned int N_ALTROS = 4; /**<Number of ALTROs per frontend card*/
+ const unsigned int N_ALTROCHANNELS = 16;
+ const unsigned int N_BRANCHES = 2;
+}
+
+
+#endif
+
+
--- /dev/null
+//insert copyright
+
+#include "AliHLTPHOSDebugRawDigit.h"
+
+ClassImp(AliHLTPHOSDebugRawDigit);
+
+AliHLTPHOSDebugRawDigit::AliHLTPHOSDebugRawDigit() :
+ TObject(),
+ fX(-1),
+ fZ(-1),
+ fAmplitude(-1),
+ fTime(-1),
+ fEnergy(-1),
+ fGain(-1)
+
+
+{
+}
+
+AliHLTPHOSDebugRawDigit::~AliHLTPHOSDebugRawDigit()
+{
+}
+
+void
+AliHLTPHOSDebugRawDigit::SetRawData(UInt_t *dataPtr)
+{
+ for(Int_t i = 0; i < 70; i++)
+ {
+ fData[i] = dataPtr[i];
+ }
+}
+
--- /dev/null
+//insert copyright
+
+#ifndef ALIHLTPHOSDEBUGRAWDIGIT_H
+#define ALIHLTPHOSDEBUGRAWDIGIT_H
+
+#include "TObject.h"
+
+class AliHLTPHOSDebugRawDigit : public TObject
+{
+
+public:
+ AliHLTPHOSDebugRawDigit();
+ virtual ~AliHLTPHOSDebugRawDigit();
+
+ void SetX(Int_t x) { fX = x; }
+ void SetZ(Int_t z) { fZ = z; }
+ void SetAmplitude(Float_t amp) { fAmplitude = amp; }
+ void SetTime(Float_t time) { fTime = time; }
+ void SetEnergy(Float_t energy) { fEnergy = energy; }
+ void SetGain(Int_t gain) { fGain = gain; }
+
+ void SetRawData(UInt_t*);
+
+ void SetCrazyness(Int_t crazyness) { fCrazyness = crazyness; }
+ void SetBaseline(Int_t baseline) { fBaseline = baseline; }
+
+ Int_t GetX() { return fX; }
+ Int_t GetZ() { return fZ; }
+ Float_t GetAmplitude() { return fAmplitude; }
+ Float_t GetTime() { return fTime; }
+ Float_t GetEnergy() { return fEnergy; }
+ Int_t GetGain() { return fGain; }
+
+ UInt_t* GetRawData() { return fData; }
+
+ Int_t GetCrazyness() {return fCrazyness; }
+ Int_t GetBaseline() { return fBaseline; }
+
+
+private:
+
+ Int_t fX;
+ Int_t fZ;
+ Float_t fAmplitude;
+ Float_t fTime;
+ Float_t fEnergy;
+ Int_t fGain;
+
+ UInt_t fData[70];
+ Int_t fCrazyness;
+ Int_t fBaseline;
+
+ ClassDef(AliHLTPHOSDebugRawDigit, 1);
+
+};
+
+#endif
--- /dev/null
+//insert copyright
+
+#include "AliHLTPHOSDigit.h"
+#include "AliHLTPHOSAltroConfig.h"
+
+ClassImp(AliHLTPHOSDigit);
+
+AliHLTPHOSDigit::AliHLTPHOSDigit() :
+ TObject(),
+ AliHLTPHOSBase(),
+ fX(-1),
+ fZ(-1),
+ fAmplitude(-1),
+ fTime(-1),
+ fEnergy(-1),
+ fGain(-1),
+ fSamples(55),
+ fPreSamples(15),
+ fTotalSamples(70),
+ fDebugVar(-1)
+{
+ //added by PT
+ fSamples = fNSamples;
+ fPreSamples = fNPresamples;
+ fTotalSamples = fNTotalSamples;
+ // fData = new Int_t[fNTotalSamples];
+ fData = new Int_t[fNTotalSamples];
+
+}
+
+AliHLTPHOSDigit::~AliHLTPHOSDigit()
+{
+}
+
+void
+AliHLTPHOSDigit::SetRawData(Int_t *dataPtr)
+{
+ //modified by PT
+ // for(Int_t i = 0; i < 70; i++)
+ // {
+ // fData[i] = dataPtr[i];
+ // }
+ for(Int_t i = 0; i < fNTotalSamples; i++)
+ {
+ fData[i] = dataPtr[i];
+ }
+}
+
--- /dev/null
+//insert copyright
+
+#ifndef ALIHLTPHOSDIGIT_H
+#define ALIHLTPHOSDIGIT_H
+
+#include "TObject.h"
+//#include "AliHLTPHOSAltroConfig.h"
+#include "AliHLTPHOSBase.h"
+
+//class AliHLTPHOSDigit : public TObject, public AliHLTPHOSAltroConfig
+class AliHLTPHOSDigit : public TObject, public AliHLTPHOSBase
+{
+
+public:
+ AliHLTPHOSDigit();
+ virtual ~AliHLTPHOSDigit();
+
+ void SetX(Int_t x) { fX = x; }
+ void SetZ(Int_t z) { fZ = z; }
+ void SetAmplitude(Float_t amp) { fAmplitude = amp; }
+ void SetTime(Float_t time) { fTime = time; }
+ void SetEnergy(Float_t energy) { fEnergy = energy; }
+ void SetGain(Int_t gain) { fGain = gain; }
+
+ void SetRawData(Int_t*);
+
+ void SetCrazyness(Int_t crazyness) { fCrazyness = crazyness; }
+ void SetBaseline(Float_t baseline) { fBaseline = baseline; }
+
+ void SetSamples(Int_t samples) { fSamples = samples; }
+ void SetPreSamples(Int_t presamples) { fPreSamples = presamples; }
+
+ void SetDebugVar(Int_t val) { fDebugVar = val; }
+
+ Int_t GetX() { return fX; }
+ Int_t GetZ() { return fZ; }
+ Float_t GetAmplitude() { return fAmplitude; }
+ Float_t GetTime() { return fTime; }
+ Float_t GetEnergy() { return fEnergy; }
+ Int_t GetGain() { return fGain; }
+
+ Int_t* GetRawData() { return fData; }
+
+ Int_t GetCrazyness() {return fCrazyness; }
+ Float_t GetBaseline() { return fBaseline; }
+
+ Int_t GetSamples() { return fSamples; }
+ Int_t GetPreSamples() { return fPreSamples; }
+
+ Int_t GetDebugVar() { return fDebugVar; }
+
+
+private:
+
+ Int_t fX;
+ Int_t fZ;
+ Float_t fAmplitude;
+ Float_t fTime;
+ Float_t fEnergy;
+ Int_t fGain;
+ Int_t fSamples;
+ Int_t fPreSamples;
+ Int_t fTotalSamples;
+
+ Int_t fDebugVar; //can be anything, not intended for use in analysis
+
+ Int_t *fData; //[fTotalSamples]
+
+ Int_t fCrazyness;
+ Float_t fBaseline;
+
+ ClassDef(AliHLTPHOSDigit, 1);
+
+};
+
+#endif
--- /dev/null
+#ifdef __CINT__
+#pragma link C++ class AliHLTPHOSDebugRawDigit;
+#pragma link C++ class AliHLTPHOSBaseline;
+#pragma link C++ class AliHLTPHOSDigit;
+#endif
--- /dev/null
+To load (and compile) the shared libraries, add this to the macro:
+
+gROOT->ProcessLine(".L <PATH>/AliHLTPHOSDebugRawDigit.cxx++");
+gROOT->ProcessLine(".L <PATH>/AliHLTPHOSBaseline.cxx++");
+
+
+where <PATH> is the location of the files.
\ No newline at end of file
--- /dev/null
+
+Int_t spectrum(const char* filename)
+{
+ gROOT->ProcessLine(".L AliHLTPHOSDebugRawDigit.cxx++");
+
+ TH1F *spectrumHist = new TH1F("spectrumHist", "Digit energy spectrum", 200, 0, 200);
+ TClonesArray *digArray = new TClonesArray("AliHLTPHOSDebugRawDigit" , 100);
+ TChain *tree= new TChain("digitTree");
+ AliHLTPHOSDebugRawDigit *digit = 0;
+
+ tree->Add(filename);
+
+ tree->SetBranchAddress("DebugRawDigit", &digArray);
+ cout << endl << "Entries in tree: " << tree->GetEntries() << endl;
+
+ for(int k = 0; k < tree->GetEntries(); k++)
+ {
+ tree->GetEntry(k);
+ for(int j = 0; j < digArray->GetEntriesFast(); j++)
+ {
+ digit = (AliHLTPHOSDebugRawDigit*)digArray->At(j);
+ spectrumHist->Fill(digit->GetAmplitude());
+ }
+ }
+
+ spectrumHist->Draw();
+
+ return 0;
+}
+
+
--- /dev/null
+include Makefile.arch
+
+
+MAINO = energySpectrum.$(ObjSuf)
+
+MAINS = energySpectrum.$(SrcSuf)
+
+MAIN = energySpectrum$(ExeSuf)
+
+
+OBJS = $(MAINO)
+PROGRAMS = $(MAIN)
+
+
+.SUFFIXES: .$(SrcSuf) .$(ObjSuf) .$(DllSuf)
+
+all: $(PROGRAMS)
+
+
+$(MAIN): $(MAINO)
+ $(LD) $(LDFLAGS) $^ $(LIBS) $(GLIBS) $(ALILIBS) -lTreePlayer -lMathCore -lThread -lpthread $(HLTLIBS) -lHLTbase -lAliHLTUtil -lAliHLTPHOS $(OutPutOpt)$(MAIN)
+ @echo "$@ done"
+# $(LD) $(LDFLAGS) $^ $(LIBS) $(GLIBS) -lTreePlayer -lMathCore -lThread -lpthread $(OutPutOpt)$(MAIN)
+
+
+
+clean:
+ @rm -f $(OBJS) core
+
+distclean: clean
+ @rm -f $(PROGRAMS) *Dict.* *.def *.exp \
+ *.root *.ps *.so *.lib *.dll *.d .def so_locations
+ @rm -rf cxx_repository
+
+.SUFFIXES: .$(SrcSuf)
+
+
+.$(SrcSuf).$(ObjSuf):
+ $(CXX) $(CXXFLAGS) -c $<
--- /dev/null
+# -*- mode: makefile -*-
+#
+# Makefile containing platform dependencies for ROOT based projects.
+#
+# Copyright (c) 2000 Rene Brun and Fons Rademakers
+#
+# Author: Fons Rademakers, 29/2/2000
+
+ROOTCONFIG := root-config
+
+ARCH := $(shell $(ROOTCONFIG) --arch)
+PLATFORM := $(shell $(ROOTCONFIG) --platform)
+
+CXX =
+ObjSuf = o
+SrcSuf = cxx
+ExeSuf =
+DllSuf = so
+OutPutOpt = -o # keep whitespace after "-o"
+
+ROOTCFLAGS := $(shell $(ROOTCONFIG) --cflags)
+ROOTLDFLAGS := $(shell $(ROOTCONFIG) --ldflags)
+ROOTLIBS := $(shell $(ROOTCONFIG) --libs)
+ROOTGLIBS := $(shell $(ROOTCONFIG) --glibs)
+HASTHREAD := $(shell $(ROOTCONFIG) --has-thread)
+
+ifeq ($(ARCH),linux)
+# Linux with egcs, gcc 2.9x, gcc 3.x (>= RedHat 5.2)
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+#CXXFLAGS = -Wall -fPIC -g
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),hpuxacc)
+# HP-UX 10.x with aCC
+CXX = aCC
+CXXFLAGS = -O +Z
+LD = aCC
+LDFLAGS = -O -z
+SOFLAGS = -b
+endif
+
+ifeq ($(ARCH),hpuxia64acc)
+# HP-UX 11i 1.5 (IA-64) with aCC
+CXX = aCC
+CXXFLAGS = +DD64 -O +Z
+LD = aCC
+LDFLAGS = +DD64 -O -z
+SOFLAGS = -b
+endif
+
+ifeq ($(ARCH),hpuxgcc)
+# HP-UX 10.x with g++
+CXXFLAGS = -O -fPIC
+CXX = g++
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -fPIC -shared
+endif
+
+ifeq ($(ARCH),hurddeb)
+# GNU/Hurd
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),aix)
+# IBM AIX xlC 4.x
+CXX = xlC
+CXXFLAGS = -O
+LD = xlC
+LDFLAGS = -O
+SOFLAGS =
+DllSuf = a
+endif
+
+ifeq ($(ARCH),aix5)
+# IBM AIX xlC 5.x
+CXX = xlC
+CXXFLAGS = -O
+LD = xlC
+LDFLAGS = -O
+SOFLAGS =
+DllSuf = a
+endif
+
+ifeq ($(ARCH),aixgcc)
+# IBM AIX with GCC
+CXX = g++
+CXXFLAGS = -O
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+DllSuf = a
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),solaris)
+# Solaris CC
+CXX = /opt/SUNWspro/bin/CC
+CXXFLAGS = -O -KPIC
+LD = /opt/SUNWspro/bin/CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),solarisCC5)
+# Solaris CC 5.0
+CXX = CC
+CXXFLAGS = -O -KPIC
+LD = CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),solarisgcc)
+# Solaris gcc
+CXX = g++
+CXXFLAGS = -O -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),solariskcc)
+# Solaris kcc
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O4 -KPIC
+LD = KCC
+LDFLAGS = -O4
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),solarisx86)
+# Solaris CC on Intel
+CXX = CC
+CXXFLAGS = -O -KPIC
+LD = CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),sgicc)
+# SGI
+CXX = CC -n32 -I/usr/include/CC.sgi
+CXXFLAGS = -O
+LD = CC -n32 -LANG:std -I/usr/include/CC.sgi
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgicc64)
+# SGI
+CXX = CC -64 -I/usr/include/CC.sgi
+CXXFLAGS = -O
+LD = CC -64 -LANG:std -I/usr/include/CC.sgi
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgigcc)
+# SGI 6.x with gcc
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O -Wl,-u,__builtin_new -Wl,-u,__builtin_delete -Wl,-u,__nw__FUiPv
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgin32gcc)
+# SGI 6.x with gcc for n32 ABI
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O -L/usr/lib32 -Wl,-woff,134 -lgen
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgikcc)
+# SGI with KCC
+CXX = KCC -n32 --one_instantiation_per_object
+CXXFLAGS = -O
+LD = KCC -n32
+LDFLAGS = -O
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),alphagcc)
+# Alpha/OSF with gcc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -Wl,-expect_unresolved,* -shared
+endif
+
+ifeq ($(ARCH),alphakcc)
+# Alpha/OSF with kai compiler (not yet valid)
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O -fPIC
+LD = KCC
+LDFLAGS = -O
+SOFLAGS = -Wl,-expect_unresolved,* -shared
+endif
+
+ifeq ($(ARCH),alphacxx6)
+# Alpha/OSF with cxx6
+CXX = cxx
+CXXFLAGS = -O
+LD = cxx
+LDFLAGS = -O
+SOFLAGS = -shared -nocxxstd -Wl,-expect_unresolved,*,-msym
+endif
+
+ifeq ($(ARCH),linuxrh51)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxrh42)
+# Linux with gcc 2.7.2.x (RedHat 4.2)
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxdeb)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O1 -Wall -fPIC
+LD = g++
+LDFLAGS = -O1
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxdeb2ppc)
+# Debian/Linux on the PowerPC
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxsuse6)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxkcc)
+# Linux with the KAI compiler
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O -fPIC +K0
+LD = KCC
+LDFLAGS = -O $(shell $(ROOTCONFIG) --cflags)
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),linuxicc)
+# Linux with Intel icc compiler
+ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f1)
+ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+ifeq ($(ICC_MAJOR),8)
+ifneq ($(ICC_MINOR),0)
+CXXFLAGS += -wd1572
+endif
+endif
+endif
+
+ifeq ($(ARCH),linuxppcgcc)
+# MkLinux with gcc and glibc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64gcc)
+# Itanium Linux with gcc 2.9x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64sgi)
+# Itanium Linux with sgiCC
+CXX = sgiCC
+CXXFLAGS = -O -Wall -fPIC
+LD = gsgiCC
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64ecc)
+# Itanium Linux with Intel icc (was ecc)
+ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f1)
+ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+ifeq ($(ICC_MAJOR),8)
+ifneq ($(ICC_MINOR),0)
+CXXFLAGS += -wd1572
+endif
+endif
+endif
+
+ifeq ($(ARCH),linuxx8664gcc)
+# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxppc64gcc)
+# PPC64 Linux with gcc 3.x
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxx8664icc)
+# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476 -wd1572
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxalphagcc)
+# Alpha Linux with gcc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxarm)
+# ARM Linux with egcs
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),mklinux)
+# MkLinux with libc5
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),freebsd)
+# FreeBSD with libc5
+CXX = g++
+CXXFLAGS = -O -pipe -W -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),freebsd4)
+# FreeBSD with glibc
+CXXFLAGS += -W -Wall -fPIC
+LD = $(CXX)
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),freebsd5)
+# FreeBSD with glibc
+CXXFLAGS += -W -Wall -fPIC
+LD = $(CXX)
+endif
+
+ifeq ($(ARCH),openbsd)
+# OpenBSD with libc
+CXX = g++
+CXXFLAGS = -O -pipe -W -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),macosx)
+# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = c++
+CXXFLAGS = -O2 -pipe -Wall -W -Woverloaded-virtual
+LDFLAGS = -O2 -bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
+else
+ifeq ($(MACOSX_MINOR),3)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.3 c++
+else
+UNDEFOPT = suppress
+LD = c++
+endif
+endif
+SOFLAGS = -dynamiclib -single_module -undefined $(UNDEFOPT)
+endif
+
+ifeq ($(ARCH),macosxicc)
+# MacOS X with Intel icc compiler
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LDFLAGS = -O
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 icpc
+endif
+SOFLAGS = -dynamiclib -single_module -Xlinker -undefined dynamic_lookup
+endif
+
+ifeq ($(ARCH),macosx64)
+# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
+# Only specific option (-m64) comes from root-config
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = c++
+CXXFLAGS = -O2 -pipe -Wall -W -Woverloaded-virtual
+LDFLAGS = -O2 -bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
+SOFLAGS = -dynamiclib -single_module -undefined dynamic_lookup
+endif
+
+ifeq ($(ARCH),macosxxlc)
+# MacOS X with IBM xlC compiler
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = xlC
+CXXFLAGS = -O
+LDFLAGS = -O -Wl,-bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 xlC
+else
+ifeq ($(MACOSX_MINOR),3)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.3 xlC
+else
+UNDEFOPT = suppress
+LD = xlC
+endif
+endif
+SOFLAGS = -qmkshrobj -single_module -undefined $(UNDEFOPT)
+endif
+
+ifeq ($(ARCH),win32)
+# Windows with the VC++ compiler
+VC_MAJOR := $(shell unset VS_UNICODE_OUTPUT; cl.exe 2>&1 | awk '{ if (NR==1) print $$8 }' | \
+ cut -d'.' -f1)
+ObjSuf = obj
+SrcSuf = cxx
+ExeSuf = .exe
+DllSuf = dll
+OutPutOpt = -out:
+CXX = cl
+CXXOPT = -O2
+#CXXOPT = -Z7
+CXXFLAGS = $(CXXOPT) -nologo -I$(shell $(ROOTCONFIG) --incdir) -FIw32pragma.h
+LD = link
+LDOPT = -opt:ref
+#LDOPT = -debug
+LDFLAGS = $(LDOPT) -pdb:none -nologo
+SOFLAGS = -DLL
+
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),win32old)
+# Windows with the VC++ compiler
+ObjSuf = obj
+SrcSuf = cxx
+ExeSuf = .exe
+DllSuf = dll
+OutPutOpt = -out:
+CXX = cl
+CXXOPT = -O2
+#CXXOPT = -Z7
+CXXFLAGS = $(CXXOPT) -G5 -GR -GX -MD -DWIN32 -D_WINDOWS -nologo \
+ -DVISUAL_CPLUSPLUS -D_X86_=1 -D_DLL
+LD = link
+LDOPT = -opt:ref
+#LDOPT = -debug
+LDFLAGS = $(LDOPT) -pdb:none -nologo
+SOFLAGS = -DLL
+
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),win32gcc)
+# Windows with gcc
+DllSuf = dll
+ExeSuf = .exe
+CXX = g++
+CXXFLAGS = -O -pipe -Wall -Woverloaded-virtual -I/usr/X11R6/include
+LD = g++
+LDFLAGS = -O -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc \
+ -L/usr/X11R6/lib
+SOFLAGS = -shared -D_DLL -Wl,--export-all-symbols
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(CXX),)
+$(error $(ARCH) invalid architecture)
+endif
+
+#CXXFLAGS += $(ROOTCFLAGS) -I/home/odjuvsla/Workspace/alice/AliRootDev/RAW -I/home/odjuvsla/Workspace/alice/AliRootDev/include
+CXXFLAGS += $(ROOTCFLAGS) -I$(ALICE_ROOT)/RAW -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/PHOS -I$(ALIHLT_BASEDIR)/PHOS -I$(ALIHLT_BASEDIR)/BASE
+LDFLAGS += $(ROOTLDFLAGS)
+LIBS = $(ROOTLIBS) $(SYSLIBS)
+GLIBS = $(ROOTGLIBS) $(SYSLIBS)
+ROOTLIBS = -L$(ROOTSYS)/lib -lXMLIO -lMinuit -lGeom -lVMC -lEG
+ALILIBS = -L$(ALICE_ROOT)/lib/tgt_linux
+HLTLIBS = -L$(ALIHLT_LIBDIR)
+#ALILIBS = -L/home/odjuvsla/Workspace/alice/AliRootDev/lib/tgt_linux -lESD -lCDB
+
+GLIBS = $(ROOTGLIBS) $(SYSLIBS)
--- /dev/null
+
+Int_t energySpectrum(const char* runNb)
+{
+ gROOT->ProcessLine(".L ../digits/AliHLTPHOSAltroConfig.cxx++");
+ gROOT->ProcessLine(".L ../digits/AliHLTPHOSDigit.cxx++");
+ TH1F *spectrumHist = new TH1F("spectrumHist", "Digit energy spectrum", 200, 0, 200);
+ TH1F *spectrumHistSingle = new TH1F("spectrumHist", "Digit energy spectrum", 200, 0, 200);
+ TClonesArray *digArray = new TClonesArray("AliHLTPHOSDebugRawDigit" , 100);
+ TChain *tree= new TChain("digitTree");
+ AliHLTPHOSDebugRawDigit *digit = 0;
+
+ char filepath [50];
+ sprintf(filepath, "/tmp/phoshlt/analysis/data/run%s/*", runNb);
+ tree->Add(filepath);
+
+ tree->SetBranchAddress("DebugRawDigit", &digArray);
+ cout << endl << "Entries in tree: " << tree->GetEntries() << endl;
+
+ for(int k = 0; k < tree->GetEntries(); k++)
+ {
+ tree->GetEntry(k);
+ for(int j = 0; j < digArray->GetEntriesFast(); j++)
+ {
+ digit = (AliHLTPHOSDebugRawDigit*)digArray->At(j);
+ if(digit->GetAmplitude() > 20&& digit->GetCrazyness()==1 && digit->GetGain() == 1)
+ {
+ spectrumHist->Fill(digit->GetAmplitude());
+ if(digit->fX = 30 &&digit->fZ = 30)
+ {
+ spectrumHistSingle->Fill(digit->GetAmplitude());
+ }
+ }
+ }
+ }
+ spectrumHist->Draw();
+
+ return 0;
+}
+
+
--- /dev/null
+
+#include "TTree.h"
+#include "TChain.h"
+#include "TClonesArray.h"
+#include "TH1F.h"
+#include "TFile.h"
+#include "AliHLTPHOSDebugRawDigit.h"
+#include <iostream>
+
+using namespace std;
+
+Int_t energySpectrum(const char*);
+
+int main(int argc, const char** argv)
+{
+ energySpectrum(argv[1]);
+ return 0;
+}
+
+Int_t energySpectrum(const char* runNb)
+{
+
+
+ TH1F *spectrumHist = new TH1F("spectrumHist", "Digit energy spectrum", 200, 0, 200);
+ TClonesArray *digArray = new TClonesArray("AliHLTPHOSDebugRawDigit" , 100);
+ TChain *tree= new TChain("digitTree");
+ AliHLTPHOSDebugRawDigit *digit = 0;
+
+ char filepath [50];
+ char outfile [50];
+
+ sprintf(filepath, "/tmp/phoshlt/analysis/data/run%s/*", runNb);
+ sprintf(outfile, "/home/phoshlt/analysis/output/run%s/spectrum.root", runNb);
+ tree->Add(filepath);
+
+ tree->SetBranchAddress("DebugRawDigit", &digArray);
+ cout << endl << "Entries in tree: " << tree->GetEntries() << endl;
+
+ for(int k = 0; k < tree->GetEntries(); k++)
+ {
+ tree->GetEntry(k);
+ for(int j = 0; j < digArray->GetEntriesFast(); j++)
+ {
+ digit = (AliHLTPHOSDebugRawDigit*)digArray->At(j);
+ if((digit->GetAmplitude() - digit->GetBaseline()) > 20 && digit->GetCrazyness())
+ spectrumHist->Fill(digit->GetAmplitude()- digit->GetBaseline());
+ }
+ }
+ cout << "Printing file...";
+ TFile *file = new TFile(outfile,"recreate");
+ spectrumHist->Write();
+ file->Close();
+ delete file;
+ file = 0;
+ cout << "Done!\n";
+
+ return 0;
+}
+
+
--- /dev/null
+include Makefile.arch
+
+
+MAINO = deadChannelMap.$(ObjSuf)
+
+MAINS = deadChannelMap.$(SrcSuf)
+
+MAIN = deadChannelMap$(ExeSuf)
+
+
+OBJS = $(MAINO)
+PROGRAMS = $(MAIN)
+
+
+.SUFFIXES: .$(SrcSuf) .$(ObjSuf) .$(DllSuf)
+
+all: $(PROGRAMS)
+
+
+$(MAIN): $(MAINO)
+ $(LD) $(LDFLAGS) $^ $(LIBS) $(GLIBS) $(ALILIBS) -lTreePlayer -lMathCore -lThread -lpthread $(HLTLIBS) -lHLTbase -lAliHLTUtil -lAliHLTPHOS $(OutPutOpt)$(MAIN)
+ @echo "$@ done"
+# $(LD) $(LDFLAGS) $^ $(LIBS) $(GLIBS) -lTreePlayer -lMathCore -lThread -lpthread $(OutPutOpt)$(MAIN)
+
+
+
+clean:
+ @rm -f $(OBJS) core
+
+distclean: clean
+ @rm -f $(PROGRAMS) *Dict.* *.def *.exp \
+ *.root *.ps *.so *.lib *.dll *.d .def so_locations
+ @rm -rf cxx_repository
+
+.SUFFIXES: .$(SrcSuf)
+
+
+.$(SrcSuf).$(ObjSuf):
+ $(CXX) $(CXXFLAGS) -c $<
--- /dev/null
+# -*- mode: makefile -*-
+#
+# Makefile containing platform dependencies for ROOT based projects.
+#
+# Copyright (c) 2000 Rene Brun and Fons Rademakers
+#
+# Author: Fons Rademakers, 29/2/2000
+
+ROOTCONFIG := root-config
+
+ARCH := $(shell $(ROOTCONFIG) --arch)
+PLATFORM := $(shell $(ROOTCONFIG) --platform)
+
+CXX =
+ObjSuf = o
+SrcSuf = cxx
+ExeSuf =
+DllSuf = so
+OutPutOpt = -o # keep whitespace after "-o"
+
+ROOTCFLAGS := $(shell $(ROOTCONFIG) --cflags)
+ROOTLDFLAGS := $(shell $(ROOTCONFIG) --ldflags)
+ROOTLIBS := $(shell $(ROOTCONFIG) --libs)
+ROOTGLIBS := $(shell $(ROOTCONFIG) --glibs)
+HASTHREAD := $(shell $(ROOTCONFIG) --has-thread)
+
+ifeq ($(ARCH),linux)
+# Linux with egcs, gcc 2.9x, gcc 3.x (>= RedHat 5.2)
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+#CXXFLAGS = -Wall -fPIC -g
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),hpuxacc)
+# HP-UX 10.x with aCC
+CXX = aCC
+CXXFLAGS = -O +Z
+LD = aCC
+LDFLAGS = -O -z
+SOFLAGS = -b
+endif
+
+ifeq ($(ARCH),hpuxia64acc)
+# HP-UX 11i 1.5 (IA-64) with aCC
+CXX = aCC
+CXXFLAGS = +DD64 -O +Z
+LD = aCC
+LDFLAGS = +DD64 -O -z
+SOFLAGS = -b
+endif
+
+ifeq ($(ARCH),hpuxgcc)
+# HP-UX 10.x with g++
+CXXFLAGS = -O -fPIC
+CXX = g++
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -fPIC -shared
+endif
+
+ifeq ($(ARCH),hurddeb)
+# GNU/Hurd
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),aix)
+# IBM AIX xlC 4.x
+CXX = xlC
+CXXFLAGS = -O
+LD = xlC
+LDFLAGS = -O
+SOFLAGS =
+DllSuf = a
+endif
+
+ifeq ($(ARCH),aix5)
+# IBM AIX xlC 5.x
+CXX = xlC
+CXXFLAGS = -O
+LD = xlC
+LDFLAGS = -O
+SOFLAGS =
+DllSuf = a
+endif
+
+ifeq ($(ARCH),aixgcc)
+# IBM AIX with GCC
+CXX = g++
+CXXFLAGS = -O
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+DllSuf = a
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),solaris)
+# Solaris CC
+CXX = /opt/SUNWspro/bin/CC
+CXXFLAGS = -O -KPIC
+LD = /opt/SUNWspro/bin/CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),solarisCC5)
+# Solaris CC 5.0
+CXX = CC
+CXXFLAGS = -O -KPIC
+LD = CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),solarisgcc)
+# Solaris gcc
+CXX = g++
+CXXFLAGS = -O -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),solariskcc)
+# Solaris kcc
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O4 -KPIC
+LD = KCC
+LDFLAGS = -O4
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),solarisx86)
+# Solaris CC on Intel
+CXX = CC
+CXXFLAGS = -O -KPIC
+LD = CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),sgicc)
+# SGI
+CXX = CC -n32 -I/usr/include/CC.sgi
+CXXFLAGS = -O
+LD = CC -n32 -LANG:std -I/usr/include/CC.sgi
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgicc64)
+# SGI
+CXX = CC -64 -I/usr/include/CC.sgi
+CXXFLAGS = -O
+LD = CC -64 -LANG:std -I/usr/include/CC.sgi
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgigcc)
+# SGI 6.x with gcc
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O -Wl,-u,__builtin_new -Wl,-u,__builtin_delete -Wl,-u,__nw__FUiPv
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgin32gcc)
+# SGI 6.x with gcc for n32 ABI
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O -L/usr/lib32 -Wl,-woff,134 -lgen
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgikcc)
+# SGI with KCC
+CXX = KCC -n32 --one_instantiation_per_object
+CXXFLAGS = -O
+LD = KCC -n32
+LDFLAGS = -O
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),alphagcc)
+# Alpha/OSF with gcc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -Wl,-expect_unresolved,* -shared
+endif
+
+ifeq ($(ARCH),alphakcc)
+# Alpha/OSF with kai compiler (not yet valid)
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O -fPIC
+LD = KCC
+LDFLAGS = -O
+SOFLAGS = -Wl,-expect_unresolved,* -shared
+endif
+
+ifeq ($(ARCH),alphacxx6)
+# Alpha/OSF with cxx6
+CXX = cxx
+CXXFLAGS = -O
+LD = cxx
+LDFLAGS = -O
+SOFLAGS = -shared -nocxxstd -Wl,-expect_unresolved,*,-msym
+endif
+
+ifeq ($(ARCH),linuxrh51)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxrh42)
+# Linux with gcc 2.7.2.x (RedHat 4.2)
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxdeb)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O1 -Wall -fPIC
+LD = g++
+LDFLAGS = -O1
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxdeb2ppc)
+# Debian/Linux on the PowerPC
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxsuse6)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxkcc)
+# Linux with the KAI compiler
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O -fPIC +K0
+LD = KCC
+LDFLAGS = -O $(shell $(ROOTCONFIG) --cflags)
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),linuxicc)
+# Linux with Intel icc compiler
+ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f1)
+ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+ifeq ($(ICC_MAJOR),8)
+ifneq ($(ICC_MINOR),0)
+CXXFLAGS += -wd1572
+endif
+endif
+endif
+
+ifeq ($(ARCH),linuxppcgcc)
+# MkLinux with gcc and glibc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64gcc)
+# Itanium Linux with gcc 2.9x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64sgi)
+# Itanium Linux with sgiCC
+CXX = sgiCC
+CXXFLAGS = -O -Wall -fPIC
+LD = gsgiCC
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64ecc)
+# Itanium Linux with Intel icc (was ecc)
+ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f1)
+ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+ifeq ($(ICC_MAJOR),8)
+ifneq ($(ICC_MINOR),0)
+CXXFLAGS += -wd1572
+endif
+endif
+endif
+
+ifeq ($(ARCH),linuxx8664gcc)
+# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxppc64gcc)
+# PPC64 Linux with gcc 3.x
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxx8664icc)
+# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476 -wd1572
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxalphagcc)
+# Alpha Linux with gcc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxarm)
+# ARM Linux with egcs
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),mklinux)
+# MkLinux with libc5
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),freebsd)
+# FreeBSD with libc5
+CXX = g++
+CXXFLAGS = -O -pipe -W -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),freebsd4)
+# FreeBSD with glibc
+CXXFLAGS += -W -Wall -fPIC
+LD = $(CXX)
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),freebsd5)
+# FreeBSD with glibc
+CXXFLAGS += -W -Wall -fPIC
+LD = $(CXX)
+endif
+
+ifeq ($(ARCH),openbsd)
+# OpenBSD with libc
+CXX = g++
+CXXFLAGS = -O -pipe -W -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),macosx)
+# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = c++
+CXXFLAGS = -O2 -pipe -Wall -W -Woverloaded-virtual
+LDFLAGS = -O2 -bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
+else
+ifeq ($(MACOSX_MINOR),3)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.3 c++
+else
+UNDEFOPT = suppress
+LD = c++
+endif
+endif
+SOFLAGS = -dynamiclib -single_module -undefined $(UNDEFOPT)
+endif
+
+ifeq ($(ARCH),macosxicc)
+# MacOS X with Intel icc compiler
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LDFLAGS = -O
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 icpc
+endif
+SOFLAGS = -dynamiclib -single_module -Xlinker -undefined dynamic_lookup
+endif
+
+ifeq ($(ARCH),macosx64)
+# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
+# Only specific option (-m64) comes from root-config
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = c++
+CXXFLAGS = -O2 -pipe -Wall -W -Woverloaded-virtual
+LDFLAGS = -O2 -bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
+SOFLAGS = -dynamiclib -single_module -undefined dynamic_lookup
+endif
+
+ifeq ($(ARCH),macosxxlc)
+# MacOS X with IBM xlC compiler
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = xlC
+CXXFLAGS = -O
+LDFLAGS = -O -Wl,-bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 xlC
+else
+ifeq ($(MACOSX_MINOR),3)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.3 xlC
+else
+UNDEFOPT = suppress
+LD = xlC
+endif
+endif
+SOFLAGS = -qmkshrobj -single_module -undefined $(UNDEFOPT)
+endif
+
+ifeq ($(ARCH),win32)
+# Windows with the VC++ compiler
+VC_MAJOR := $(shell unset VS_UNICODE_OUTPUT; cl.exe 2>&1 | awk '{ if (NR==1) print $$8 }' | \
+ cut -d'.' -f1)
+ObjSuf = obj
+SrcSuf = cxx
+ExeSuf = .exe
+DllSuf = dll
+OutPutOpt = -out:
+CXX = cl
+CXXOPT = -O2
+#CXXOPT = -Z7
+CXXFLAGS = $(CXXOPT) -nologo -I$(shell $(ROOTCONFIG) --incdir) -FIw32pragma.h
+LD = link
+LDOPT = -opt:ref
+#LDOPT = -debug
+LDFLAGS = $(LDOPT) -pdb:none -nologo
+SOFLAGS = -DLL
+
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),win32old)
+# Windows with the VC++ compiler
+ObjSuf = obj
+SrcSuf = cxx
+ExeSuf = .exe
+DllSuf = dll
+OutPutOpt = -out:
+CXX = cl
+CXXOPT = -O2
+#CXXOPT = -Z7
+CXXFLAGS = $(CXXOPT) -G5 -GR -GX -MD -DWIN32 -D_WINDOWS -nologo \
+ -DVISUAL_CPLUSPLUS -D_X86_=1 -D_DLL
+LD = link
+LDOPT = -opt:ref
+#LDOPT = -debug
+LDFLAGS = $(LDOPT) -pdb:none -nologo
+SOFLAGS = -DLL
+
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),win32gcc)
+# Windows with gcc
+DllSuf = dll
+ExeSuf = .exe
+CXX = g++
+CXXFLAGS = -O -pipe -Wall -Woverloaded-virtual -I/usr/X11R6/include
+LD = g++
+LDFLAGS = -O -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc \
+ -L/usr/X11R6/lib
+SOFLAGS = -shared -D_DLL -Wl,--export-all-symbols
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(CXX),)
+$(error $(ARCH) invalid architecture)
+endif
+
+#CXXFLAGS += $(ROOTCFLAGS) -I/home/odjuvsla/Workspace/alice/AliRootDev/RAW -I/home/odjuvsla/Workspace/alice/AliRootDev/include
+CXXFLAGS += $(ROOTCFLAGS) -I$(ALICE_ROOT)/RAW -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/PHOS -I$(ALIHLT_BASEDIR)/PHOS -I$(ALIHLT_BASEDIR)/BASE
+LDFLAGS += $(ROOTLDFLAGS)
+LIBS = $(ROOTLIBS) $(SYSLIBS)
+GLIBS = $(ROOTGLIBS) $(SYSLIBS)
+ROOTLIBS = -L$(ROOTSYS)/lib -lXMLIO -lMinuit -lGeom -lVMC -lEG
+ALILIBS = -L$(ALICE_ROOT)/lib/tgt_linux
+HLTLIBS = -L$(ALIHLT_LIBDIR)
+#ALILIBS = -L/home/odjuvsla/Workspace/alice/AliRootDev/lib/tgt_linux -lESD -lCDB
+
+GLIBS = $(ROOTGLIBS) $(SYSLIBS)
--- /dev/null
+
+#include "TTree.h"
+#include "TChain.h"
+#include "TClonesArray.h"
+#include "AliHLTPHOSDebugRawDigit.h"
+#include <iostream>
+#include "TH2D.h"
+#include "TFile.h"
+
+using namespace std;
+
+Int_t deadChannelMap(const char*);
+
+int main(int argc, const char** argv)
+{
+ deadChannelMap(argv[1]);
+ return 0;
+}
+
+Int_t deadChannelMap(const char* runNb)
+{
+ char filepath [50];
+ char outfile [50];
+
+ TChain *tree= new TChain("digitTree");
+
+ sprintf(filepath, "/tmp/phoshlt/analysis/data/run%s/*", runNb);
+ sprintf(outfile, "/home/phoshlt/analysis/output/run%s/deadMap.root", runNb);
+ tree->Add(filepath);
+
+ TClonesArray *digArray = new TClonesArray("AliHLTPHOSDebugRawDigit" , 100);
+ //tree->SetBranchAddress("digits", &digArray);
+ tree->SetBranchAddress("DebugRawDigit", &digArray);
+ TH2D *deadMap = new TH2D("deadMap", "Dead Channel Map", 64, 0, 63, 56, 0, 55);
+ AliHLTPHOSDebugRawDigit *digit = 0;
+
+ cout << endl << "Chain with " << tree->GetEntries() << " events...\n";
+ for(int k = 0; k < tree->GetEntries(); k++)
+ {
+ tree->GetEntry(k);
+ // cout << " Event with " << digArray->GetEntriesFast() << " digits\n";
+ for(int j = 0; j < digArray->GetEntriesFast(); j++)
+ {
+ digit = (AliHLTPHOSDebugRawDigit*)digArray->At(j);
+ for(int i = 0; i < 70; i++)
+ {
+ if((digit->GetRawData())[i] > 55)
+ {
+ if((digit->GetRawData())[i+1] > 55)
+ {
+ if((digit->GetRawData())[i+2] > 55)
+ {
+ if((digit->GetRawData())[i+3] > 55)
+ {
+ deadMap->SetBinContent(digit->GetX(), digit->GetZ(), 10);
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+ cout << "Printing file...";
+
+
+ TFile *file = new TFile(outfile,"recreate");
+ deadMap->Write();
+ file->Close();
+ delete file;
+ file = 0;
+ cout << "Done!\n";
+
+
+
+ return 0;
+}
+
+
--- /dev/null
+
+Int_t noise(int runNbHV, int runNbNoHV)
+{
+ char filepath [50];
+
+ sprintf(filepath, "/opt/HLT-public/rundir/histo_outdata/run%d_RMSHistogram.root", runNbHV);
+ TFile *infile = TFile::Open(filepath);
+
+ TH2F *RMSHVHist = infile->Get("RMSHGMapHist");
+ //infile->Close();
+
+ sprintf(filepath, "/opt/HLT-public/rundir/histo_outdata/run%d_RMSHistogram.root", runNbNoHV);
+ TFile *infile2 = TFile::Open(filepath);
+ TH2F *RMSNoHVHist = infile2->Get("RMSHGMapHist");
+ // infile->Close();
+
+ TH2F *DiffHist = new TH2F("diffHist", "Map", 64, 0 , 63, 56, 0, 55);
+
+ for(Int_t x = 0; x < 64; x++)
+ {
+ for(Int_t z = 0; z < 56; z++)
+ {
+ if(RMSNoHVHist->GetBinContent(x, z) > 3)
+ {
+ if((RMSNoHVHist->GetBinContent(x, z) - RMSHVHist->GetBinContent(x, z)) < 1 && (RMSNoHVHist->GetBinContent(x, z) - RMSHVHist->GetBinContent(x, z)) > -1)
+ {
+ DiffHist->SetBinContent(x, z, 10);
+ }
+ }
+ }
+ }
+
+ TFile *outfile = TFile::Open("hist.root","RECREATE");
+ DiffHist->Write();
+ outfile->Close();
+ // TCanvas *c1 = new TCanvas("c1");
+ // RMSHVHist->Draw();
+ //TCanvas *c2 = new TCanvas("c2");
+ // RMSNoHVHist->Draw();
+ // TCanvas *c3 = new TCanvas("c3");
+ DiffHist->Draw();
+
+
+ return 0;
+}
+
+
--- /dev/null
+include Makefile.arch
+
+
+MAINO = rawAna.$(ObjSuf)
+
+MAINS = rawAna.$(SrcSuf)
+
+MAIN = rawAna$(ExeSuf)
+
+
+OBJS = $(MAINO)
+PROGRAMS = $(MAIN)
+
+
+.SUFFIXES: .$(SrcSuf) .$(ObjSuf) .$(DllSuf)
+
+all: $(PROGRAMS)
+
+
+$(MAIN): $(MAINO)
+ $(LD) $(LDFLAGS) $^ $(LIBS) $(GLIBS) $(ALILIBS) -lTreePlayer -lMathCore -lThread -lpthread $(HLTLIBS) -lHLTbase -lAliHLTUtil -lAliHLTPHOS $(OutPutOpt)$(MAIN)
+ @echo "$@ done"
+# $(LD) $(LDFLAGS) $^ $(LIBS) $(GLIBS) -lTreePlayer -lMathCore -lThread -lpthread $(OutPutOpt)$(MAIN)
+
+
+
+clean:
+ @rm -f $(OBJS) core
+
+distclean: clean
+ @rm -f $(PROGRAMS) *Dict.* *.def *.exp \
+ *.root *.ps *.so *.lib *.dll *.d .def so_locations
+ @rm -rf cxx_repository
+
+.SUFFIXES: .$(SrcSuf)
+
+
+.$(SrcSuf).$(ObjSuf):
+ $(CXX) $(CXXFLAGS) -c $<
--- /dev/null
+# -*- mode: makefile -*-
+#
+# Makefile containing platform dependencies for ROOT based projects.
+#
+# Copyright (c) 2000 Rene Brun and Fons Rademakers
+#
+# Author: Fons Rademakers, 29/2/2000
+
+ROOTCONFIG := root-config
+
+ARCH := $(shell $(ROOTCONFIG) --arch)
+PLATFORM := $(shell $(ROOTCONFIG) --platform)
+
+CXX =
+ObjSuf = o
+SrcSuf = cxx
+ExeSuf =
+DllSuf = so
+OutPutOpt = -o # keep whitespace after "-o"
+
+ROOTCFLAGS := $(shell $(ROOTCONFIG) --cflags)
+ROOTLDFLAGS := $(shell $(ROOTCONFIG) --ldflags)
+ROOTLIBS := $(shell $(ROOTCONFIG) --libs)
+ROOTGLIBS := $(shell $(ROOTCONFIG) --glibs)
+HASTHREAD := $(shell $(ROOTCONFIG) --has-thread)
+
+ifeq ($(ARCH),linux)
+# Linux with egcs, gcc 2.9x, gcc 3.x (>= RedHat 5.2)
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+#CXXFLAGS = -Wall -fPIC -g
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),hpuxacc)
+# HP-UX 10.x with aCC
+CXX = aCC
+CXXFLAGS = -O +Z
+LD = aCC
+LDFLAGS = -O -z
+SOFLAGS = -b
+endif
+
+ifeq ($(ARCH),hpuxia64acc)
+# HP-UX 11i 1.5 (IA-64) with aCC
+CXX = aCC
+CXXFLAGS = +DD64 -O +Z
+LD = aCC
+LDFLAGS = +DD64 -O -z
+SOFLAGS = -b
+endif
+
+ifeq ($(ARCH),hpuxgcc)
+# HP-UX 10.x with g++
+CXXFLAGS = -O -fPIC
+CXX = g++
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -fPIC -shared
+endif
+
+ifeq ($(ARCH),hurddeb)
+# GNU/Hurd
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),aix)
+# IBM AIX xlC 4.x
+CXX = xlC
+CXXFLAGS = -O
+LD = xlC
+LDFLAGS = -O
+SOFLAGS =
+DllSuf = a
+endif
+
+ifeq ($(ARCH),aix5)
+# IBM AIX xlC 5.x
+CXX = xlC
+CXXFLAGS = -O
+LD = xlC
+LDFLAGS = -O
+SOFLAGS =
+DllSuf = a
+endif
+
+ifeq ($(ARCH),aixgcc)
+# IBM AIX with GCC
+CXX = g++
+CXXFLAGS = -O
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+DllSuf = a
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),solaris)
+# Solaris CC
+CXX = /opt/SUNWspro/bin/CC
+CXXFLAGS = -O -KPIC
+LD = /opt/SUNWspro/bin/CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),solarisCC5)
+# Solaris CC 5.0
+CXX = CC
+CXXFLAGS = -O -KPIC
+LD = CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),solarisgcc)
+# Solaris gcc
+CXX = g++
+CXXFLAGS = -O -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),solariskcc)
+# Solaris kcc
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O4 -KPIC
+LD = KCC
+LDFLAGS = -O4
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),solarisx86)
+# Solaris CC on Intel
+CXX = CC
+CXXFLAGS = -O -KPIC
+LD = CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),sgicc)
+# SGI
+CXX = CC -n32 -I/usr/include/CC.sgi
+CXXFLAGS = -O
+LD = CC -n32 -LANG:std -I/usr/include/CC.sgi
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgicc64)
+# SGI
+CXX = CC -64 -I/usr/include/CC.sgi
+CXXFLAGS = -O
+LD = CC -64 -LANG:std -I/usr/include/CC.sgi
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgigcc)
+# SGI 6.x with gcc
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O -Wl,-u,__builtin_new -Wl,-u,__builtin_delete -Wl,-u,__nw__FUiPv
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgin32gcc)
+# SGI 6.x with gcc for n32 ABI
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O -L/usr/lib32 -Wl,-woff,134 -lgen
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgikcc)
+# SGI with KCC
+CXX = KCC -n32 --one_instantiation_per_object
+CXXFLAGS = -O
+LD = KCC -n32
+LDFLAGS = -O
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),alphagcc)
+# Alpha/OSF with gcc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -Wl,-expect_unresolved,* -shared
+endif
+
+ifeq ($(ARCH),alphakcc)
+# Alpha/OSF with kai compiler (not yet valid)
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O -fPIC
+LD = KCC
+LDFLAGS = -O
+SOFLAGS = -Wl,-expect_unresolved,* -shared
+endif
+
+ifeq ($(ARCH),alphacxx6)
+# Alpha/OSF with cxx6
+CXX = cxx
+CXXFLAGS = -O
+LD = cxx
+LDFLAGS = -O
+SOFLAGS = -shared -nocxxstd -Wl,-expect_unresolved,*,-msym
+endif
+
+ifeq ($(ARCH),linuxrh51)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxrh42)
+# Linux with gcc 2.7.2.x (RedHat 4.2)
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxdeb)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O1 -Wall -fPIC
+LD = g++
+LDFLAGS = -O1
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxdeb2ppc)
+# Debian/Linux on the PowerPC
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxsuse6)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxkcc)
+# Linux with the KAI compiler
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O -fPIC +K0
+LD = KCC
+LDFLAGS = -O $(shell $(ROOTCONFIG) --cflags)
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),linuxicc)
+# Linux with Intel icc compiler
+ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f1)
+ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+ifeq ($(ICC_MAJOR),8)
+ifneq ($(ICC_MINOR),0)
+CXXFLAGS += -wd1572
+endif
+endif
+endif
+
+ifeq ($(ARCH),linuxppcgcc)
+# MkLinux with gcc and glibc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64gcc)
+# Itanium Linux with gcc 2.9x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64sgi)
+# Itanium Linux with sgiCC
+CXX = sgiCC
+CXXFLAGS = -O -Wall -fPIC
+LD = gsgiCC
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64ecc)
+# Itanium Linux with Intel icc (was ecc)
+ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f1)
+ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+ifeq ($(ICC_MAJOR),8)
+ifneq ($(ICC_MINOR),0)
+CXXFLAGS += -wd1572
+endif
+endif
+endif
+
+ifeq ($(ARCH),linuxx8664gcc)
+# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxppc64gcc)
+# PPC64 Linux with gcc 3.x
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxx8664icc)
+# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476 -wd1572
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxalphagcc)
+# Alpha Linux with gcc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxarm)
+# ARM Linux with egcs
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),mklinux)
+# MkLinux with libc5
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),freebsd)
+# FreeBSD with libc5
+CXX = g++
+CXXFLAGS = -O -pipe -W -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),freebsd4)
+# FreeBSD with glibc
+CXXFLAGS += -W -Wall -fPIC
+LD = $(CXX)
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),freebsd5)
+# FreeBSD with glibc
+CXXFLAGS += -W -Wall -fPIC
+LD = $(CXX)
+endif
+
+ifeq ($(ARCH),openbsd)
+# OpenBSD with libc
+CXX = g++
+CXXFLAGS = -O -pipe -W -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),macosx)
+# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = c++
+CXXFLAGS = -O2 -pipe -Wall -W -Woverloaded-virtual
+LDFLAGS = -O2 -bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
+else
+ifeq ($(MACOSX_MINOR),3)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.3 c++
+else
+UNDEFOPT = suppress
+LD = c++
+endif
+endif
+SOFLAGS = -dynamiclib -single_module -undefined $(UNDEFOPT)
+endif
+
+ifeq ($(ARCH),macosxicc)
+# MacOS X with Intel icc compiler
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LDFLAGS = -O
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 icpc
+endif
+SOFLAGS = -dynamiclib -single_module -Xlinker -undefined dynamic_lookup
+endif
+
+ifeq ($(ARCH),macosx64)
+# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
+# Only specific option (-m64) comes from root-config
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = c++
+CXXFLAGS = -O2 -pipe -Wall -W -Woverloaded-virtual
+LDFLAGS = -O2 -bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
+SOFLAGS = -dynamiclib -single_module -undefined dynamic_lookup
+endif
+
+ifeq ($(ARCH),macosxxlc)
+# MacOS X with IBM xlC compiler
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = xlC
+CXXFLAGS = -O
+LDFLAGS = -O -Wl,-bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 xlC
+else
+ifeq ($(MACOSX_MINOR),3)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.3 xlC
+else
+UNDEFOPT = suppress
+LD = xlC
+endif
+endif
+SOFLAGS = -qmkshrobj -single_module -undefined $(UNDEFOPT)
+endif
+
+ifeq ($(ARCH),win32)
+# Windows with the VC++ compiler
+VC_MAJOR := $(shell unset VS_UNICODE_OUTPUT; cl.exe 2>&1 | awk '{ if (NR==1) print $$8 }' | \
+ cut -d'.' -f1)
+ObjSuf = obj
+SrcSuf = cxx
+ExeSuf = .exe
+DllSuf = dll
+OutPutOpt = -out:
+CXX = cl
+CXXOPT = -O2
+#CXXOPT = -Z7
+CXXFLAGS = $(CXXOPT) -nologo -I$(shell $(ROOTCONFIG) --incdir) -FIw32pragma.h
+LD = link
+LDOPT = -opt:ref
+#LDOPT = -debug
+LDFLAGS = $(LDOPT) -pdb:none -nologo
+SOFLAGS = -DLL
+
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),win32old)
+# Windows with the VC++ compiler
+ObjSuf = obj
+SrcSuf = cxx
+ExeSuf = .exe
+DllSuf = dll
+OutPutOpt = -out:
+CXX = cl
+CXXOPT = -O2
+#CXXOPT = -Z7
+CXXFLAGS = $(CXXOPT) -G5 -GR -GX -MD -DWIN32 -D_WINDOWS -nologo \
+ -DVISUAL_CPLUSPLUS -D_X86_=1 -D_DLL
+LD = link
+LDOPT = -opt:ref
+#LDOPT = -debug
+LDFLAGS = $(LDOPT) -pdb:none -nologo
+SOFLAGS = -DLL
+
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),win32gcc)
+# Windows with gcc
+DllSuf = dll
+ExeSuf = .exe
+CXX = g++
+CXXFLAGS = -O -pipe -Wall -Woverloaded-virtual -I/usr/X11R6/include
+LD = g++
+LDFLAGS = -O -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc \
+ -L/usr/X11R6/lib
+SOFLAGS = -shared -D_DLL -Wl,--export-all-symbols
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(CXX),)
+$(error $(ARCH) invalid architecture)
+endif
+
+#CXXFLAGS += $(ROOTCFLAGS) -I/home/odjuvsla/Workspace/alice/AliRootDev/RAW -I/home/odjuvsla/Workspace/alice/AliRootDev/include
+CXXFLAGS += $(ROOTCFLAGS) -I$(ALICE_ROOT)/RAW -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/PHOS -I$(ALIHLT_BASEDIR)/PHOS -I$(ALIHLT_BASEDIR)/BASE
+LDFLAGS += $(ROOTLDFLAGS)
+LIBS = $(ROOTLIBS) $(SYSLIBS)
+GLIBS = $(ROOTGLIBS) $(SYSLIBS)
+ROOTLIBS = -L$(ROOTSYS)/lib -lXMLIO -lMinuit -lGeom -lVMC -lEG
+ALILIBS = -L$(ALICE_ROOT)/lib/tgt_linux
+HLTLIBS = -L$(ALIHLT_LIBDIR)
+#ALILIBS = -L/home/odjuvsla/Workspace/alice/AliRootDev/lib/tgt_linux -lESD -lCDB
+
+GLIBS = $(ROOTGLIBS) $(SYSLIBS)
--- /dev/null
+
+#include "TTree.h"
+#include "TChain.h"
+#include "TClonesArray.h"
+#include "AliHLTPHOSDebugRawDigit.h"
+#include <iostream>
+
+using namespace std;
+
+Int_t anaRaw();
+
+int main()
+{
+ anaRaw();
+ return 0;
+}
+
+Int_t anaRaw()
+{
+
+
+
+ TClonesArray *digArray = new TClonesArray("AliHLTPHOSDebugRawDigit" , 100);
+ TChain *tree= new TChain("digitTree");
+ AliHLTPHOSDebugRawDigit *digit = 0;
+
+ tree->Add("/tmp/phoshlt/analysis/data/run7800/*");
+
+ tree->SetBranchAddress("DebugRawDigit", &digArray);
+ cout << endl << "Entries in tree: " << tree->GetEntries() << endl;
+
+ for(int k = 0; k < tree->GetEntries(); k++)
+ {
+ tree->GetEntry(k);
+ for(int j = 0; j < digArray->GetEntriesFast(); j++)
+ {
+ digit = (AliHLTPHOSDebugRawDigit*)digArray->At(j);
+
+ // if((digit->GetAmplitude() - digit->GetBaseline()) < 50 && (digit->GetAmplitude() - digit->GetBaseline()) > 20)
+ if(digit->GetBaseline() > 70)
+ {
+ cout << "Digit energy: " << digit->GetAmplitude() << endl;
+ cout << "Baseline: " << digit->GetBaseline() << endl;
+ /*
+ if(digit->GetCrazyness())
+ {
+ cout << "Crazyness: " << digit->GetCrazyness() << endl;
+ for(int i = 0; i < 70; i++)
+ {
+ cout << (digit->GetRawData())[i] << endl;
+ }
+ }
+ */
+ }
+ }
+ }
+
+ return 0;
+}
+
+
--- /dev/null
+include Makefile.arch
+
+
+MAINO = rawDisplay.$(ObjSuf)
+
+MAINS = rawDisplay.$(SrcSuf)
+
+MAIN = rawDisplay$(ExeSuf)
+
+
+OBJS = $(MAINO)
+PROGRAMS = $(MAIN)
+
+
+.SUFFIXES: .$(SrcSuf) .$(ObjSuf) .$(DllSuf)
+
+all: $(PROGRAMS)
+
+
+$(MAIN): $(MAINO)
+ $(LD) $(LDFLAGS) $^ $(LIBS) $(GLIBS) $(ALILIBS) -lTreePlayer -lMathCore -lThread -lpthread $(HLTLIBS) -lHLTbase -lAliHLTUtil -lAliHLTPHOS $(OutPutOpt)$(MAIN)
+ @echo "$@ done"
+# $(LD) $(LDFLAGS) $^ $(LIBS) $(GLIBS) -lTreePlayer -lMathCore -lThread -lpthread $(OutPutOpt)$(MAIN)
+
+
+
+clean:
+ @rm -f $(OBJS) core
+
+distclean: clean
+ @rm -f $(PROGRAMS) *Dict.* *.def *.exp \
+ *.root *.ps *.so *.lib *.dll *.d .def so_locations
+ @rm -rf cxx_repository
+
+.SUFFIXES: .$(SrcSuf)
+
+
+.$(SrcSuf).$(ObjSuf):
+ $(CXX) $(CXXFLAGS) -c $<
--- /dev/null
+# -*- mode: makefile -*-
+#
+# Makefile containing platform dependencies for ROOT based projects.
+#
+# Copyright (c) 2000 Rene Brun and Fons Rademakers
+#
+# Author: Fons Rademakers, 29/2/2000
+
+ROOTCONFIG := root-config
+
+ARCH := $(shell $(ROOTCONFIG) --arch)
+PLATFORM := $(shell $(ROOTCONFIG) --platform)
+
+CXX =
+ObjSuf = o
+SrcSuf = cxx
+ExeSuf =
+DllSuf = so
+OutPutOpt = -o # keep whitespace after "-o"
+
+ROOTCFLAGS := $(shell $(ROOTCONFIG) --cflags)
+ROOTLDFLAGS := $(shell $(ROOTCONFIG) --ldflags)
+ROOTLIBS := $(shell $(ROOTCONFIG) --libs)
+ROOTGLIBS := $(shell $(ROOTCONFIG) --glibs)
+HASTHREAD := $(shell $(ROOTCONFIG) --has-thread)
+
+ifeq ($(ARCH),linux)
+# Linux with egcs, gcc 2.9x, gcc 3.x (>= RedHat 5.2)
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+#CXXFLAGS = -Wall -fPIC -g
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),hpuxacc)
+# HP-UX 10.x with aCC
+CXX = aCC
+CXXFLAGS = -O +Z
+LD = aCC
+LDFLAGS = -O -z
+SOFLAGS = -b
+endif
+
+ifeq ($(ARCH),hpuxia64acc)
+# HP-UX 11i 1.5 (IA-64) with aCC
+CXX = aCC
+CXXFLAGS = +DD64 -O +Z
+LD = aCC
+LDFLAGS = +DD64 -O -z
+SOFLAGS = -b
+endif
+
+ifeq ($(ARCH),hpuxgcc)
+# HP-UX 10.x with g++
+CXXFLAGS = -O -fPIC
+CXX = g++
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -fPIC -shared
+endif
+
+ifeq ($(ARCH),hurddeb)
+# GNU/Hurd
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),aix)
+# IBM AIX xlC 4.x
+CXX = xlC
+CXXFLAGS = -O
+LD = xlC
+LDFLAGS = -O
+SOFLAGS =
+DllSuf = a
+endif
+
+ifeq ($(ARCH),aix5)
+# IBM AIX xlC 5.x
+CXX = xlC
+CXXFLAGS = -O
+LD = xlC
+LDFLAGS = -O
+SOFLAGS =
+DllSuf = a
+endif
+
+ifeq ($(ARCH),aixgcc)
+# IBM AIX with GCC
+CXX = g++
+CXXFLAGS = -O
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+DllSuf = a
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),solaris)
+# Solaris CC
+CXX = /opt/SUNWspro/bin/CC
+CXXFLAGS = -O -KPIC
+LD = /opt/SUNWspro/bin/CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),solarisCC5)
+# Solaris CC 5.0
+CXX = CC
+CXXFLAGS = -O -KPIC
+LD = CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),solarisgcc)
+# Solaris gcc
+CXX = g++
+CXXFLAGS = -O -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),solariskcc)
+# Solaris kcc
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O4 -KPIC
+LD = KCC
+LDFLAGS = -O4
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),solarisx86)
+# Solaris CC on Intel
+CXX = CC
+CXXFLAGS = -O -KPIC
+LD = CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),sgicc)
+# SGI
+CXX = CC -n32 -I/usr/include/CC.sgi
+CXXFLAGS = -O
+LD = CC -n32 -LANG:std -I/usr/include/CC.sgi
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgicc64)
+# SGI
+CXX = CC -64 -I/usr/include/CC.sgi
+CXXFLAGS = -O
+LD = CC -64 -LANG:std -I/usr/include/CC.sgi
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgigcc)
+# SGI 6.x with gcc
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O -Wl,-u,__builtin_new -Wl,-u,__builtin_delete -Wl,-u,__nw__FUiPv
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgin32gcc)
+# SGI 6.x with gcc for n32 ABI
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O -L/usr/lib32 -Wl,-woff,134 -lgen
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgikcc)
+# SGI with KCC
+CXX = KCC -n32 --one_instantiation_per_object
+CXXFLAGS = -O
+LD = KCC -n32
+LDFLAGS = -O
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),alphagcc)
+# Alpha/OSF with gcc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -Wl,-expect_unresolved,* -shared
+endif
+
+ifeq ($(ARCH),alphakcc)
+# Alpha/OSF with kai compiler (not yet valid)
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O -fPIC
+LD = KCC
+LDFLAGS = -O
+SOFLAGS = -Wl,-expect_unresolved,* -shared
+endif
+
+ifeq ($(ARCH),alphacxx6)
+# Alpha/OSF with cxx6
+CXX = cxx
+CXXFLAGS = -O
+LD = cxx
+LDFLAGS = -O
+SOFLAGS = -shared -nocxxstd -Wl,-expect_unresolved,*,-msym
+endif
+
+ifeq ($(ARCH),linuxrh51)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxrh42)
+# Linux with gcc 2.7.2.x (RedHat 4.2)
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxdeb)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O1 -Wall -fPIC
+LD = g++
+LDFLAGS = -O1
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxdeb2ppc)
+# Debian/Linux on the PowerPC
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxsuse6)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxkcc)
+# Linux with the KAI compiler
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O -fPIC +K0
+LD = KCC
+LDFLAGS = -O $(shell $(ROOTCONFIG) --cflags)
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),linuxicc)
+# Linux with Intel icc compiler
+ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f1)
+ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+ifeq ($(ICC_MAJOR),8)
+ifneq ($(ICC_MINOR),0)
+CXXFLAGS += -wd1572
+endif
+endif
+endif
+
+ifeq ($(ARCH),linuxppcgcc)
+# MkLinux with gcc and glibc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64gcc)
+# Itanium Linux with gcc 2.9x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64sgi)
+# Itanium Linux with sgiCC
+CXX = sgiCC
+CXXFLAGS = -O -Wall -fPIC
+LD = gsgiCC
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64ecc)
+# Itanium Linux with Intel icc (was ecc)
+ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f1)
+ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+ifeq ($(ICC_MAJOR),8)
+ifneq ($(ICC_MINOR),0)
+CXXFLAGS += -wd1572
+endif
+endif
+endif
+
+ifeq ($(ARCH),linuxx8664gcc)
+# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxppc64gcc)
+# PPC64 Linux with gcc 3.x
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxx8664icc)
+# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476 -wd1572
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxalphagcc)
+# Alpha Linux with gcc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxarm)
+# ARM Linux with egcs
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),mklinux)
+# MkLinux with libc5
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),freebsd)
+# FreeBSD with libc5
+CXX = g++
+CXXFLAGS = -O -pipe -W -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),freebsd4)
+# FreeBSD with glibc
+CXXFLAGS += -W -Wall -fPIC
+LD = $(CXX)
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),freebsd5)
+# FreeBSD with glibc
+CXXFLAGS += -W -Wall -fPIC
+LD = $(CXX)
+endif
+
+ifeq ($(ARCH),openbsd)
+# OpenBSD with libc
+CXX = g++
+CXXFLAGS = -O -pipe -W -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),macosx)
+# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = c++
+CXXFLAGS = -O2 -pipe -Wall -W -Woverloaded-virtual
+LDFLAGS = -O2 -bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
+else
+ifeq ($(MACOSX_MINOR),3)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.3 c++
+else
+UNDEFOPT = suppress
+LD = c++
+endif
+endif
+SOFLAGS = -dynamiclib -single_module -undefined $(UNDEFOPT)
+endif
+
+ifeq ($(ARCH),macosxicc)
+# MacOS X with Intel icc compiler
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LDFLAGS = -O
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 icpc
+endif
+SOFLAGS = -dynamiclib -single_module -Xlinker -undefined dynamic_lookup
+endif
+
+ifeq ($(ARCH),macosx64)
+# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
+# Only specific option (-m64) comes from root-config
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = c++
+CXXFLAGS = -O2 -pipe -Wall -W -Woverloaded-virtual
+LDFLAGS = -O2 -bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
+SOFLAGS = -dynamiclib -single_module -undefined dynamic_lookup
+endif
+
+ifeq ($(ARCH),macosxxlc)
+# MacOS X with IBM xlC compiler
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = xlC
+CXXFLAGS = -O
+LDFLAGS = -O -Wl,-bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 xlC
+else
+ifeq ($(MACOSX_MINOR),3)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.3 xlC
+else
+UNDEFOPT = suppress
+LD = xlC
+endif
+endif
+SOFLAGS = -qmkshrobj -single_module -undefined $(UNDEFOPT)
+endif
+
+ifeq ($(ARCH),win32)
+# Windows with the VC++ compiler
+VC_MAJOR := $(shell unset VS_UNICODE_OUTPUT; cl.exe 2>&1 | awk '{ if (NR==1) print $$8 }' | \
+ cut -d'.' -f1)
+ObjSuf = obj
+SrcSuf = cxx
+ExeSuf = .exe
+DllSuf = dll
+OutPutOpt = -out:
+CXX = cl
+CXXOPT = -O2
+#CXXOPT = -Z7
+CXXFLAGS = $(CXXOPT) -nologo -I$(shell $(ROOTCONFIG) --incdir) -FIw32pragma.h
+LD = link
+LDOPT = -opt:ref
+#LDOPT = -debug
+LDFLAGS = $(LDOPT) -pdb:none -nologo
+SOFLAGS = -DLL
+
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),win32old)
+# Windows with the VC++ compiler
+ObjSuf = obj
+SrcSuf = cxx
+ExeSuf = .exe
+DllSuf = dll
+OutPutOpt = -out:
+CXX = cl
+CXXOPT = -O2
+#CXXOPT = -Z7
+CXXFLAGS = $(CXXOPT) -G5 -GR -GX -MD -DWIN32 -D_WINDOWS -nologo \
+ -DVISUAL_CPLUSPLUS -D_X86_=1 -D_DLL
+LD = link
+LDOPT = -opt:ref
+#LDOPT = -debug
+LDFLAGS = $(LDOPT) -pdb:none -nologo
+SOFLAGS = -DLL
+
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),win32gcc)
+# Windows with gcc
+DllSuf = dll
+ExeSuf = .exe
+CXX = g++
+CXXFLAGS = -O -pipe -Wall -Woverloaded-virtual -I/usr/X11R6/include
+LD = g++
+LDFLAGS = -O -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc \
+ -L/usr/X11R6/lib
+SOFLAGS = -shared -D_DLL -Wl,--export-all-symbols
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(CXX),)
+$(error $(ARCH) invalid architecture)
+endif
+
+#CXXFLAGS += $(ROOTCFLAGS) -I/home/odjuvsla/Workspace/alice/AliRootDev/RAW -I/home/odjuvsla/Workspace/alice/AliRootDev/include
+CXXFLAGS += $(ROOTCFLAGS) -I$(ALICE_ROOT)/RAW -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/PHOS -I$(ALIHLT_BASEDIR)/PHOS -I$(ALIHLT_BASEDIR)/BASE
+LDFLAGS += $(ROOTLDFLAGS)
+LIBS = $(ROOTLIBS) $(SYSLIBS)
+GLIBS = $(ROOTGLIBS) $(SYSLIBS)
+ROOTLIBS = -L$(ROOTSYS)/lib -lXMLIO -lMinuit -lGeom -lVMC -lEG
+ALILIBS = -L$(ALICE_ROOT)/lib/tgt_linux
+HLTLIBS = -L$(ALIHLT_LIBDIR)
+#ALILIBS = -L/home/odjuvsla/Workspace/alice/AliRootDev/lib/tgt_linux -lESD -lCDB
+
+GLIBS = $(ROOTGLIBS) $(SYSLIBS)
--- /dev/null
+Int_t rawDisplay(const char* runNb)
+{
+ gROOT->ProcessLine(".L ../digits/AliHLTPHOSAltroConfig.cxx++");
+ gROOT->ProcessLine(".L ../digits/AliHLTPHOSConfig.cxx++");
+ gROOT->ProcessLine(".L ../digits/AliHLTPHOSBase.cxx++");
+ gROOT->ProcessLine(".L ../digits/AliHLTPHOSDigit.cxx++");
+ char filepath [50];
+ char outfile [50];
+ Int_t *dataPtr = 0;
+ fUpperBound = 40;
+ fLowerBound = 20;
+ fStartTime = 10;
+ fZeroThreshold = 5;
+ AliHLTPHOSDigit *digitPtr = 0;
+
+ int flag = 0;
+ int count =0 ;
+ TChain *tree= new TChain("digitTree");
+
+ sprintf(filepath, "/tmp/phoshlt/aldaqpc019/hlt/run%s_digitTree_0.root", runNb);
+ cout << "Opening file: " << filepath << endl;
+ tree->Add(filepath);
+
+ TClonesArray *digArray = new TClonesArray("AliHLTPHOSDigit" , 100);
+ tree->SetBranchAddress("Digit", &digArray);
+ TH1I *rawHist = new TH1I("rawHist", "Raw display", 70, 0, 69);
+
+ TH1I *rawHist2 = new TH1I("rawHist2", "Raw display", 70, 0, 69);
+ cout << endl << "Tree with " << tree->GetEntries() << " events...\n";
+
+ for(int k = 0; k < tree->GetEntries(); k++)
+ {
+ tree->GetEntry(k);
+ for(int j = 0; j < digArray->GetEntriesFast(); j++)
+ {
+ digit = (AliHLTPHOSDigit*)digArray->At(j);
+ //if(digit->GetAmplitude() - digit->GetBaseline() > 200)
+ // if(digit->GetBaseline() && digit->GetCrazyness())
+ if(digit->GetCrazyness() == 1 && digit->GetAmplitude() > 200 && digit->GetRawData()[50] < 10 )
+ {
+ count++;
+ UInt_t *data = digit->GetRawData();
+ for(Int_t i = 0; i < 70; i++)
+ {
+ rawHist->SetBinContent(i, (digit->GetRawData())[i]);
+ }
+ if(count == 2)
+ {
+ cout << "x: "<< digit->GetX() << " - z: " << digit->GetZ() << endl;
+ for(int c = 0; c < digArray->GetEntriesFast(); c++)
+ {
+ d = (AliHLTPHOSDigit*)digArray->At(c);
+ if(d->GetX() == digit->GetX() && d->GetZ() == digit->GetZ() && digit->GetGain() != d->GetGain())
+ {
+ for(Int_t b = 0; b < 70; b++)
+ {
+ rawHist2->SetBinContent(b, (d->GetRawData())[b]);
+ }
+ }
+ }
+ finished = true;
+ break;
+ }
+ }
+ }
+ if(finished) break;
+ }
+ /*
+ for(int k = 0; k < tree->GetEntries(); k++)
+ {
+ if(flag)
+ break;
+ tree->GetEntry(k);
+ for(int j = 0; j < digArray->GetEntriesFast(); j++)
+ {
+ bool IsMIP = true;
+ digitPtr = (AliHLTPHOSDigit*)digArray->At(j);
+ dataPtr = digitPtr->GetRawData();
+ if(digitPtr->GetCrazyness() != 0)
+ {
+ // cout << "Crazy!\n";
+ continue;
+ }
+ if(digitPtr->GetAmplitude() < fLowerBound || digitPtr->GetAmplitude() > fUpperBound)
+ {
+ // cout << "Wrong amplitude!\n";
+ continue;
+ }
+
+ for(Int_t time = (Int_t)(digitPtr->GetTime() - 2); time < (digitPtr->GetTime() - 3); time++)
+ {
+ if((Float_t)dataPtr[time] < (digitPtr->GetAmplitude() - (digitPtr->GetAmplitude())/10))
+ {
+ // cout << "Not flat enough!\n";
+ IsMIP = false;
+ break;
+ }
+ }
+ if(!IsMIP)
+ continue;
+ for(Int_t sample = 0; sample < fStartTime; sample++)
+ {
+ if(dataPtr[sample] > fZeroThreshold || dataPtr[sample] < -fZeroThreshold)
+ {
+ // cout << endl << dataPtr[sample] << endl;
+ //cout << "Not stable baseline!\n";
+ IsMIP = false;
+ break;
+ }
+ }
+ if(dataPtr[(Int_t)fStartTime + 5] < fZeroThreshold)
+ {
+ // cout << "Not stable signal!\n";
+ IsMIP = false;
+ }
+ if(IsMIP)
+ {
+ cout << "Got MIP!\n";
+// fMIPCountEvent++;
+ // fChannelHistPtr->Fill(digitPtr->fX, digitPtr->fZ);
+
+ for(int a = 0; a < 70; a++)
+ {
+ rawHist->SetBinContent(a, (digitPtr->GetRawData())[a]);
+ }
+ flag++;
+ break;
+ }
+ }
+ }*/
+
+ rawHist->Draw();
+
+ TCanvas *can = new TCanvas("can");
+ rawHist2->Draw();
+
+ return 0;
+}
+
+
--- /dev/null
+
+#include "TTree.h"
+#include "TChain.h"
+#include "TClonesArray.h"
+#include "AliHLTPHOSDebugRawDigit.h"
+#include <iostream>
+#include "TH2D.h"
+#include "TFile.h"
+
+using namespace std;
+
+Int_t rawDisplay(const char*);
+
+int main(int argc, const char** argv)
+{
+ rawDisplay(argv[1]);
+ return 0;
+}
+
+Int_t rawDisplay(const char* runNb)
+{
+ char filepath [50];
+ char outfile [50];
+
+ bool finished = false;
+
+ TChain *tree= new TChain("digitTree");
+
+ sprintf(filepath, "/tmp/phoshlt/analysis/data/run%s/*", runNb);
+ sprintf(outfile, "/home/phoshlt/analysis/output/run%s/rawHist.root", runNb);
+ tree->Add(filepath);
+
+ TClonesArray *digArray = new TClonesArray("AliHLTPHOSDebugRawDigit" , 100);
+ tree->SetBranchAddress("DebugRawDigit", &digArray);
+ TH1I *rawHist = new TH1I("rawHist", "Raw display", 70, 0, 69);
+ AliHLTPHOSDebugRawDigit *digit = 0;
+
+ cout << endl << "Tree with " << tree->GetEntries() << " events...\n";
+ /*
+ for(int k = 0; k < tree->GetEntries(); k++)
+ {
+ tree->GetEntry(k);
+ for(int j = 0; j < digArray->GetEntriesFast(); j++)
+ {
+ digit = (AliHLTPHOSDebugRawDigit*)digArray->At(j);
+ //if(digit->GetAmplitude() - digit->GetBaseline() > 200)
+ // if(digit->GetBaseline() && digit->GetCrazyness())
+ if(digit->GetAmplitude() < 30 && digit->GetAmplitude() > 25 )
+ {
+ UInt_t *data = digit->GetRawData();
+ for(Int_t i = 0; i < 70; i++)
+ {
+ rawHist->SetBinContent(i, (digit->GetRawData())[i]);
+ }
+ finished = true;
+ break;
+ }
+ }
+ if(finished) break;
+
+ }*/
+
+ tree->GetEntry(3);
+ for(int j = 0; j < digArray->GetEntriesFast(); j++)
+ {
+ digit = (AliHLTPHOSDebugRawDigit*)digArray->At(j);
+ if(digit->GetAmplitude() > 60)
+ {
+ cout << digit->GetX() << " - " << digit->GetZ() << " - " << digit->GetAmplitude() << endl;
+ }
+ if(digit->GetX() == 57 && digit->GetZ() == 55 && digit->GetGain() == 0)
+ {
+ for(int a = 0; a < 70; a++)
+ {
+ cout << (digit->GetRawData())[a] << endl;
+ rawHist->SetBinContent(a, (digit->GetRawData())[a]);
+ }
+ }
+ }
+
+
+ cout << "Printing file...";
+
+
+ TFile *file = new TFile(outfile,"recreate");
+ rawHist->Write();
+ file->Close();
+ delete file;
+ file = 0;
+ cout << "Done!\n";
+
+ return 0;
+}
+
+
--- /dev/null
+
+#include "TTree.h"
+#include "TChain.h"
+#include "TClonesArray.h"
+#include "TH1F.h"
+#include "TFile.h"
+#include "AliHLTPHOSDebugRawDigit.h"
+#include <iostream>
+
+using namespace std;
+
+Int_t energySpectrum(const char*);
+
+int main(int argc, const char** argv)
+{
+ energySpectrum(argv[1]);
+ return 0;
+}
+
+Int_t energySpectrum(const char* filename)
+{
+
+
+ TH1F *spectrumHist = new TH1F("spectrumHist", "Digit energy spectrum", 200, 0, 200);
+ TClonesArray *digArray = new TClonesArray("AliHLTPHOSDebugRawDigit" , 100);
+ TChain *tree= new TChain("digitTree");
+ AliHLTPHOSDebugRawDigit *digit = 0;
+
+ tree->Add(filename);
+
+ tree->SetBranchAddress("DebugRawDigit", &digArray);
+ cout << endl << "Entries in tree: " << tree->GetEntries() << endl;
+
+ for(int k = 0; k < tree->GetEntries(); k++)
+ {
+ tree->GetEntry(k);
+ for(int j = 0; j < digArray->GetEntriesFast(); j++)
+ {
+ digit = (AliHLTPHOSDebugRawDigit*)digArray->At(j);
+ spectrumHist->Fill(digit->GetAmplitude());
+ }
+ }
+
+ spectrumHist->Draw();
+
+ return 0;
+}
+
+
--- /dev/null
+classfilename=$1
+
+classfilename_h=$classfilename.h
+classfilename_cxx=$classfilename.cxx
+classname=$classfilename
+
+if [ -a $classfilename_h ] || [ -a $classfilename_cxx ];then
+ echo ERROR, $classfilename_h and $classfilename_cxx allready exist, delelte them or rename the class you want to make
+else
+ echo creating new files $classfilename_h and $classfilename_cxx
+ printf "#ifndef " > $classfilename_h
+ classguard=${classfilename_h/.h/_H}
+
+ echo $classguard | tr "[:lower:]" "[:upper:]" >> $classfilename_h
+ printf "#define " >> $classfilename_h
+ echo $classguard | tr "[:lower:]" "[:upper:]" >> $classfilename_h
+
+ printf "\n" >>$classfilename_h
+
+ printf "/**************************************************************************\n" >> $classfilename_h
+ printf " * This file is property of and copyright by the Experimental Nuclear *\n" >> $classfilename_h
+ printf " * Physics Group, Dep. of Physics *\n" >> $classfilename_h
+ printf " * University of Oslo, Norway, 2007 *\n" >> $classfilename_h
+ printf " * *\n" >> $classfilename_h
+ printf " * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project.*\n" >> $classfilename_h
+ printf " * Contributors are mentioned in the code where appropriate. *\n" >> $classfilename_h
+ printf " * Please report bugs to perthi@fys.uio.no *\n" >> $classfilename_h
+ printf " * *\n" >> $classfilename_h
+ printf " * Permission to use, copy, modify and distribute this software and its *\n" >> $classfilename_h
+ printf " * documentation strictly for non-commercial purposes is hereby granted *\n" >> $classfilename_h
+ printf " * without fee, provided that the above copyright notice appears in all *\n" >> $classfilename_h
+ printf " * copies and that both the copyright notice and this permission notice *\n" >> $classfilename_h
+ printf " * appear in the supporting documentation. The authors make no claims *\n" >> $classfilename_h
+ printf " * about the suitability of this software for any purpose. It is *\n" >> $classfilename_h
+ printf " * provided \"as is\" without express or implied warranty. *\n" >> $classfilename_h
+ printf " **************************************************************************/\n" >> $classfilename_h
+
+ printf "\n\n\n" >>$classfilename_h
+ printf "class " >> $classfilename_h
+ printf " $classname\n{\n\t$classname();\n\tvirtual ~$classname();\n};\n\n#endif\n" >> $classfilename_h
+
+ printf "/**************************************************************************\n" > $classfilename_cxx
+ printf " * This file is property of and copyright by the Experimental Nuclear *\n" >> $classfilename_cxx
+ printf " * Physics Group, Dep. of Physics *\n" >> $classfilename_cxx
+ printf " * University of Oslo, Norway, 2007 *\n" >> $classfilename_cxx
+ printf " * *\n" >> $classfilename_cxx
+ printf " * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project.*\n" >> $classfilename_cxx
+ printf " * Contributors are mentioned in the code where appropriate. *\n" >> $classfilename_cxx
+ printf " * Please report bugs to perthi@fys.uio.no *\n" >> $classfilename_cxx
+ printf " * *\n" >> $classfilename_cxx
+ printf " * Permission to use, copy, modify and distribute this software and its *\n" >> $classfilename_cxx
+ printf " * documentation strictly for non-commercial purposes is hereby granted *\n" >> $classfilename_cxx
+ printf " * without fee, provided that the above copyright notice appears in all *\n" >> $classfilename_cxx
+ printf " * copies and that both the copyright notice and this permission notice *\n" >> $classfilename_cxx
+ printf " * appear in the supporting documentation. The authors make no claims *\n" >> $classfilename_cxx
+ printf " * about the suitability of this software for any purpose. It is *\n" >> $classfilename_cxx
+ printf " * provided \"as is\" without express or implied warranty. *\n" >> $classfilename_cxx
+ printf " **************************************************************************/\n" >> $classfilename_cxx
+ printf "#include \"$classfilename_h\"\n\n" >> $classfilename_cxx
+ printf "$classname::$classname()\n{\n\n}\n\n" >> $classfilename_cxx
+ printf "$classname::~$classname()\n{\n\n}\n\n" >> $classfilename_cxx
+
+ emacs $classfilename_h &
+ emacs $classfilename_cxx &
+
+fi
+
--- /dev/null
+include Makefile.arch
+
+
+MAINO = clusterCompare.$(ObjSuf)
+
+MAINS = clusterCompare.$(SrcSuf)
+
+MAIN = clusterCompare$(ExeSuf)
+
+
+OBJS = $(MAINO)
+PROGRAMS = $(MAIN)
+
+
+.SUFFIXES: .$(SrcSuf) .$(ObjSuf) .$(DllSuf)
+
+all: $(PROGRAMS)
+
+
+$(MAIN): $(MAINO)
+ $(LD) $(LDFLAGS) $^ $(LIBS) $(GLIBS) $(ALILIBS) -lTreePlayer -lMathCore -lThread -lpthread -L/home/odjuvsla/Workspace/alice/AliRoot/lib/tgt_linux -lRAWDatabase -lRAWDatarec -lRAWDatasim -lPHOSbase -lPHOSrec -lPHOSsim -lSTEER -lSTEERBase -lTPCbase -lAliHLTUtil -lAliHLTPHOS -lHLTbase -lHLTinterface $(OutPutOpt)$(MAIN)
+ @echo "$@ done"
+# $(LD) $(LDFLAGS) $^ $(LIBS) $(GLIBS) -lTreePlayer -lMathCore -lThread -lpthread $(OutPutOpt)$(MAIN)
+
+
+
+clean:
+ @rm -f $(OBJS) core
+
+distclean: clean
+ @rm -f $(PROGRAMS) *Dict.* *.def *.exp \
+ *.root *.ps *.so *.lib *.dll *.d .def so_locations
+ @rm -rf cxx_repository
+
+.SUFFIXES: .$(SrcSuf)
+
+
+.$(SrcSuf).$(ObjSuf):
+ $(CXX) $(CXXFLAGS) -c $<
--- /dev/null
+# -*- mode: makefile -*-
+#
+# Makefile containing platform dependencies for ROOT based projects.
+#
+# Copyright (c) 2000 Rene Brun and Fons Rademakers
+#
+# Author: Fons Rademakers, 29/2/2000
+
+ROOTCONFIG := root-config
+
+ARCH := $(shell $(ROOTCONFIG) --arch)
+PLATFORM := $(shell $(ROOTCONFIG) --platform)
+
+CXX =
+ObjSuf = o
+SrcSuf = cxx
+ExeSuf =
+DllSuf = so
+OutPutOpt = -o # keep whitespace after "-o"
+
+ROOTCFLAGS := $(shell $(ROOTCONFIG) --cflags)
+ROOTLDFLAGS := $(shell $(ROOTCONFIG) --ldflags)
+ROOTLIBS := $(shell $(ROOTCONFIG) --libs)
+ROOTGLIBS := $(shell $(ROOTCONFIG) --glibs)
+HASTHREAD := $(shell $(ROOTCONFIG) --has-thread)
+
+ifeq ($(ARCH),linux)
+# Linux with egcs, gcc 2.9x, gcc 3.x (>= RedHat 5.2)
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+#CXXFLAGS = -Wall -fPIC -g
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),hpuxacc)
+# HP-UX 10.x with aCC
+CXX = aCC
+CXXFLAGS = -O +Z
+LD = aCC
+LDFLAGS = -O -z
+SOFLAGS = -b
+endif
+
+ifeq ($(ARCH),hpuxia64acc)
+# HP-UX 11i 1.5 (IA-64) with aCC
+CXX = aCC
+CXXFLAGS = +DD64 -O +Z
+LD = aCC
+LDFLAGS = +DD64 -O -z
+SOFLAGS = -b
+endif
+
+ifeq ($(ARCH),hpuxgcc)
+# HP-UX 10.x with g++
+CXXFLAGS = -O -fPIC
+CXX = g++
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -fPIC -shared
+endif
+
+ifeq ($(ARCH),hurddeb)
+# GNU/Hurd
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),aix)
+# IBM AIX xlC 4.x
+CXX = xlC
+CXXFLAGS = -O
+LD = xlC
+LDFLAGS = -O
+SOFLAGS =
+DllSuf = a
+endif
+
+ifeq ($(ARCH),aix5)
+# IBM AIX xlC 5.x
+CXX = xlC
+CXXFLAGS = -O
+LD = xlC
+LDFLAGS = -O
+SOFLAGS =
+DllSuf = a
+endif
+
+ifeq ($(ARCH),aixgcc)
+# IBM AIX with GCC
+CXX = g++
+CXXFLAGS = -O
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+DllSuf = a
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),solaris)
+# Solaris CC
+CXX = /opt/SUNWspro/bin/CC
+CXXFLAGS = -O -KPIC
+LD = /opt/SUNWspro/bin/CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),solarisCC5)
+# Solaris CC 5.0
+CXX = CC
+CXXFLAGS = -O -KPIC
+LD = CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),solarisgcc)
+# Solaris gcc
+CXX = g++
+CXXFLAGS = -O -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),solariskcc)
+# Solaris kcc
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O4 -KPIC
+LD = KCC
+LDFLAGS = -O4
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),solarisx86)
+# Solaris CC on Intel
+CXX = CC
+CXXFLAGS = -O -KPIC
+LD = CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),sgicc)
+# SGI
+CXX = CC -n32 -I/usr/include/CC.sgi
+CXXFLAGS = -O
+LD = CC -n32 -LANG:std -I/usr/include/CC.sgi
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgicc64)
+# SGI
+CXX = CC -64 -I/usr/include/CC.sgi
+CXXFLAGS = -O
+LD = CC -64 -LANG:std -I/usr/include/CC.sgi
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgigcc)
+# SGI 6.x with gcc
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O -Wl,-u,__builtin_new -Wl,-u,__builtin_delete -Wl,-u,__nw__FUiPv
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgin32gcc)
+# SGI 6.x with gcc for n32 ABI
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O -L/usr/lib32 -Wl,-woff,134 -lgen
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgikcc)
+# SGI with KCC
+CXX = KCC -n32 --one_instantiation_per_object
+CXXFLAGS = -O
+LD = KCC -n32
+LDFLAGS = -O
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),alphagcc)
+# Alpha/OSF with gcc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -Wl,-expect_unresolved,* -shared
+endif
+
+ifeq ($(ARCH),alphakcc)
+# Alpha/OSF with kai compiler (not yet valid)
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O -fPIC
+LD = KCC
+LDFLAGS = -O
+SOFLAGS = -Wl,-expect_unresolved,* -shared
+endif
+
+ifeq ($(ARCH),alphacxx6)
+# Alpha/OSF with cxx6
+CXX = cxx
+CXXFLAGS = -O
+LD = cxx
+LDFLAGS = -O
+SOFLAGS = -shared -nocxxstd -Wl,-expect_unresolved,*,-msym
+endif
+
+ifeq ($(ARCH),linuxrh51)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxrh42)
+# Linux with gcc 2.7.2.x (RedHat 4.2)
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxdeb)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O1 -Wall -fPIC
+LD = g++
+LDFLAGS = -O1
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxdeb2ppc)
+# Debian/Linux on the PowerPC
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxsuse6)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxkcc)
+# Linux with the KAI compiler
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O -fPIC +K0
+LD = KCC
+LDFLAGS = -O $(shell $(ROOTCONFIG) --cflags)
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),linuxicc)
+# Linux with Intel icc compiler
+ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f1)
+ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+ifeq ($(ICC_MAJOR),8)
+ifneq ($(ICC_MINOR),0)
+CXXFLAGS += -wd1572
+endif
+endif
+endif
+
+ifeq ($(ARCH),linuxppcgcc)
+# MkLinux with gcc and glibc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64gcc)
+# Itanium Linux with gcc 2.9x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64sgi)
+# Itanium Linux with sgiCC
+CXX = sgiCC
+CXXFLAGS = -O -Wall -fPIC
+LD = gsgiCC
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64ecc)
+# Itanium Linux with Intel icc (was ecc)
+ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f1)
+ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+ifeq ($(ICC_MAJOR),8)
+ifneq ($(ICC_MINOR),0)
+CXXFLAGS += -wd1572
+endif
+endif
+endif
+
+ifeq ($(ARCH),linuxx8664gcc)
+# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxppc64gcc)
+# PPC64 Linux with gcc 3.x
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxx8664icc)
+# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476 -wd1572
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxalphagcc)
+# Alpha Linux with gcc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxarm)
+# ARM Linux with egcs
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),mklinux)
+# MkLinux with libc5
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),freebsd)
+# FreeBSD with libc5
+CXX = g++
+CXXFLAGS = -O -pipe -W -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),freebsd4)
+# FreeBSD with glibc
+CXXFLAGS += -W -Wall -fPIC
+LD = $(CXX)
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),freebsd5)
+# FreeBSD with glibc
+CXXFLAGS += -W -Wall -fPIC
+LD = $(CXX)
+endif
+
+ifeq ($(ARCH),openbsd)
+# OpenBSD with libc
+CXX = g++
+CXXFLAGS = -O -pipe -W -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),macosx)
+# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = c++
+CXXFLAGS = -O2 -pipe -Wall -W -Woverloaded-virtual
+LDFLAGS = -O2 -bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
+else
+ifeq ($(MACOSX_MINOR),3)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.3 c++
+else
+UNDEFOPT = suppress
+LD = c++
+endif
+endif
+SOFLAGS = -dynamiclib -single_module -undefined $(UNDEFOPT)
+endif
+
+ifeq ($(ARCH),macosxicc)
+# MacOS X with Intel icc compiler
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LDFLAGS = -O
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 icpc
+endif
+SOFLAGS = -dynamiclib -single_module -Xlinker -undefined dynamic_lookup
+endif
+
+ifeq ($(ARCH),macosx64)
+# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
+# Only specific option (-m64) comes from root-config
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = c++
+CXXFLAGS = -O2 -pipe -Wall -W -Woverloaded-virtual
+LDFLAGS = -O2 -bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
+SOFLAGS = -dynamiclib -single_module -undefined dynamic_lookup
+endif
+
+ifeq ($(ARCH),macosxxlc)
+# MacOS X with IBM xlC compiler
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = xlC
+CXXFLAGS = -O
+LDFLAGS = -O -Wl,-bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 xlC
+else
+ifeq ($(MACOSX_MINOR),3)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.3 xlC
+else
+UNDEFOPT = suppress
+LD = xlC
+endif
+endif
+SOFLAGS = -qmkshrobj -single_module -undefined $(UNDEFOPT)
+endif
+
+ifeq ($(ARCH),win32)
+# Windows with the VC++ compiler
+VC_MAJOR := $(shell unset VS_UNICODE_OUTPUT; cl.exe 2>&1 | awk '{ if (NR==1) print $$8 }' | \
+ cut -d'.' -f1)
+ObjSuf = obj
+SrcSuf = cxx
+ExeSuf = .exe
+DllSuf = dll
+OutPutOpt = -out:
+CXX = cl
+CXXOPT = -O2
+#CXXOPT = -Z7
+CXXFLAGS = $(CXXOPT) -nologo -I$(shell $(ROOTCONFIG) --incdir) -FIw32pragma.h
+LD = link
+LDOPT = -opt:ref
+#LDOPT = -debug
+LDFLAGS = $(LDOPT) -pdb:none -nologo
+SOFLAGS = -DLL
+
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),win32old)
+# Windows with the VC++ compiler
+ObjSuf = obj
+SrcSuf = cxx
+ExeSuf = .exe
+DllSuf = dll
+OutPutOpt = -out:
+CXX = cl
+CXXOPT = -O2
+#CXXOPT = -Z7
+CXXFLAGS = $(CXXOPT) -G5 -GR -GX -MD -DWIN32 -D_WINDOWS -nologo \
+ -DVISUAL_CPLUSPLUS -D_X86_=1 -D_DLL
+LD = link
+LDOPT = -opt:ref
+#LDOPT = -debug
+LDFLAGS = $(LDOPT) -pdb:none -nologo
+SOFLAGS = -DLL
+
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),win32gcc)
+# Windows with gcc
+DllSuf = dll
+ExeSuf = .exe
+CXX = g++
+CXXFLAGS = -O -pipe -Wall -Woverloaded-virtual -I/usr/X11R6/include
+LD = g++
+LDFLAGS = -O -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc \
+ -L/usr/X11R6/lib
+SOFLAGS = -shared -D_DLL -Wl,--export-all-symbols
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(CXX),)
+$(error $(ARCH) invalid architecture)
+endif
+
+#CXXFLAGS += $(ROOTCFLAGS) -I/home/odjuvsla/Workspace/alice/AliRootDev/RAW -I/home/odjuvsla/Workspace/alice/AliRootDev/include
+CXXFLAGS += $(ROOTCFLAGS) -I$(ALICE_ROOT)/RAW -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/PHOS -I$(ALICE_ROOT)/HLT/PHOS -I$(ALICE_ROOT)/HLT/BASE
+LDFLAGS += $(ROOTLDFLAGS)
+LIBS = $(ROOTLIBS) $(SYSLIBS)
+GLIBS = $(ROOTGLIBS) $(SYSLIBS)
+ROOTLIBS = -L$(ROOTSYS)/lib -lXMLIO -lMinuit -lGeom -lVMC -lEG
+ALILIBS = -L$(ALICE_ROOT)/lib/tgt_linux -lESD -lCDB -lAOD
+#ALILIBS = -L/home/odjuvsla/Workspace/alice/AliRootDev/lib/tgt_linux -lESD -lCDB
+
+GLIBS = $(ROOTGLIBS) $(SYSLIBS)
--- /dev/null
+
+#include "AliHLTPHOSDigitContainerStruct.h"
+#include "AliHLTPHOSRecPointContainerStruct.h"
+#include "AliHLTPHOSClusterizer.h"
+#include "AliPHOSGetter.h"
+#include "TH1I.h"
+#include "TObjArray.h"
+#include "TFile.h"
+
+#define NLOOPS 1
+
+Int_t clusterCompare();
+
+int main()
+{
+ clusterCompare();
+ return 0;
+}
+
+Int_t clusterCompare()
+{
+
+ AliHLTPHOSDigitContainerStruct *digCon = new AliHLTPHOSDigitContainerStruct();
+ AliHLTPHOSRecPointContainerStruct *recCon = new AliHLTPHOSRecPointContainerStruct();
+ AliHLTPHOSClusterizer *clusterizer = new AliHLTPHOSClusterizer();
+ AliPHOSGetter *getter = AliPHOSGetter::Instance("/home/odjuvsla/Workspace/Simulations/singlePhoton/galice.root");
+
+ TObjArray *emcRecPoints = getter->EmcRecPoints();
+
+ TH1I *hist = new TH1I("hist", "Difference in number of clusters found", 10, -5, 5);
+
+ int nClusters = 0;
+ int a = 0;
+
+ clock_t start = 0;
+ clock_t end = 0;
+ clock_t total = 0;
+ int count = 0;
+
+ clusterizer->SetOfflineMode(getter);
+ clusterizer->SetRecPointContainer(recCon);
+
+ while(a < NLOOPS)
+ {
+ for(int k = 0; k < clusterizer->GetNEvents(); k++)
+ {
+ // printf("Getting event...");
+ clusterizer->GetEvent(k);
+ // getter->Event(k, "R");
+ // printf("Done!\n");
+
+ //printf("Starting HLT clusterizing... ");
+ start = clock();
+ clusterizer->SetDigitContainer(digCon);
+ nClusters = clusterizer->ClusterizeEvent();
+ clusterizer->CalculateCenterOfGravity();
+ end = clock();
+ //printf("Done!\n");
+ total += end - start;
+ if(nClusters == 2)
+ {
+ printf("WTF! 2 cluster! --- Event: %d\n", k);
+ printf("Positions:\n");
+ printf("x = %f -- z = %f\n", recCon->fRecPointArray[0].fX, recCon->fRecPointArray[0].fZ);
+ printf("x = %f -- z = %f\n", recCon->fRecPointArray[1].fX, recCon->fRecPointArray[1].fZ);
+ printf("Energies:\n");
+ printf("%f\n", recCon->fRecPointArray[0].fAmp);
+ printf("%f\n", recCon->fRecPointArray[1].fAmp);
+ printf("Multiplicities:\n");
+ printf("%d\n",recCon->fRecPointArray[0].fMultiplicity);
+ printf("%d\n",recCon->fRecPointArray[1].fMultiplicity);
+ printf("Digits:\n");
+ for(int c = 0; c < recCon->fRecPointArray[0].fMultiplicity; c++)
+ {
+ printf("x = %d -- z = %d -- energy = %f\n", recCon->fRecPointArray[0].fDigitsList[c].fX, recCon->fRecPointArray[0].fDigitsList[c].fZ, recCon->fRecPointArray[0].fDigitsList[c].fEnergy );
+ }
+ printf("\n");
+ for(int b = 0; b < recCon->fRecPointArray[1].fMultiplicity; b++)
+ {
+ printf("x = %d -- z = %d -- energy = %f\n", recCon->fRecPointArray[1].fDigitsList[b].fX, recCon->fRecPointArray[1].fDigitsList[b].fZ, recCon->fRecPointArray[1].fDigitsList[b].fEnergy );
+ }
+ printf("\n");
+
+
+ }
+ else
+ printf("Multiplicity: %d\n\n", recCon->fRecPointArray[0].fMultiplicity);
+ count += nClusters;
+ //hist->Fill(emcRecPoints->GetEntriesFast() - recCon->fNRecPoints);
+ }
+ a++;
+ }
+
+
+ TFile *outfile = new TFile("histogram.root","recreate");
+ // hist->Write();
+ outfile->Close();
+
+ printf("Clusterizing done!\n");
+ printf("Total number of clusters: %d\n", count);
+
+ printf("Time pr event (us): %f\n", (float)total/((float)clusterizer->GetNEvents()*(float)a));
+
+ return 0;
+}
+
+
--- /dev/null
+
+#include "AliHLTPHOSDigitContainerStruct.h"
+#include "AliHLTPHOSRecPointContainerStruct.h"
+#include "AliPHOSDigit.h"
+#include "AliPHOSGetter.h"
+#include "AliHLTPHOSClusterizer.h"
+#include "AliPHOSReconstructor.h"
+#include "AliPHOSGeometry.h"
+#include "TH2I.h"
+#include "TFile.h"
+
+Int_t clusterTest();
+
+int main()
+{
+ clusterTest();
+ return 0;
+}
+
+Int_t clusterTest()
+{
+
+ AliHLTPHOSDigitContainerStruct *digCon = new AliHLTPHOSDigitContainerStruct();
+
+ AliHLTPHOSRecPointContainerStruct *recCon = new AliHLTPHOSRecPointContainerStruct();
+ AliHLTPHOSClusterizer *clusterizer = new AliHLTPHOSClusterizer();
+
+ AliPHOSDigit * offDig = 0;
+ int nClusters = 0;
+ float energy = 0;
+ float time = 0;
+ Int_t coord[4];
+ int a = 0;
+
+ clock_t start = 0;
+ clock_t end = 0;
+ clock_t total = 0;
+
+ AliPHOSGeometry *geometry = AliPHOSGeometry::GetInstance();
+
+ TH2F *hist = new TH2F("hist", "hist", 56, 1, 56, 64, 2, 65);
+ TFile *outfile = new TFile("histogram.root","recreate");
+
+ AliPHOSGetter *getter = AliPHOSGetter::Instance("/home/odjuvsla/Workspace/Simulations/test4/galice.root");
+ TClonesArray* digs = getter->Digits();
+
+ clusterizer->SetOfflineMode("/home/odjuvsla/Workspace/Simulations/test4/galice.root");
+ clusterizer->SetRecPointContainer(recCon);
+
+ while(a < 5000)
+ {
+ for(int k = 0; k < getter->MaxEvent(); k++)
+ {
+
+ //getter->Event(k,"D");
+ //digCon->fNDigits = digs->GetEntries();
+
+ clusterizer->GetEvent(k);
+
+ /* for(int i = 0; i < digs->GetEntries(); i++)
+ {
+ offDig = (AliPHOSDigit*)digs->At(i);
+ digCon->fDigitDataStruct[i].fID = offDig->GetId();
+ digCon->fDigitDataStruct[i].fEnergy = offDig->GetEnergy();
+ digCon->fDigitDataStruct[i].fTime = offDig->GetTime();
+ hist->Fill(coord[3], coord[2], offDig->GetEnergy());
+ }
+
+
+ outfile->Open("histogram.root", "recreate");
+ hist->Write();
+ outfile->Close("histogram.root");
+
+ */
+
+ start = clock();
+ clusterizer->SetDigitContainer(digCon);
+ nClusters = clusterizer->ClusterizeEvent();
+ clusterizer->CalculateCenterOfGravity();
+ end = clock();
+
+ total += end - start;
+ /*
+ printf("Event #: %d\n", k);
+ printf("Number of clusters found: ", nClusters);
+
+ for(int m = 0; m < nClusters; m++)
+ {
+ energy = 0;
+ for (int n = 0; n < recCon->fRecPointArray[m].fMultiplicity; n++)
+ {
+ energy += recCon->fRecPointArray[m].fDigitsList[n].fEnergy;
+ }
+ printf("Clusters:\n");
+ printf("Cluster energy: %f\n", energy);
+ printf("Cluster position: x = %f -- z = %f\n", recCon->fRecPointArray[m].fX, recCon->fRecPointArray[m].fZ);
+ printf("Digit multiplicity: %d\n", recCon->fRecPointArray[m].fMultiplicity);
+ }
+ */
+ }
+ a++;
+ }
+ printf("Clusterizing done!\n");
+
+ printf("Time pr event (us): %f\n", (float)total/((float)getter->MaxEvent()*(float)a));
+
+ return 0;
+}
+
+
--- /dev/null
+include Makefile.arch
+
+
+MAINO = clusterTest.$(ObjSuf)
+
+MAINS = clusterTest.$(SrcSuf)
+
+MAIN = clusterTest$(ExeSuf)
+
+
+OBJS = $(MAINO)
+PROGRAMS = $(MAIN)
+
+
+.SUFFIXES: .$(SrcSuf) .$(ObjSuf) .$(DllSuf)
+
+all: $(PROGRAMS)
+
+
+$(MAIN): $(MAINO)
+ $(LD) $(LDFLAGS) $^ $(LIBS) $(GLIBS) $(ALILIBS) -lTreePlayer -lMathCore -lThread -lpthread -L/home/odjuvsla/Workspace/alice/AliRoot/lib/tgt_linux -lRAWDatabase -lRAWDatarec -lRAWDatasim -lPHOSbase -lPHOSrec -lPHOSsim -lSTEER -lSTEERBase -lTPCbase -lAliHLTUtil -lAliHLTPHOS -lHLTbase -lHLTinterface $(OutPutOpt)$(MAIN)
+ @echo "$@ done"
+# $(LD) $(LDFLAGS) $^ $(LIBS) $(GLIBS) -lTreePlayer -lMathCore -lThread -lpthread $(OutPutOpt)$(MAIN)
+
+
+
+clean:
+ @rm -f $(OBJS) core
+
+distclean: clean
+ @rm -f $(PROGRAMS) *Dict.* *.def *.exp \
+ *.root *.ps *.so *.lib *.dll *.d .def so_locations
+ @rm -rf cxx_repository
+
+.SUFFIXES: .$(SrcSuf)
+
+
+.$(SrcSuf).$(ObjSuf):
+ $(CXX) $(CXXFLAGS) -c $<
--- /dev/null
+# -*- mode: makefile -*-
+#
+# Makefile containing platform dependencies for ROOT based projects.
+#
+# Copyright (c) 2000 Rene Brun and Fons Rademakers
+#
+# Author: Fons Rademakers, 29/2/2000
+
+ROOTCONFIG := root-config
+
+ARCH := $(shell $(ROOTCONFIG) --arch)
+PLATFORM := $(shell $(ROOTCONFIG) --platform)
+
+CXX =
+ObjSuf = o
+SrcSuf = cxx
+ExeSuf =
+DllSuf = so
+OutPutOpt = -o # keep whitespace after "-o"
+
+ROOTCFLAGS := $(shell $(ROOTCONFIG) --cflags)
+ROOTLDFLAGS := $(shell $(ROOTCONFIG) --ldflags)
+ROOTLIBS := $(shell $(ROOTCONFIG) --libs)
+ROOTGLIBS := $(shell $(ROOTCONFIG) --glibs)
+HASTHREAD := $(shell $(ROOTCONFIG) --has-thread)
+
+ifeq ($(ARCH),linux)
+# Linux with egcs, gcc 2.9x, gcc 3.x (>= RedHat 5.2)
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+#CXXFLAGS = -Wall -fPIC -g
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),hpuxacc)
+# HP-UX 10.x with aCC
+CXX = aCC
+CXXFLAGS = -O +Z
+LD = aCC
+LDFLAGS = -O -z
+SOFLAGS = -b
+endif
+
+ifeq ($(ARCH),hpuxia64acc)
+# HP-UX 11i 1.5 (IA-64) with aCC
+CXX = aCC
+CXXFLAGS = +DD64 -O +Z
+LD = aCC
+LDFLAGS = +DD64 -O -z
+SOFLAGS = -b
+endif
+
+ifeq ($(ARCH),hpuxgcc)
+# HP-UX 10.x with g++
+CXXFLAGS = -O -fPIC
+CXX = g++
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -fPIC -shared
+endif
+
+ifeq ($(ARCH),hurddeb)
+# GNU/Hurd
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),aix)
+# IBM AIX xlC 4.x
+CXX = xlC
+CXXFLAGS = -O
+LD = xlC
+LDFLAGS = -O
+SOFLAGS =
+DllSuf = a
+endif
+
+ifeq ($(ARCH),aix5)
+# IBM AIX xlC 5.x
+CXX = xlC
+CXXFLAGS = -O
+LD = xlC
+LDFLAGS = -O
+SOFLAGS =
+DllSuf = a
+endif
+
+ifeq ($(ARCH),aixgcc)
+# IBM AIX with GCC
+CXX = g++
+CXXFLAGS = -O
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+DllSuf = a
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),solaris)
+# Solaris CC
+CXX = /opt/SUNWspro/bin/CC
+CXXFLAGS = -O -KPIC
+LD = /opt/SUNWspro/bin/CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),solarisCC5)
+# Solaris CC 5.0
+CXX = CC
+CXXFLAGS = -O -KPIC
+LD = CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),solarisgcc)
+# Solaris gcc
+CXX = g++
+CXXFLAGS = -O -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),solariskcc)
+# Solaris kcc
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O4 -KPIC
+LD = KCC
+LDFLAGS = -O4
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),solarisx86)
+# Solaris CC on Intel
+CXX = CC
+CXXFLAGS = -O -KPIC
+LD = CC
+LDFLAGS = -O
+SOFLAGS = -G
+endif
+
+ifeq ($(ARCH),sgicc)
+# SGI
+CXX = CC -n32 -I/usr/include/CC.sgi
+CXXFLAGS = -O
+LD = CC -n32 -LANG:std -I/usr/include/CC.sgi
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgicc64)
+# SGI
+CXX = CC -64 -I/usr/include/CC.sgi
+CXXFLAGS = -O
+LD = CC -64 -LANG:std -I/usr/include/CC.sgi
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgigcc)
+# SGI 6.x with gcc
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O -Wl,-u,__builtin_new -Wl,-u,__builtin_delete -Wl,-u,__nw__FUiPv
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgin32gcc)
+# SGI 6.x with gcc for n32 ABI
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O -L/usr/lib32 -Wl,-woff,134 -lgen
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),sgikcc)
+# SGI with KCC
+CXX = KCC -n32 --one_instantiation_per_object
+CXXFLAGS = -O
+LD = KCC -n32
+LDFLAGS = -O
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),alphagcc)
+# Alpha/OSF with gcc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -Wl,-expect_unresolved,* -shared
+endif
+
+ifeq ($(ARCH),alphakcc)
+# Alpha/OSF with kai compiler (not yet valid)
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O -fPIC
+LD = KCC
+LDFLAGS = -O
+SOFLAGS = -Wl,-expect_unresolved,* -shared
+endif
+
+ifeq ($(ARCH),alphacxx6)
+# Alpha/OSF with cxx6
+CXX = cxx
+CXXFLAGS = -O
+LD = cxx
+LDFLAGS = -O
+SOFLAGS = -shared -nocxxstd -Wl,-expect_unresolved,*,-msym
+endif
+
+ifeq ($(ARCH),linuxrh51)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxrh42)
+# Linux with gcc 2.7.2.x (RedHat 4.2)
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxdeb)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O1 -Wall -fPIC
+LD = g++
+LDFLAGS = -O1
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxdeb2ppc)
+# Debian/Linux on the PowerPC
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxsuse6)
+# Linux with gcc 2.7.2.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxkcc)
+# Linux with the KAI compiler
+CXX = KCC --one_instantiation_per_object
+CXXFLAGS = -O -fPIC +K0
+LD = KCC
+LDFLAGS = -O $(shell $(ROOTCONFIG) --cflags)
+SOFLAGS =
+endif
+
+ifeq ($(ARCH),linuxicc)
+# Linux with Intel icc compiler
+ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f1)
+ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+ifeq ($(ICC_MAJOR),8)
+ifneq ($(ICC_MINOR),0)
+CXXFLAGS += -wd1572
+endif
+endif
+endif
+
+ifeq ($(ARCH),linuxppcgcc)
+# MkLinux with gcc and glibc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64gcc)
+# Itanium Linux with gcc 2.9x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64sgi)
+# Itanium Linux with sgiCC
+CXX = sgiCC
+CXXFLAGS = -O -Wall -fPIC
+LD = gsgiCC
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxia64ecc)
+# Itanium Linux with Intel icc (was ecc)
+ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f1)
+ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+ cut -d'.' -f2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+ifeq ($(ICC_MAJOR),8)
+ifneq ($(ICC_MINOR),0)
+CXXFLAGS += -wd1572
+endif
+endif
+endif
+
+ifeq ($(ARCH),linuxx8664gcc)
+# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxppc64gcc)
+# PPC64 Linux with gcc 3.x
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxx8664icc)
+# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476 -wd1572
+LD = icpc
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxalphagcc)
+# Alpha Linux with gcc
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),linuxarm)
+# ARM Linux with egcs
+CXX = g++
+CXXFLAGS = -O -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),mklinux)
+# MkLinux with libc5
+CXX = g++
+CXXFLAGS = -O2 -Wall -fPIC
+LD = g++
+LDFLAGS = -O2
+SOFLAGS = -shared
+endif
+
+ifeq ($(ARCH),freebsd)
+# FreeBSD with libc5
+CXX = g++
+CXXFLAGS = -O -pipe -W -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),freebsd4)
+# FreeBSD with glibc
+CXXFLAGS += -W -Wall -fPIC
+LD = $(CXX)
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),freebsd5)
+# FreeBSD with glibc
+CXXFLAGS += -W -Wall -fPIC
+LD = $(CXX)
+endif
+
+ifeq ($(ARCH),openbsd)
+# OpenBSD with libc
+CXX = g++
+CXXFLAGS = -O -pipe -W -Wall -fPIC
+LD = g++
+LDFLAGS = -O
+SOFLAGS = -shared -Wl,-x
+endif
+
+ifeq ($(ARCH),macosx)
+# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = c++
+CXXFLAGS = -O2 -pipe -Wall -W -Woverloaded-virtual
+LDFLAGS = -O2 -bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
+else
+ifeq ($(MACOSX_MINOR),3)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.3 c++
+else
+UNDEFOPT = suppress
+LD = c++
+endif
+endif
+SOFLAGS = -dynamiclib -single_module -undefined $(UNDEFOPT)
+endif
+
+ifeq ($(ARCH),macosxicc)
+# MacOS X with Intel icc compiler
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = icc
+CXXFLAGS = -O -fPIC -wd1476
+LDFLAGS = -O
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 icpc
+endif
+SOFLAGS = -dynamiclib -single_module -Xlinker -undefined dynamic_lookup
+endif
+
+ifeq ($(ARCH),macosx64)
+# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
+# Only specific option (-m64) comes from root-config
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = c++
+CXXFLAGS = -O2 -pipe -Wall -W -Woverloaded-virtual
+LDFLAGS = -O2 -bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 c++
+SOFLAGS = -dynamiclib -single_module -undefined dynamic_lookup
+endif
+
+ifeq ($(ARCH),macosxxlc)
+# MacOS X with IBM xlC compiler
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+CXX = xlC
+CXXFLAGS = -O
+LDFLAGS = -O -Wl,-bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf = dylib
+ifeq ($(MACOSX_MINOR),4)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.4 xlC
+else
+ifeq ($(MACOSX_MINOR),3)
+UNDEFOPT = dynamic_lookup
+LD = MACOSX_DEPLOYMENT_TARGET=10.3 xlC
+else
+UNDEFOPT = suppress
+LD = xlC
+endif
+endif
+SOFLAGS = -qmkshrobj -single_module -undefined $(UNDEFOPT)
+endif
+
+ifeq ($(ARCH),win32)
+# Windows with the VC++ compiler
+VC_MAJOR := $(shell unset VS_UNICODE_OUTPUT; cl.exe 2>&1 | awk '{ if (NR==1) print $$8 }' | \
+ cut -d'.' -f1)
+ObjSuf = obj
+SrcSuf = cxx
+ExeSuf = .exe
+DllSuf = dll
+OutPutOpt = -out:
+CXX = cl
+CXXOPT = -O2
+#CXXOPT = -Z7
+CXXFLAGS = $(CXXOPT) -nologo -I$(shell $(ROOTCONFIG) --incdir) -FIw32pragma.h
+LD = link
+LDOPT = -opt:ref
+#LDOPT = -debug
+LDFLAGS = $(LDOPT) -pdb:none -nologo
+SOFLAGS = -DLL
+
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),win32old)
+# Windows with the VC++ compiler
+ObjSuf = obj
+SrcSuf = cxx
+ExeSuf = .exe
+DllSuf = dll
+OutPutOpt = -out:
+CXX = cl
+CXXOPT = -O2
+#CXXOPT = -Z7
+CXXFLAGS = $(CXXOPT) -G5 -GR -GX -MD -DWIN32 -D_WINDOWS -nologo \
+ -DVISUAL_CPLUSPLUS -D_X86_=1 -D_DLL
+LD = link
+LDOPT = -opt:ref
+#LDOPT = -debug
+LDFLAGS = $(LDOPT) -pdb:none -nologo
+SOFLAGS = -DLL
+
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(ARCH),win32gcc)
+# Windows with gcc
+DllSuf = dll
+ExeSuf = .exe
+CXX = g++
+CXXFLAGS = -O -pipe -Wall -Woverloaded-virtual -I/usr/X11R6/include
+LD = g++
+LDFLAGS = -O -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc \
+ -L/usr/X11R6/lib
+SOFLAGS = -shared -D_DLL -Wl,--export-all-symbols
+EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
+endif
+
+ifeq ($(CXX),)
+$(error $(ARCH) invalid architecture)
+endif
+
+#CXXFLAGS += $(ROOTCFLAGS) -I/home/odjuvsla/Workspace/alice/AliRootDev/RAW -I/home/odjuvsla/Workspace/alice/AliRootDev/include
+CXXFLAGS += $(ROOTCFLAGS) -I$(ALICE_ROOT)/RAW -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/PHOS -I$(ALICE_ROOT)/HLT/PHOS -I$(ALICE_ROOT)/HLT/BASE
+LDFLAGS += $(ROOTLDFLAGS)
+LIBS = $(ROOTLIBS) $(SYSLIBS)
+GLIBS = $(ROOTGLIBS) $(SYSLIBS)
+ROOTLIBS = -L$(ROOTSYS)/lib -lXMLIO -lMinuit -lGeom -lVMC -lEG
+ALILIBS = -L$(ALICE_ROOT)/lib/tgt_linux -lESD -lCDB -lAOD
+#ALILIBS = -L/home/odjuvsla/Workspace/alice/AliRootDev/lib/tgt_linux -lESD -lCDB
+
+GLIBS = $(ROOTGLIBS) $(SYSLIBS)
--- /dev/null
+
+#include "AliHLTPHOSDigitContainerStruct.h"
+#include "AliHLTPHOSRecPointContainerStruct.h"
+#include "AliHLTPHOSClusterizer.h"
+#include "AliPHOSGetter.h"
+
+#define NLOOPS 10
+
+Int_t clusterTest();
+
+int main()
+{
+ clusterTest();
+ return 0;
+}
+
+Int_t clusterTest()
+{
+
+ AliHLTPHOSDigitContainerStruct *digCon = new AliHLTPHOSDigitContainerStruct();
+ AliHLTPHOSRecPointContainerStruct *recCon = new AliHLTPHOSRecPointContainerStruct();
+ AliHLTPHOSClusterizer *clusterizer = new AliHLTPHOSClusterizer();
+ AliPHOSGetter *getter = AliPHOSGetter::Instance("/home/odjuvsla/Workspace/Simulations/test3/galice.root");
+ int nClusters = 0;
+ int a = 0;
+
+ clock_t start = 0;
+ clock_t end = 0;
+ clock_t total = 0;
+
+ clusterizer->SetOfflineMode(getter);
+ clusterizer->SetRecPointContainer(recCon);
+
+ while(a < NLOOPS)
+ {
+ for(int k = 0; k < clusterizer->GetNEvents(); k++)
+ {
+
+ clusterizer->GetEvent(k);
+
+ start = clock();
+ clusterizer->SetDigitContainer(digCon);
+ nClusters = clusterizer->ClusterizeEvent();
+ clusterizer->CalculateCenterOfGravity();
+ end = clock();
+
+ total += end - start;
+ }
+ a++;
+ }
+ printf("Clusterizing done!\n");
+
+ printf("Time pr event (us): %f\n", (float)total/((float)clusterizer->GetNEvents()*(float)a));
+
+ return 0;
+}
+
+
--- /dev/null
+
+#include "AliHLTPHOSDigitContainerStruct.h"
+#include "AliHLTPHOSRecPointContainerStruct.h"
+#include "AliPHOSDigit.h"
+#include "AliPHOSGetter.h"
+#include "AliHLTPHOSClusterizer.h"
+#include "AliPHOSReconstructor.h"
+#include "AliPHOSGeometry.h"
+#include "TH2I.h"
+#include "TFile.h"
+
+Int_t clusterTest();
+
+int main()
+{
+ clusterTest();
+ return 0;
+}
+
+Int_t clusterTest()
+{
+
+ AliHLTPHOSDigitContainerStruct *digCon = new AliHLTPHOSDigitContainerStruct();
+
+ AliHLTPHOSRecPointContainerStruct *recCon = new AliHLTPHOSRecPointContainerStruct();
+ AliHLTPHOSClusterizer *clusterizer = new AliHLTPHOSClusterizer();
+
+ AliPHOSDigit * offDig = 0;
+ int nClusters = 0;
+ float energy = 0;
+ float time = 0;
+ Int_t coord[4];
+ int a = 0;
+
+ clock_t start = 0;
+ clock_t end = 0;
+ clock_t total = 0;
+
+ AliPHOSGeometry *geometry = AliPHOSGeometry::GetInstance();
+
+ TH2F *hist = new TH2F("hist", "hist", 56, 1, 56, 64, 2, 65);
+ TFile *outfile = new TFile("histogram.root","recreate");
+
+ AliPHOSGetter *getter = AliPHOSGetter::Instance("/home/odjuvsla/Workspace/Simulations/test4/galice.root");
+ TClonesArray* digs = getter->Digits();
+
+ clusterizer->SetOfflineMode("/home/odjuvsla/Workspace/Simulations/test4/galice.root");
+ clusterizer->SetRecPointContainer(recCon);
+
+ while(a < 5000)
+ {
+ for(int k = 0; k < getter->MaxEvent(); k++)
+ {
+
+ //getter->Event(k,"D");
+ //digCon->fNDigits = digs->GetEntries();
+
+ clusterizer->GetEvent(k);
+
+ /* for(int i = 0; i < digs->GetEntries(); i++)
+ {
+ offDig = (AliPHOSDigit*)digs->At(i);
+ digCon->fDigitDataStruct[i].fID = offDig->GetId();
+ digCon->fDigitDataStruct[i].fEnergy = offDig->GetEnergy();
+ digCon->fDigitDataStruct[i].fTime = offDig->GetTime();
+ hist->Fill(coord[3], coord[2], offDig->GetEnergy());
+ }
+
+
+ outfile->Open("histogram.root", "recreate");
+ hist->Write();
+ outfile->Close("histogram.root");
+
+ */
+
+ start = clock();
+ clusterizer->SetDigitContainer(digCon);
+ nClusters = clusterizer->ClusterizeEvent();
+ clusterizer->CalculateCenterOfGravity();
+ end = clock();
+
+ total += end - start;
+ /*
+ printf("Event #: %d\n", k);
+ printf("Number of clusters found: ", nClusters);
+
+ for(int m = 0; m < nClusters; m++)
+ {
+ energy = 0;
+ for (int n = 0; n < recCon->fRecPointArray[m].fMultiplicity; n++)
+ {
+ energy += recCon->fRecPointArray[m].fDigitsList[n].fEnergy;
+ }
+ printf("Clusters:\n");
+ printf("Cluster energy: %f\n", energy);
+ printf("Cluster position: x = %f -- z = %f\n", recCon->fRecPointArray[m].fX, recCon->fRecPointArray[m].fZ);
+ printf("Digit multiplicity: %d\n", recCon->fRecPointArray[m].fMultiplicity);
+ }
+ */
+ }
+ a++;
+ }
+ printf("Clusterizing done!\n");
+
+ printf("Time pr event (us): %f\n", (float)total/((float)getter->MaxEvent()*(float)a));
+
+ return 0;
+}
+
+
--- /dev/null
+ /**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project *
+ * All rights reserved. *
+ * *
+ * Primary Authors: Oystein Djuvsland *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+#include "AliHLTPHOSTRUMapper.h"
+
+#define N_CHANNELS_ADC 8
+#define N_ADCS_TRU 14
+#define N_ADCS_MASK 2
+#define N_XCRYSTALS_TRU 16
+#define N_ZCRYSTALS_TRU 28
+#define N_ZCRYSTALS 56
+#define N_XCRYSTALS 64
+#define N_XCRYSTALS_ADC 16
+#define N_ZCRYSTALS_ADC 2
+#define CHANNEL_MASK 1
+
+AliHLTPHOSTRUMapper::AliHLTPHOSTRUMapper()
+{
+}
+
+
+AliHLTPHOSTRUMapper::~AliHLTPHOSTRUMapper()
+{
+}
+
+void
+AliHLTPHOSTRUMapper::GetChannelMask(x, z, Short_t *maskArray)
+{
+ Int_t chNb = -1;
+ Int_t ADCNb = -1;
+
+ for(Int_t i = 0; i < N_ADCS_TRU/N_ADCS_MASK; i++)
+ {
+ maskArray[i] = 0;
+ }
+
+ chNb = fChannelLookupArrayPtr[x];
+
+ ADCNb = N_ADCS_TRU - z/N_ZCRYSTALS_ADC;
+
+ maskArray[(ADCNb-1)/N_ADCS_MASK] = (CHANNEL_MASK << chNb) << ((1 - ADCNb % N_ADCS_MASK) * N_CHANNELS_ADC );
+
+}
+
+Int_t
+AliHLTPHOSTRUMapper::GetTRUMask(x, z, Short_t *maskArray)
+{
+ Int_t TRUNb = x/N_XCRYSTALS_TRU + z/N_ZCRYSTALS_TRU;
+
+ GetChannelMask(x, z, maskArray);
+
+ return TRUNb;
+}
+
+void
+AliHLTPHOSTRUMapper::GetLookUpTable()
+{
+ ifstream infile;
+
+ inFile.open("channelLookup.txt");
+
+ for(Int_t i = 0; i < 8; i++)
+ {
+ inFile >> fChannelLookupArrayPtr[i];
+ }
+
+ inFile.close();
+}
+
+
+
+
+
+
+
+
\ No newline at end of file
--- /dev/null
+//
+// C++ Interface: AliHLTPHOSTRUMapper
+//
+// Description:
+//
+//
+// Author: Øystein Djuvsland <oystein.djuvsland@gmail.com>, (C) 2007
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+ /**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project *
+ * All rights reserved. *
+ * *
+ * Primary Authors: Oystein Djuvsland *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+
+#ifndef ALIHLTPHOSTRUMAPPER_H
+#define ALIHLTPHOSTRUMAPPER_H
+
+/**
+ @author Øystein Djuvsland <oystein.djuvsland@gmail.com>
+*/
+class AliHLTPHOSTRUMapper : public AliHLTPHOSBase
+{
+public:
+ AliHLTPHOSTRUMapper();
+
+ ~AliHLTPHOSTRUMapper();
+
+ Int_t GetChannelMask(Int_t x, Int_t z, Short_t *maskArray);
+ Int_t GetTRUMask(Int_t x, Int_t z, Short_t *maskArray);
+
+};
+
+#endif
--- /dev/null
+#ifndef __ALIHLTPHOSMIPCOUNTER_INTERFACE_H
+#define __ALIHLTPHOSMIPCOUNTER_INTERFACE_H
+
+class AliHLTPHOSMIPCounterInterface
+{
+public:
+ AliHLTPHOSMIPCounterInterface() {}
+ virtual ~AliHLTPHOSMIPCounterInterface() {}
+
+
+private:
+ AliHLTPHOSMIPCounterInterface( const AliHLTPHOSMIPCounterInterface& source );
+ void operator = ( const AliHLTPHOSMIPCounterInterface& source );
+};
+
+
+#endif // __ALIHLTPHOSMIPCOUNTER_INTERFACE_H