--- /dev/null
+//-*- Mode: C++ -*-
+// $Id: AliHLTVZEROAgent.cxx $
+
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project *
+ * ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Primary Authors: Jochen Thaeder <jochen@thaeder.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 AliHLTVZEROAgent.cxx
+ @author Jochen Thaeder <jochen@thaeder.de>
+ @brief Agent of the libAliHLTVZERO library
+*/
+
+#include <cassert>
+
+#include "TSystem.h"
+
+#include "AliHLTVZEROAgent.h"
+
+#include "AliHLTErrorGuard.h"
+
+// header files of library components
+#include "AliHLTVZERORecoComponent.h"
+
+// raw data handler of HLTOUT data
+#include "AliHLTOUTHandlerEquId.h"
+#include "AliHLTOUTHandlerEsdBranch.h"
+
+/** global instance for agent registration */
+AliHLTVZEROAgent gAliHLTVZEROAgent;
+
+/** ROOT macro for the implementation of ROOT specific class methods */
+ClassImp(AliHLTVZEROAgent)
+
+/*
+ * ---------------------------------------------------------------------------------
+ * Constructor / Destructor
+ * ---------------------------------------------------------------------------------
+ */
+
+// #################################################################################
+AliHLTVZEROAgent::AliHLTVZEROAgent() :
+ AliHLTModuleAgent("VZERO") {
+ // see header file for class documentation
+ // or
+ // refer to README to build package
+ // or
+ // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+}
+
+// #################################################################################
+AliHLTVZEROAgent::~AliHLTVZEROAgent() {
+ // see header file for class documentation
+}
+
+/*
+ * ---------------------------------------------------------------------------------
+ * Public functions to implement AliHLTModuleAgent's interface.
+ * These functions are required for the registration process
+ * ---------------------------------------------------------------------------------
+ */
+
+// #################################################################################
+Int_t AliHLTVZEROAgent::CreateConfigurations(AliHLTConfigurationHandler* handler,
+ AliRawReader* rawReader, AliRunLoader* runloader) const {
+ // see header file for class documentation
+
+ if (!handler)
+ return -EINVAL;
+
+ if (rawReader || !runloader) {
+ // AliSimulation: use the AliRawReaderPublisher if the raw reader is available
+ // Alireconstruction: indicated by runloader==NULL, run always on raw data
+
+ // -- Define the VZERO raw publisher
+ // -----------------------------------
+ TString arg("-equipmentid 3584 -datatype 'DDL_RAW ' 'VZRO' -dataspec 0x01");
+ handler->CreateConfiguration("VZERO-DP_0", "AliRawReaderPublisher", NULL , arg.Data());
+
+ // -- Define the VZERO reconstruction components
+ // -----------------------------------------------
+ handler->CreateConfiguration("VZERO-RECO", "VZEROReconstruction", "VZERO-DP_0", "");
+ }
+ else if (runloader && !rawReader) {
+ // indicates AliSimulation with no RawReader available -> run on digits
+
+ /* NOT Tested/ implemented yet
+ handler->CreateConfiguration("DigitPublisher","AliLoaderPublisher",NULL,
+ "-loader VZEROLoader -datatype 'ALITREED' 'VZRO'");
+ handler->CreateConfiguration("Digit","VZEROReconstruction","DigitPublisher","");
+ */
+ }
+
+ return 0;
+}
+
+// #################################################################################
+const Char_t* AliHLTVZEROAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
+ AliRunLoader* /*runloader*/) const {
+ // see header file for class documentation
+
+ // VZERO called only from the EsdConverter
+ return NULL;
+}
+
+// #################################################################################
+const Char_t* AliHLTVZEROAgent::GetRequiredComponentLibraries() const {
+ // see header file for class documentation
+ return "libAliHLTUtil.so libAliHLTVZERO.so";
+}
+
+// #################################################################################
+Int_t AliHLTVZEROAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const {
+ // see header file for class documentation
+ assert(pHandler);
+ if (!pHandler) return -EINVAL;
+
+ pHandler->AddComponent(new AliHLTVZERORecoComponent);
+
+ return 0;
+}
+
+// #################################################################################
+Int_t AliHLTVZEROAgent::GetHandlerDescription(AliHLTComponentDataType dt, AliHLTUInt32_t spec,
+ AliHLTOUTHandlerDesc& desc) const {
+ // see header file for class documentation
+ if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginVZERO)) {
+ desc=AliHLTOUTHandlerDesc(kRawReader, dt, GetModuleId());
+ HLTInfo("module %s handles data block type %s specification %d (0x%x)",
+ GetModuleId(), AliHLTComponent::DataType2Text(dt).c_str(), spec, spec);
+ return 1;
+ }
+
+ // add TObject data blocks of type {ESD_CONT:VZRO} to ESD
+ if (dt==(kAliHLTDataTypeESDContent|kAliHLTDataOriginVZERO)) {
+ desc=AliHLTOUTHandlerDesc(kEsd, dt, GetModuleId());
+ HLTInfo("module %s handles data block type %s specification %d (0x%x)",
+ GetModuleId(), AliHLTComponent::DataType2Text(dt).c_str(), spec, spec);
+ return 1;
+ }
+
+ return 0;
+}
+
+// #################################################################################
+AliHLTOUTHandler* AliHLTVZEROAgent::GetOutputHandler(AliHLTComponentDataType dt,
+ AliHLTUInt32_t /*spec*/) {
+ // see header file for class documentation
+ if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginVZERO)) {
+ // use the default handler
+ static AliHLTOUTHandlerEquId handler;
+ return &handler;
+ }
+
+ if (dt==(kAliHLTDataTypeESDContent|kAliHLTDataOriginVZERO)) {
+ // use AliHLTOUTHandlerEsdBranch handler to add the TObject
+ // to the ESD branch
+ // Note: the object should have an appropriate name returned
+ // by GetName(). Use SetName() to prepare the object before streaming
+ static AliHLTOUTHandlerEsdBranch handler;
+ return &handler;
+ }
+
+ return NULL;
+}
+
+// #################################################################################
+Int_t AliHLTVZEROAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance) {
+ // see header file for class documentation
+ if (pInstance==NULL) return -EINVAL;
+
+ // nothing to delete, the handler have been defined static
+ return 0;
+}
+
+// #################################################################################
+AliHLTModulePreprocessor* AliHLTVZEROAgent::GetPreprocessor() {
+ // see header file for class documentation
+ ALIHLTERRORGUARD(5, "GtePreProcessor not implemented for this module");
+ return NULL;
+}
--- /dev/null
+//-*- Mode: C++ -*-
+// $Id: AliHLTVZEROAgent.h $
+
+#ifndef ALIHLTVZEROAGENT_H
+#define ALIHLTVZEROAGENT_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 AliHLTVZEROAgent.h
+ @author Jochen Thaeder <jochen@thaeder.de>
+ @brief Agent of the libAliHLTVZERO library
+*/
+
+// see below for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+#include "AliHLTModuleAgent.h"
+
+/**
+ * @class AliHLTVZEROAgent
+ * This is the agent for the AliHLTVZERO library.<br>
+ *
+ * The sample agent implements all interface function provided by @ref
+ * AliHLTModuleAgent :
+ * - CreateConfigurations() <br>
+ * The method gets an instance of the AliHLTConfigurationHanler to add
+ * configurations, e.g.
+ * <pre>
+ * handler->CreateConfiguration("my-puplisher" , "FilePublisher", NULL , "data.bin");
+ * ...
+ * handler->CreateConfiguration("my-analysis-chain" , "FileWriter", "my-processor" , "my arguments");
+ * </pre>
+ * - GetReconstructionChains() <br>
+ * returns a string of blank separated configurations to be run during
+ * local event reconstruction.
+ * <pre>
+ * return "my-data-sink my-analysis-chain";
+ * </pre>
+ * - GetRequiredComponentLibraries() <br>
+ * returns a string of blank separated libraries which have to be loaded
+ * in addition in order to load all required components. <br>
+ * @note Not the right place for library dependencies.
+ * <pre>
+ * return "libAliHLTUtil.so";
+ * </pre>
+ * - RegisterComponents() <br>
+ * registers the components: AliHLTDummyComponent, AliHLTSampleComponent1,
+ * AliHLTSampleComponent2, and AliHLTSampleMonitoringComponent<br>
+ * - GetHandlerDescription() <br>
+ * Handles HLTOUT data blocks of type {DDL_RAW,SMPL}
+ * <pre>
+ * if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginSample)) {
+ * desc=AliHLTOUTHandlerDesc(kRawReader, dt, GetModuleId());
+ * return 1;
+ * }
+ * </pre>
+ * - GetOutputHandler() <br>
+ * Returns handler AliHLTOUTHandlerEquId for HLTOUT data blocks of
+ * type {DDL_RAW,SMPL}
+ * <pre>
+ * if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginSample)) {
+ * return new AliHLTOUTHandlerEquId;
+ * }
+ * </pre>
+ * - DeleteOutputHandler() <br>
+ * Deletes the output handler. In this case there is no special handling
+ * needed.
+ *
+ * In order to hook the sample library up to the HLT system on global object
+ * @ref gAliHLTVZEROAgent of the agent is defined in the source code.
+ *
+ * @ingroup alihlt_system
+ */
+class AliHLTVZEROAgent : public AliHLTModuleAgent {
+ public:
+
+ /*
+ * ---------------------------------------------------------------------------------
+ * Constructor / Destructor
+ * ---------------------------------------------------------------------------------
+ */
+
+ /**
+ * standard constructor. The agent is automatically registered in the
+ * global agent manager
+ */
+ AliHLTVZEROAgent();
+
+ /** destructor */
+ virtual ~AliHLTVZEROAgent();
+
+ /*
+ * ---------------------------------------------------------------------------------
+ * Public functions to implement AliHLTModuleAgent's interface.
+ * These functions are required for the registration process
+ * ---------------------------------------------------------------------------------
+ */
+
+ /**
+ * Register all configurations belonging to the VZERO library with the
+ * AliHLTConfigurationHandler.
+ * @param handler [in] the configuration handler
+ * @param rawReader [in] AliRoot RawReader instance
+ * @param runloader [in] AliRoot runloader
+ * @return neg. error code if failed
+ */
+ Int_t CreateConfigurations(AliHLTConfigurationHandler* handler,
+ AliRawReader* rawReader=NULL,
+ AliRunLoader* runloader=NULL) const;
+
+ /**
+ * Get the top configurations for local event reconstruction.
+ * A top configuration describes a processing chain. It can simply be
+ * described by the last configuration(s) in the chain.
+ * @param rawReader [in] AliRoot RawReader instance
+ * @param runloader [in] AliRoot runloader
+ * @return string containing the top configurations separated by blanks
+ */
+ const Char_t* GetReconstructionChains(AliRawReader* rawReader=NULL,
+ AliRunLoader* runloader=NULL) const;
+
+ /**
+ * Component libraries which the configurations of this agent depend on.
+ * @return list of component libraries as a blank-separated string.
+ */
+ const Char_t* GetRequiredComponentLibraries() const;
+
+ /**
+ * Register components for the AliHLTVZERO library.
+ * @param pHandler [in] instance of the component handler
+ */
+ Int_t RegisterComponents(AliHLTComponentHandler* pHandler) const;
+
+ /** interface function, see @ref AliHLTModuleAgent for description */
+ Int_t GetHandlerDescription(AliHLTComponentDataType dt, AliHLTUInt32_t spec,
+ AliHLTOUTHandlerDesc& desc) const;
+
+ /** interface function, see @ref AliHLTModuleAgent for description */
+ AliHLTOUTHandler* GetOutputHandler(AliHLTComponentDataType dt, AliHLTUInt32_t spec);
+
+ /** interface function, see @ref AliHLTModuleAgent for description */
+ Int_t DeleteOutputHandler(AliHLTOUTHandler* pInstance);
+
+ /** interface function, see @ref AliHLTModuleAgent for description */
+ AliHLTModulePreprocessor* GetPreprocessor();
+
+ protected:
+
+ ///////////////////////////////////////////////////////////////////////////////////
+
+private:
+
+ /*
+ * ---------------------------------------------------------------------------------
+ * Private functions to implement AliHLTModuleAgent's interface.
+ * These functions provide initialization as well as the actual processing
+ * capabilities of the component.
+ * ---------------------------------------------------------------------------------
+ */
+
+ /** copy constructor prohibited */
+ AliHLTVZEROAgent(const AliHLTVZEROAgent&);
+
+ /** assignment operator prohibited */
+ AliHLTVZEROAgent& operator=(const AliHLTVZEROAgent&);
+
+ /*
+ * ---------------------------------------------------------------------------------
+ * Members - private
+ * ---------------------------------------------------------------------------------
+ */
+
+ /** ROOT specific member definition */
+ ClassDef(AliHLTVZEROAgent, 0);
+};
+
+#endif
--- /dev/null
+//-*- Mode: C++ -*-
+// $Id: AliHLTVZERORecoComponent.cxx $
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project *
+ * ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Primary Authors: Jochen Thaeder <jochen@thaeder.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 AliHLTVZERORecoComponent.cxx
+ @author Jochen Thaeder <jochen@thaeder.de>
+ @brief VZERO reconstruction component
+*/
+
+#if __GNUC__>= 3
+using namespace std;
+#endif
+
+#include "TTree.h"
+#include "TMap.h"
+#include "TObjString.h"
+
+#include "AliLog.h"
+#include "AliRunInfo.h"
+#include "AliGRPObject.h"
+#include "AliRawReaderMemory.h"
+
+#include "AliVZERORecoParam.h"
+#include "AliVZEROReconstructor.h"
+
+#include "AliHLTErrorGuard.h"
+#include "AliHLTDataTypes.h"
+#include "AliHLTVZERORecoComponent.h"
+
+/** ROOT macro for the implementation of ROOT specific class methods */
+ClassImp(AliHLTVZERORecoComponent)
+
+/*
+ * ---------------------------------------------------------------------------------
+ * Constructor / Destructor
+ * ---------------------------------------------------------------------------------
+ */
+
+// #################################################################################
+AliHLTVZERORecoComponent::AliHLTVZERORecoComponent() :
+ AliHLTProcessor(),
+ fRunInfo(NULL),
+ fDigitsTree(NULL),
+ fVZERORecoParam(NULL),
+ fVZEROReconstructor(NULL),
+ fRawReader(NULL) {
+ // an example component which implements the ALICE HLT processor
+ // interface and does some analysis on the input raw data
+ //
+ // see header file for class documentation
+ // or
+ // refer to README to build package
+ // or
+ // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+ //
+ // NOTE: all helper classes should be instantiated in DoInit()
+}
+
+// #################################################################################
+AliHLTVZERORecoComponent::~AliHLTVZERORecoComponent() {
+ // see header file for class documentation
+}
+
+/*
+ * ---------------------------------------------------------------------------------
+ * Public functions to implement AliHLTComponent's interface.
+ * These functions are required for the registration process
+ * ---------------------------------------------------------------------------------
+ */
+
+// #################################################################################
+const Char_t* AliHLTVZERORecoComponent::GetComponentID() {
+ // see header file for class documentation
+ return "VZEROReconstruction";
+}
+
+// #################################################################################
+void AliHLTVZERORecoComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list) {
+ // see header file for class documentation
+ list.push_back(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginVZERO);
+}
+
+// #################################################################################
+AliHLTComponentDataType AliHLTVZERORecoComponent::GetOutputDataType() {
+ // see header file for class documentation
+ return kAliHLTDataTypeESDContent|kAliHLTDataOriginVZERO;
+}
+
+// #################################################################################
+void AliHLTVZERORecoComponent::GetOutputDataSize( ULong_t& constBase, Double_t& inputMultiplier ) {
+ // see header file for class documentation
+ constBase = 1000;
+ inputMultiplier = 0.5;
+}
+
+// #################################################################################
+void AliHLTVZERORecoComponent::GetOCDBObjectDescription( TMap* const targetMap) {
+ // see header file for class documentation
+
+ if (!targetMap) return;
+ targetMap->Add(new TObjString("HLT/ConfigVZERO/VZEROReconstruction"),
+ new TObjString("configuration object"));
+
+ targetMap->Add(new TObjString("GRP/GRP/Data"),
+ new TObjString("GRP object - run information"));
+ targetMap->Add(new TObjString("GRP/CTP/CTPtiming"),
+ new TObjString("GRP object - CTP information"));
+ targetMap->Add(new TObjString("GRP/CTP/TimeAlign"),
+ new TObjString("GRP object - CTP information"));
+ targetMap->Add(new TObjString("GRP/Calib/LHCClockPhase"),
+ new TObjString("GRP object - time calibration"));
+
+ targetMap->Add(new TObjString("VZERO/Calib/Data"),
+ new TObjString("VZERO calibration object"));
+ targetMap->Add(new TObjString("VZERO/Calib/TimeDelays"),
+ new TObjString("VZERO calibration object"));
+ targetMap->Add(new TObjString("VZERO/Calib/TimeSlewing"),
+ new TObjString("VZERO calibration object"));
+
+ return;
+}
+
+// #################################################################################
+AliHLTComponent* AliHLTVZERORecoComponent::Spawn() {
+ // see header file for class documentation
+ return new AliHLTVZERORecoComponent;
+}
+
+/*
+ * ---------------------------------------------------------------------------------
+ * Protected functions to implement AliHLTComponent's interface.
+ * These functions provide initialization as well as the actual processing
+ * capabilities of the component.
+ * ---------------------------------------------------------------------------------
+ */
+
+// #################################################################################
+Int_t AliHLTVZERORecoComponent::DoInit( Int_t argc, const Char_t** argv ) {
+ // see header file for class documentation
+
+ Int_t iResult=0;
+
+ // -- Read configuration object : HLT/ConfigVZERO/VZEROReconstruction
+ TString cdbPath="HLT/ConfigVZERO/";
+ cdbPath+=GetComponentID();
+ iResult=ConfigureFromCDBTObjString(cdbPath);
+
+ // -- Read the component arguments
+ if (iResult>=0) {
+ iResult=ConfigureFromArgumentString(argc, argv);
+ }
+
+ // -- Get AliRunInfo variables
+ // -----------------------------
+ TObject* pOCDBEntry=LoadAndExtractOCDBObject("GRP/GRP/Data");
+ AliGRPObject* pGRP=pOCDBEntry?dynamic_cast<AliGRPObject*>(pOCDBEntry):NULL;
+
+ TString beamType = "";
+ TString lhcState = "";
+ TString runType = "";
+ Float_t beamEnergy = 0.;
+ UInt_t activeDetectors = 0;
+
+ if (pGRP) {
+ lhcState = pGRP->GetLHCState();
+ beamType = pGRP->GetBeamType();
+ runType = pGRP->GetRunType();
+ beamEnergy = pGRP->GetBeamEnergy();
+ activeDetectors = pGRP->GetDetectorMask();
+ }
+
+ // -- Initialize members
+ // -----------------------
+ do {
+ if (iResult<0) break;
+
+ fRawReader = new AliRawReaderMemory;
+ if (!fRawReader) {
+ iResult=-ENOMEM;
+ break;
+ }
+
+ // AliGRPManager grpMan;
+ // Bool_t status = grpMan.ReadGRPEntry(); // Read the corresponding OCDB entry
+ // status = grpMan.SetMagField(); // Set global field instanton
+ // AliRunInfo *runInfo = grpMan.GetRunInfo(); // Get instance of run info
+
+ fRunInfo = new AliRunInfo(lhcState.Data(), beamType.Data(),
+ beamEnergy, runType.Data(), activeDetectors);
+ if (!fRunInfo) {
+ iResult=-ENOMEM;
+ break;
+ }
+
+ fDigitsTree = new TTree("D", "Digits Tree");
+ if (!fDigitsTree) {
+ iResult=-ENOMEM;
+ break;
+ }
+
+ fVZERORecoParam = new AliVZERORecoParam;
+ if (!fVZERORecoParam) {
+ iResult=-ENOMEM;
+ break;
+ }
+
+ fVZEROReconstructor = new AliVZEROReconstructor;
+ if (!fVZEROReconstructor) {
+ iResult=-ENOMEM;
+ break;
+ }
+
+ // implement further initialization
+ } while (0);
+
+ if (iResult<0) {
+ // implement cleanup
+
+ if (fRawReader)
+ delete fRawReader;
+ fRawReader = NULL;
+
+ if (!fDigitsTree)
+ delete fDigitsTree;
+ fDigitsTree = NULL;
+
+ if (fVZERORecoParam)
+ delete fVZERORecoParam;
+ fVZERORecoParam = NULL;
+
+ if (fVZEROReconstructor)
+ delete fVZEROReconstructor;
+ fVZEROReconstructor = NULL;
+
+ if (fRunInfo)
+ delete fRunInfo;
+ fRunInfo = NULL;
+ }
+
+ if (iResult>=0) {
+ fVZEROReconstructor->SetRunInfo(fRunInfo);
+ fVZEROReconstructor->Init();
+
+ fVZEROReconstructor->SetRecoParam(fVZERORecoParam);
+ }
+
+ return iResult;
+}
+
+// #################################################################################
+Int_t AliHLTVZERORecoComponent::ScanConfigurationArgument(Int_t /*argc*/, const Char_t** argv) {
+ // Scan configuration arguments
+ // Return the number of processed arguments
+ // -EPROTO if argument format error (e.g. number expected but not found)
+ //
+ // The AliHLTComponent base class implements a parsing loop for argument strings and
+ // arrays of strings which is invoked by ConfigureFromArgumentString/ConfigureFromCDBTObjString
+ // The component needs to implement ScanConfigurationArgument in order to decode the arguments.
+
+ Int_t ii =0;
+ TString argument=argv[ii];
+
+ if (argument.IsNull()) return 0;
+
+ return 0;
+}
+
+// #################################################################################
+Int_t AliHLTVZERORecoComponent::DoDeinit() {
+ // see header file for class documentation
+
+ if (fRawReader)
+ delete fRawReader;
+ fRawReader = NULL;
+
+ if (!fDigitsTree)
+ delete fDigitsTree;
+ fDigitsTree = NULL;
+
+ if (fVZERORecoParam)
+ delete fVZERORecoParam;
+ fVZERORecoParam = NULL;
+
+ if (fVZEROReconstructor)
+ delete fVZEROReconstructor;
+ fVZEROReconstructor = NULL;
+
+ if (fRunInfo)
+ delete fRunInfo;
+ fRunInfo = NULL;
+
+ return 0;
+}
+
+// #################################################################################
+Int_t AliHLTVZERORecoComponent::DoEvent(const AliHLTComponentEventData& /*evtData*/,
+ AliHLTComponentTriggerData& /*trigData*/) {
+ // see header file for class documentation
+
+ Int_t iResult=0;
+
+ // -- Only use data event
+ if (!IsDataEvent())
+ return 0;
+
+ // -- Get VZERO raw dat a input block and set up the rawreader
+ const AliHLTComponentBlockData* pBlock = GetFirstInputBlock(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginVZERO);
+ if (!pBlock) {
+ HLTError("No VZERO input block !!!");
+ return -1;
+ }
+
+ // -- Add input block to raw reader
+ if (!fRawReader->SetMemory((UChar_t*) pBlock->fPtr, pBlock->fSize )){
+ HLTError("Could not add buffer of data block %s, 0x%08x to rawreader",
+ DataType2Text(pBlock->fDataType).c_str(), pBlock->fSpecification);
+ iResult = -1;
+ }
+
+ if (iResult >= 0) {
+
+ // -- Set VZERO EquipmentID
+ fRawReader->SetEquipmentID(3584);
+
+ // -- 1. step VZERO reconstruction
+ fVZEROReconstructor->ConvertDigits(fRawReader, fDigitsTree);
+
+ // -- 2. step VZERO reconstruction -- fill AliESDVZERO object
+ fVZEROReconstructor->FillESD(fDigitsTree, NULL, NULL);
+
+ // -- Send AliESDVZERO
+ PushBack(static_cast<TObject*>(fVZEROReconstructor->GetESDVZERO()),
+ kAliHLTDataTypeESDContent|kAliHLTDataOriginVZERO,0);
+ }
+
+ // -- Clean up
+ fDigitsTree->Reset();
+ fRawReader->ClearBuffers();
+
+ return iResult;
+}
+
+// #################################################################################
+Int_t AliHLTVZERORecoComponent::Reconfigure(const Char_t* cdbEntry, const Char_t* chainId) {
+ // see header file for class documentation
+
+ Int_t iResult=0;
+ TString cdbPath;
+ if (cdbEntry) {
+ cdbPath=cdbEntry;
+ } else {
+ cdbPath="HLT/ConfigVZERO/";
+ cdbPath+=GetComponentID();
+ }
+
+ AliInfoClass(Form("reconfigure '%s' from entry %s%s", chainId, cdbPath.Data(), cdbEntry?"":" (default)"));
+ iResult=ConfigureFromCDBTObjString(cdbPath);
+
+ return iResult;
+}
+
+// #################################################################################
+Int_t AliHLTVZERORecoComponent::ReadPreprocessorValues(const Char_t* /*modules*/) {
+ // see header file for class documentation
+ ALIHLTERRORGUARD(5, "ReadPreProcessorValues not implemented for this component");
+ return 0;
+}
--- /dev/null
+//-*- Mode: C++ -*-
+// $Id: AliHLTVZERORecoComponent $
+
+#ifndef ALIHLTVZERORECOCOMPONENT_H
+#define ALIHLTVZERORECOCOMPONENT_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 AliHLTVZERORecoComponent.h
+ @author Jochen Thaeder <jochen@thaeder.de>
+ @brief VZERO reconstruction component
+*/
+
+// see below for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+
+#include "AliHLTProcessor.h"
+
+class TTree;
+
+class AliRunInfo;
+class AliESDVZERO;
+class AliRawReaderMemory;
+class AliVZERORecoParam;
+class AliVZEROReconstructor;
+
+/**
+ * @class AliHLTVZERORecoComponent
+ * Reconstruction of VZERO data
+ *
+ * <h2>General properties:</h2>
+ *
+ * Component ID: \b VZEROReconstruction <br>
+ * Library: \b libAliHLTVZERO.so <br>
+ * Input Data Types: @ref kAliHLTDataTypeDDLRaw <br>
+ * Output Data Types: @ref kAliHLTDataTypeESDContent|kAliHLTDataOriginVZERO <br>
+ *
+ * <h2>Mandatory arguments:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ *
+ * <h2>Optional arguments:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ *
+ * <h2>Configuration:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ *
+ * <h2>Default CDB entries:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ *
+ * <tt>HLT/ConfigVZERO/VZEROReconstruction</tt>
+ * \li -TObjString object holding a string with the configuration parameters
+ * currently empty
+ *
+ * <tt>GRP/GRP/Data</tt>
+ * \li -GRP object - run information
+ *
+ * <tt>GRP/CTP/CTPtiming</tt>
+ * \li -GRP object - CTP information
+ *
+ * <tt>GRP/CTP/TimeAlign</tt>
+ * \li -GRP object - CTP information
+ *
+ * <tt>GRP/Calib/LHCClockPhase</tt>
+ * \li -GRP object - time calibration
+ *
+ * <tt>VZERO/Calib/Data</tt>
+ * \li -VZERO calibration object
+ *
+ * <tt>VZERO/Calib/TimeDelays</tt>
+ * \li -VZERO calibration object
+ *
+ * <tt>VZERO/Calib/TimeSlewing</tt>
+ * \li -VZERO calibration object
+ *
+ * <h2>Performance:</h2>
+ *
+ * <h2>Memory consumption:</h2>
+ *
+ * <h2>Input size:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ *
+ * \li pp: 5968 Byte
+ *
+ * <h2>Output size:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ *
+ * \li pp: Average : 1.8 kByte
+ *
+ * <h2>Macros Tests</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ *
+ * <tt>macros/makeConfigurationObjectVZEROReconstruction.C</tt>
+ * \li - Create configuration TObjString
+ *
+ * <tt>macros/HLTVZEROTest.C</tt>
+ * \li - Test macro for VZERO test in off-line environment
+ *
+ * <tt>macros/runVZEROTest.sh</tt>
+ * \li - Run Test macro HLTVZEROTest.C
+ *
+ * @ingroup alihlt_vzero
+ */
+class AliHLTVZERORecoComponent : public AliHLTProcessor {
+public:
+
+ /*
+ * ---------------------------------------------------------------------------------
+ * Constructor / Destructor
+ * ---------------------------------------------------------------------------------
+ */
+
+ /** constructor */
+ AliHLTVZERORecoComponent();
+
+ /** destructor */
+ virtual ~AliHLTVZERORecoComponent();
+
+ /*
+ * ---------------------------------------------------------------------------------
+ * Public functions to implement AliHLTComponent's interface.
+ * These functions are required for the registration process
+ * ---------------------------------------------------------------------------------
+ */
+
+ /** interface function, see @ref AliHLTComponent for description */
+ const Char_t* GetComponentID();
+
+ /** interface function, see @ref AliHLTComponent for description */
+ void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
+
+ /** interface function, see @ref AliHLTComponent for description */
+ AliHLTComponentDataType GetOutputDataType();
+
+ /** interface function, see @ref AliHLTComponent for description */
+ void GetOutputDataSize( ULong_t& constBase, Double_t& inputMultiplier );
+
+ /** interface function, see @ref AliHLTComponent for description */
+ void GetOCDBObjectDescription( TMap* const targetMap);
+
+ /** interface function, see @ref AliHLTComponent for description */
+ AliHLTComponent* Spawn();
+
+ protected:
+
+ /*
+ * ---------------------------------------------------------------------------------
+ * Protected functions to implement AliHLTComponent's interface.
+ * These functions provide initialization as well as the actual processing
+ * capabilities of the component.
+ * ---------------------------------------------------------------------------------
+ */
+
+ // AliHLTComponent interface functions
+
+ /** interface function, see @ref AliHLTComponent for description */
+ Int_t DoInit( Int_t argc, const Char_t** argv );
+
+ /** interface function, see @ref AliHLTComponent for description */
+ Int_t DoDeinit();
+
+ /** interface function, see @ref AliHLTComponent for description */
+ Int_t DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
+
+ using AliHLTProcessor::DoEvent;
+
+ /** interface function, see @ref AliHLTComponent for description */
+ Int_t ScanConfigurationArgument(Int_t argc, const Char_t** argv);
+
+ /** interface function, see @ref AliHLTComponent for description */
+ Int_t Reconfigure(const Char_t* cdbEntry, const Char_t* chainId);
+
+ /** interface function, see @ref AliHLTComponent for description */
+ Int_t ReadPreprocessorValues(const Char_t* modules);
+
+ ///////////////////////////////////////////////////////////////////////////////////
+
+private:
+
+ /*
+ * ---------------------------------------------------------------------------------
+ * Private functions to implement AliHLTComponent's interface.
+ * These functions provide initialization as well as the actual processing
+ * capabilities of the component.
+ * ---------------------------------------------------------------------------------
+ */
+
+ /** copy constructor prohibited */
+ AliHLTVZERORecoComponent(const AliHLTVZERORecoComponent&);
+
+ /** assignment operator prohibited */
+ AliHLTVZERORecoComponent& operator=(const AliHLTVZERORecoComponent&);
+
+ /*
+ * ---------------------------------------------------------------------------------
+ * Members - private
+ * ---------------------------------------------------------------------------------
+ */
+
+ /** runInfo Object */
+ AliRunInfo *fRunInfo; // see above
+
+ /** Digits Tree */
+ TTree *fDigitsTree; //! transient
+
+ /** VZERO reco param instance */
+ AliVZERORecoParam *fVZERORecoParam; //! transient
+
+ /** VZERO reconstructor instance */
+ AliVZEROReconstructor *fVZEROReconstructor; //! transient
+
+ /** Rawreader instance */
+ AliRawReaderMemory *fRawReader; //! transient
+
+ ClassDef(AliHLTVZERORecoComponent, 0)
+};
+#endif
--- /dev/null
+# $Id: Makefile.am $
+# Makefile for the Alice HLT VZERO library
+
+MODULE = AliHLTVZERO
+
+###################################################################
+
+EXTRA_DIST =
+
+MODDIR = $(top_srcdir)
+PKGDEF = $(MODDIR)/libAliHLTVZERO.pkg
+include $(top_srcdir)/libAliHLTVZERO.pkg
+
+###################################################################
+
+# library definition
+lib_LTLIBRARIES = libAliHLTVZERO.la
+
+# version info for the library
+LIBRARY_VERSION = '0:0:0'
+
+# library sources
+# The source files are specified in libAliHLTVZERO.pkg
+libAliHLTVZERO_la_SOURCES = $(MODULE_SRCS)
+
+# library headers
+# The header files are specified in libAliHLTVZERO.pkg
+noinst_HEADERS = $(MODULE_HDRS)
+
+###################################################################
+
+# compilation flags of the library
+AM_CPPFLAGS = -DMODULE=$(MODULE) \
+ @HLTBASE_CPPFLAGS@ \
+ @ALIROOT_CPPFLAGS@ \
+ @ROOTCFLAGS@ \
+ $(foreach i, $(EINCLUDE), \
+ $(shell echo $(i) | sed -e "/HLT\//!d" -e "s|HLT/|-I$(top_srcdir)/|")) \
+ $(foreach i, $(EINCLUDE), \
+ $(shell echo $(i) | sed -e "/HLT\//d" -e "s|^|-I$(ALICE_ROOT)/|"))
+
+# linking flags of the library# linker flags
+#libAliHLTVZERO_la_LIBADD = $(top_builddir)/BASE/util/libAliHLTUtil.la
+libAliHLTVZERO_la_LDFLAGS = -L@ROOTLIBDIR@ \
+ @ROOTLIBS@ \
+ @HLTBASE_LDFLAGS@ \
+ @ALIROOT_LDFLAGS@ \
+ @ALIROOT_LIBS@ \
+ -version-info $(LIBRARY_VERSION)
+
+###############################################################################
+
+# automatic generation of data and time of library build
+COMPILE_INFO = AliHLTVZEROCompileInfo.cxx
+
+# set the file name for the generated root dictionary
+DICTCPP = AliHLTVZERO-DICT.cxx
+nodist_libAliHLTVZERO_la_SOURCES= $(COMPILE_INFO) \
+ $(DICTCPP)
+
+CLEANFILES = $(COMPILE_INFO)
+
+###############################################################################
+
+include $(top_srcdir)/make.dict
+
+###################################################################
+
+$(COMPILE_INFO): $(libAliHLTVZERO_la_SOURCES) $(pkginclude_HEADERS) $(noinst_HEADERS) Makefile.am
+ @echo '//automatically generated compilation info' > $@
+ @echo '//!!! DO NOT EDIT THIS FILE !!!' >> $@
+ @echo '//add changes in Makefile.am' >> $@
+ @echo 'extern "C" void CompileInfo(const char*& date, const char*& time)' >> $@
+ @echo '{date=__DATE__; time=__TIME__; return;}' >> $@
--- /dev/null
+// $Id: HLTVZEROTest.C 43204 2010-08-30 07:47:06Z richterm $
+void HLTVZEROTest();
+/**
+ * @file HLTVZEROTest.C
+ * @brief Example macro to run the AliHLTSampleRawAnalysisComponent in
+ * AliReconstruction.
+ *
+ * The component subscribes to DDL raw data published by the
+ * AliHLTRawReaderPublisherComponent. The macros requires a raw data file
+ * and a corresponding GRP entry.
+ *
+ * <pre>
+ * Usage: aliroot -b -q -l \
+ * HLTVZEROTest.C'("rawfile", "cdb", minEvent, maxEvent)'
+ *
+ * Examples:
+ * HLTVZEROTest.C'("raw.root", minEvent, MaxEvent)'
+ * HLTVZEROTest.C'("./", minEvent, MaxEvent)'
+ * HLTVZEROTest.C'("alien:///alice/data/2010/.../raw/....root")'
+ *
+ * Defaults
+ * cdb="local://$ALICE_ROOT/OCDB" -> take local OCDB from distribution
+ * minEvent=-1 -> no lower event selection
+ * maxEvent=-1 -> no upper event selection
+ *
+ * </pre>
+ *
+ * The input file can be a local raw.root file but also a file from the
+ * GRID. The separate DDL files generated in simulation can be accessed
+ * using AliRawReaderFile by speficying "directory/".
+ *
+ * Since the macro runs AliReconstruction the OCDB needs to be set up, in
+ * particular the GRP entry. If testing with a local OCDB you have to
+ * simulate some events and run the macro in the folder of the simulation.
+ * Also HLT components configure from objects in the OCDB.
+ *
+ * Note: You need a valid GRID token, if you want to access files directly
+ * from the Grid, use 'alien-token-init' of your alien installation.
+ *
+ * @author Matthias.Richter@ift.uib.no
+ * @ingroup alihlt_tutorial
+ */
+
+
+// ----------------------------------------------------------------------------
+void HLTVZEROTest(const Char_t *filename, const Char_t *cdbURI,
+ Int_t minEvent=-1, Int_t maxEvent=-1) {
+
+ printf (" ============================================= \n\n");
+ printf (" TEST VZERO RECONSTRUCTION \n\n");
+ printf (" ============================================= \n");
+
+ if(!gSystem->AccessPathName("galice.root")){
+ cerr << "AliReconstruction on raw data requires to delete galice.root, ";
+ cerr << "or run at different place." << endl;
+ cerr << "!!! DO NOT DELETE the galice.root of your simulation, ";
+ cerr << "but create a subfolder !!!!" << endl;
+ return;
+ }
+
+ if (gSystem->AccessPathName(filename)) {
+ cerr << "can not find file " << filename << endl;
+ return;
+ }
+
+ // -- connect to the GRID if we use a file or OCDB from the GRID
+ TString struri=cdbURI;
+ TString strfile=filename;
+ if (struri.BeginsWith("raw://") ||
+ strfile.Contains("://") && !strfile.Contains("local://")) {
+ TGrid::Connect("alien");
+ }
+
+ // -- Set the CDB storage location
+ AliCDBManager * man = AliCDBManager::Instance();
+ man->SetDefaultStorage(cdbURI);
+ if (struri.BeginsWith("local://")) {
+ // set specific storage for GRP entry
+ // search in the working directory and one level above, the latter
+ // follows the standard simulation setup like e.g. in test/ppbench
+ if (!gSystem->AccessPathName("GRP/GRP/Data")) {
+ man->SetSpecificStorage("GRP/GRP/Data", "local://$PWD");
+ } else if (!gSystem->AccessPathName("../GRP/GRP/Data")) {
+ man->SetSpecificStorage("GRP/GRP/Data", "local://$PWD/..");
+ } else {
+ cerr << "can not find a GRP entry, please run the macro in the folder" << endl;
+ cerr << "of a simulated data sample, or specify a GRID OCDB" << endl;
+ HLTVZEROTest();
+ return;
+ }
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////
+ //
+ // Reconstruction settings
+ AliReconstruction rec;
+
+ if (minEvent>=0 || maxEvent>minEvent) {
+ if (minEvent<0) minEvent=0;
+ if (maxEvent<minEvent) maxEvent=minEvent;
+ rec.SetEventRange(minEvent,maxEvent);
+ }
+
+ rec.SetRunReconstruction("HLT");
+ rec.SetLoadAlignFromCDB(kFALSE);
+ rec.SetWriteESDfriend(kFALSE);
+
+ // due to bug ...
+ // StopOnError needs to be disabled
+ rec.SetStopOnError(kFALSE);
+ rec.SetRunVertexFinder(kFALSE);
+ rec.SetInput(filename);
+
+ // QA options
+ rec.SetRunQA(":") ;
+ //rec.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;
+
+ //////////////////////////////////////////////////////////////////////////////////////
+ //
+ // setup the HLT system
+ AliHLTSystem* pHLT=AliHLTPluginBase::GetInstance();
+
+ // define a data publisher configuration for VZERO raw data
+ AliHLTConfiguration publisher("RAW-Publisher",
+ "AliRawReaderPublisher",
+ "",
+ "-equipmentid 3584 "
+ "-datatype 'DDL_RAW ' 'VZRO' "
+ "-dataspec 0x01"
+ );
+
+ // define configuration of the VZEROReconstruction component
+ AliHLTConfiguration vzeroReco("VZERO-Reconstruction",
+ "VZEROReconstruction",
+ "RAW-Publisher",
+ ""
+ );
+
+ // define configuration of the GlobalEsdConverter component
+ AliHLTConfiguration esdConverter("GLOBAL-ESD-Converter",
+ "GlobalEsdConverter",
+ "VZERO-Reconstruction",
+ ""
+ );
+
+ // define configuration for Root file writer of VZERO output
+ AliHLTConfiguration rootWriter("RootWriter",
+ "ROOTFileWriter",
+ "VZERO-Reconstruction GLOBAL-ESD-Converter",
+ "-directory analysis -datafile vzeroRec"
+ );
+
+
+
+ // set option for the HLT module in AliReconstruction
+ // arguments
+ // - ignore-hltout : ignore the HLTOUT payload from the HLT DDLs
+ // - libraries to be used as plugins
+ // - loglevel=0x7c : Important, Info, Warning, Error, Fatal
+ rec.SetOption("HLT",
+ "ignore-hltout "
+ "libAliHLTUtil.so libAliHLTGlobal.so libAliHLTVZERO.so "
+ "loglevel=0x7c "
+ "chains=GLOBAL-ESD-Converter,RootWriter"
+ );
+
+ rec.SetRunPlaneEff(kFALSE);
+
+ // switch off cleanESD
+ rec.SetCleanESD(kFALSE);
+
+ AliLog::Flush();
+ rec.Run();
+}
+
+// ----------------------------------------------------------------------------
+void HLTVZEROTest(const Char_t *filename, Int_t minEvent=-1, Int_t maxEvent=-1){
+ HLTVZEROTest(filename, "local://$ALICE_ROOT/OCDB", minEvent, maxEvent);
+}
+
+// ----------------------------------------------------------------------------
+void HLTVZEROTest() {
+ cout << "HLTVZEROTest: Run HLT component 'VZEROReconstruction' in AliReconstruction" << endl;
+ cout << " Usage: aliroot -b -q -l \\" << endl;
+ cout << " HLTVZEROTest.C'(\"file\", \"cdb\", minEvent, maxEvent)'" << endl;
+ cout << "" << endl;
+ cout << " Examples:" << endl;
+ cout << " HLTVZEROTest.C'(\"raw.root\", minEvent, MaxEvent)'" << endl;
+ cout << " HLTVZEROTest.C'(\"./\", minEvent, MaxEvent)'" << endl;
+ cout << " HLTVZEROTest.C'(\"alien:///alice/data/2010/.../raw/....root\")' " << endl;
+ cout << "" << endl;
+ cout << " Defaults" << endl;
+ cout << " cdb=\"local://$ALICE_ROOT/OCDB\" -> take local OCDB" << endl;
+ cout << " minEvent=-1 -> no lower event selection" << endl;
+ cout << " maxEvent=-1 -> no upper event selection" << endl;
+}
--- /dev/null
+//-*- Mode: C++ -*-
+// $Id: makeConfigurationObjectVZEROReconstruction.C$
+/**
+ * @file makeConfigurationObjectVZEROReconstruction.C
+ * @brief Creation of HLT component configuration objects in OCDB
+ *
+ * <pre>
+ * Usage: aliroot -b -q makeConfigurationObjectVZEROReconstruction.C'("param", "uri", runMin, runMax)'
+ * </pre>
+ *
+ * Create an OCDB entry with a TObjString containing param for the
+ * VZERO reconstruction.
+ *
+ * Parameters: <br>
+ * - param (opt) string to be stored in the TObjSting, default empty
+ * - uri (opt) the OCDB URI, default $ALICE_ROOT
+ * - runMin (opt) default 0
+ * - runMax (opt) default 999999999
+ *
+ * Current Param :
+ * - "" <pre> aliroot -b -q makeConfigurationObjectVZEROReconstruction.C </pre>
+ *
+ * @author Jochen Thaeder <jochen@thaeder.de>
+ * @ingroup alihlt_vzero
+ */
+void makeConfigurationObjectVZEROReconstruction(const Char_t* param="", const Char_t* cdbUri=NULL,
+ Int_t runMin=0, Int_t runMax=AliCDBRunRange::Infinity()) {
+
+ // --------------------------------------
+ // -- Setup CDB
+ // --------------------------------------
+
+ AliCDBManager* man = AliCDBManager::Instance();
+ if (!man) {
+ cerr << "Error : Can not get AliCDBManager" << end;
+ exit;
+ }
+
+ TString storage;
+ if (!man->IsDefaultStorageSet()) {
+ if ( cdbUri ) {
+ storage = cdbUri;
+ if ( storage.Contains("://") == 0 ) {
+ storage = "local://";
+ storage += cdbUri;
+ }
+ }
+ else {
+ storage="local://$ALICE_ROOT/OCDB";
+ }
+ man->SetDefaultStorage(storage);
+ }
+ else {
+ storage = man->GetDefaultStorage()->GetURI();
+ }
+
+ TString path("HLT/ConfigVZERO/VZEROReconstruction");
+
+ // --------------------------------------
+ // -- Create Config Object
+ // --------------------------------------
+
+ // here is the actual content of the configuration object
+ TObjString configParam=param;
+
+ TObject *configObj = static_cast<TObject*>(&configParam);
+ // --------------------------------------
+ // -- Fill Object
+ // --------------------------------------
+
+ if ( !configObj ) {
+ cerr << "Error : No configuration object created" << endl;
+ return;
+ }
+
+ AliCDBPath cdbPath(path);
+ AliCDBId cdbId(cdbPath, runMin, runMax);
+ AliCDBMetaData cdbMetaData;
+ man->Put(configObj, cdbId, &cdbMetaData);
+
+ printf("Adding %s type OCDB object to %s [%d,%d] in %s \n",
+ configObj->ClassName(),
+ path.Data(),
+ runMin, runMax, storage.Data());
+}
+
--- /dev/null
+#!/bin/bash
+
+# -------------------------------------------
+# Test VZERO reconstruction
+# Author Jochen Thaeder <jochen@thaeder.de>
+# -------------------------------------------
+
+# N events
+NEVENTS=20
+
+# Path to raw.root
+RAWPATH="/opt/HLT/aliroot/AliRoot_HEAD_2010-09-01/test/ppbench/recraw"
+
+# -------------------------------------------
+
+pushd $RAWPATH > /dev/null
+
+rm *.root 2> /dev/null
+rm *.log 2> /dev/null
+rm *.ps 2> /dev/null
+
+ln -s ../raw.root
+
+if [ ! -d ./analysis ] ; then
+ mkdir analysis
+else
+ rm ./analysis/*
+fi
+
+# -- Create config CDB object
+aliroot -l -q -b ${ALICE_ROOT}/HLT/VZERO/macros/makeConfigurationObjectVZEROReconstruction.C
+
+# -- run chain for raw.root file
+aliroot -l -q -b $ALICE_ROOT/HLT/VZERO/macros/HLTVZEROTest.C'("'${RAWPATH}'/raw.root","local://$ALICE_ROOT/OCDB",1,'${NEVENTS}')' 2>&1 | tee out.log
+
+popd > /dev/null
\ No newline at end of file