#include "TTree.h"
#include "TMap.h"
#include "TObjString.h"
+#include "TDatime.h"
#include "AliLog.h"
#include "AliRunInfo.h"
#include "AliGRPObject.h"
#include "AliRawReaderMemory.h"
+#include "AliGeomManager.h"
#include "AliVZERORecoParam.h"
#include "AliVZEROReconstructor.h"
// #################################################################################
AliHLTVZERORecoComponent::AliHLTVZERORecoComponent() :
AliHLTProcessor(),
- fRunInfo(NULL),
- fDigitsTree(NULL),
+ fRunInfo(NULL),
fVZERORecoParam(NULL),
fVZEROReconstructor(NULL),
fRawReader(NULL) {
Int_t iResult=0;
+ // -- Load GeomManager
+ if(AliGeomManager::GetGeometry()==NULL){
+ AliGeomManager::LoadGeometry();
+ }
+
// -- Read configuration object : HLT/ConfigVZERO/VZEROReconstruction
TString cdbPath="HLT/ConfigVZERO/";
cdbPath+=GetComponentID();
break;
}
- fDigitsTree = new TTree("D", "Digits Tree");
- if (!fDigitsTree) {
- iResult=-ENOMEM;
- break;
- }
-
fVZERORecoParam = new AliVZERORecoParam;
if (!fVZERORecoParam) {
iResult=-ENOMEM;
delete fRawReader;
fRawReader = NULL;
- if (!fDigitsTree)
- delete fDigitsTree;
- fDigitsTree = NULL;
-
if (fVZERORecoParam)
delete fVZERORecoParam;
fVZERORecoParam = NULL;
delete fRawReader;
fRawReader = NULL;
- if (!fDigitsTree)
- delete fDigitsTree;
- fDigitsTree = NULL;
-
if (fVZERORecoParam)
delete fVZERORecoParam;
fVZERORecoParam = NULL;
// -- 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;
+ HLTInfo("No VZERO input block !!!");
+ return 0;
}
// -- Add input block to raw reader
iResult = -1;
}
+ TTree *digitsTree = new TTree("D", "Digits Tree");
+ if (!digitsTree) {
+ iResult=-ENOMEM;
+ }
+
if (iResult >= 0) {
// -- Set VZERO EquipmentID
fRawReader->SetEquipmentID(3584);
// -- 1. step VZERO reconstruction
- fVZEROReconstructor->ConvertDigits(fRawReader, fDigitsTree);
+ fVZEROReconstructor->ConvertDigits(fRawReader, digitsTree);
// -- 2. step VZERO reconstruction -- fill AliESDVZERO object
- fVZEROReconstructor->FillESD(fDigitsTree, NULL, NULL);
+ fVZEROReconstructor->FillESD(digitsTree, NULL, NULL);
+
+ AliESDVZERO *esdVZERO = fVZEROReconstructor->GetESDVZERO();
+
+ // Send info every 10 s
+ const TDatime time;
+ static UInt_t lastTime=0;
+ if (time.Get()-lastTime>10) {
+ lastTime=time.Get();
+ HLTInfo("VZERO Multiplicity A %f - C %f", esdVZERO->GetMTotV0A(), esdVZERO->GetMTotV0A() );
+ }
// -- Send AliESDVZERO
- PushBack(static_cast<TObject*>(fVZEROReconstructor->GetESDVZERO()),
- kAliHLTDataTypeESDContent|kAliHLTDataOriginVZERO,0);
+ PushBack(esdVZERO, kAliHLTDataTypeESDContent|kAliHLTDataOriginVZERO,0);
}
// -- Clean up
- fDigitsTree->Reset();
+ delete digitsTree;
fRawReader->ClearBuffers();
return iResult;