]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TRD/AliHLTTRDClusterizerComponent.cxx
TRD online reco update (Theodor)
[u/mrichter/AliRoot.git] / HLT / TRD / AliHLTTRDClusterizerComponent.cxx
1 // $Id$
2
3 //**************************************************************************
4 //* This file is property of and copyright by the ALICE HLT Project        * 
5 //* ALICE Experiment at CERN, All rights reserved.                         *
6 //*                                                                        *
7 //* Primary Authors:                                                       *
8 //*                  for The ALICE HLT Project.                            *
9 //*                                                                        *
10 //* Permission to use, copy, modify and distribute this software and its   *
11 //* documentation strictly for non-commercial purposes is hereby granted   *
12 //* without fee, provided that the above copyright notice appears in all   *
13 //* copies and that both the copyright notice and this permission notice   *
14 //* appear in the supporting documentation. The authors make no claims     *
15 //* about the suitability of this software for any purpose. It is          *
16 //* provided "as is" without express or implied warranty.                  *
17 //**************************************************************************
18
19 /** @file   AliHLTTRDClusterizerComponent.cxx
20     @author 
21     @date   
22     @brief  A TRDClusterizer processing component for the HLT. 
23 */
24
25 // see header file for class documentation                                   //
26 // or                                                                        //
27 // refer to README to build package                                          //
28 // or                                                                        //
29 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt                          //
30
31 #if __GNUC__ >= 3
32 using namespace std;
33 #endif
34
35 #include "TTree.h"
36 #include "TFile.h"
37 #include "TBranch.h"
38
39 #include "AliHLTTRDClusterizerComponent.h"
40 #include "AliHLTTRDDefinitions.h"
41 #include "AliHLTTRDCluster.h"
42
43 #include "AliGeomManager.h"
44 #include "AliTRDReconstructor.h"
45 #include "AliCDBManager.h"
46 #include "AliCDBStorage.h"
47 #include "AliCDBEntry.h"
48 #include "AliHLTTRDClusterizer.h"
49 #include "AliTRDrecoParam.h"
50 #include "AliTRDrawStreamBase.h"
51 #include "AliTRDcluster.h"
52
53 #include "AliRawReaderMemory.h"
54
55 #ifdef HAVE_VALGRIND_CALLGRIND_H
56 #include <valgrind/callgrind.h>
57 #else
58 #define CALLGRIND_START_INSTRUMENTATION do { } while (0)
59 #define CALLGRIND_STOP_INSTRUMENTATION do { } while (0)
60 #endif
61
62 #include <cstdlib>
63 #include <cerrno>
64 #include <string>
65
66 #include "AliTRDrawStream.h"
67 #include "AliTRDrawFastStream.h"
68
69 ClassImp(AliHLTTRDClusterizerComponent)
70    
71 AliHLTTRDClusterizerComponent::AliHLTTRDClusterizerComponent()
72 : AliHLTProcessor(),
73   fOutputPercentage(500),
74   fOutputConst(0),
75   fClusterizer(NULL),
76   fRecoParam(NULL),
77   fMemReader(NULL),
78   fReconstructor(NULL),
79   fRecoParamType(-1),
80   fRecoDataType(-1),
81   fRawDataVersion(2),
82   fyPosMethod(1),
83   fgeometryFileName(""),
84   fProcessTracklets(kFALSE),
85   fHLTstreamer(kTRUE),
86   fTC(kFALSE)
87 {
88   // Default constructor
89
90 }
91
92 AliHLTTRDClusterizerComponent::~AliHLTTRDClusterizerComponent()
93 {
94   // Destructor
95   // Work is Done in DoDeInit()
96 }
97
98
99 const char* AliHLTTRDClusterizerComponent::GetComponentID()
100 {
101   // Return the component ID const char *
102   return "TRDClusterizer"; // The ID of this component
103 }
104
105 void AliHLTTRDClusterizerComponent::GetInputDataTypes( vector<AliHLTComponent_DataType>& list)
106 {
107   // Get the list of input data
108   list.clear(); // We do not have any requirements for our input data type(s).
109   list.push_back(kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTRD);
110 }
111
112 AliHLTComponentDataType AliHLTTRDClusterizerComponent::GetOutputDataType()
113 {
114   // Get the output data type
115   return kAliHLTMultipleDataType;
116 }
117
118 int AliHLTTRDClusterizerComponent::GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList)
119 {
120   // Get the output data type
121   tgtList.clear();
122   tgtList.push_back(AliHLTTRDDefinitions::fgkClusterDataType);
123   tgtList.push_back(AliHLTTRDDefinitions::fgkMCMtrackletDataType);
124   return tgtList.size();
125 }
126
127
128 void AliHLTTRDClusterizerComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
129 {
130   // Get the output data size
131   constBase = fOutputConst;
132   inputMultiplier = ((double)fOutputPercentage)/100.0;
133 }
134
135 AliHLTComponent* AliHLTTRDClusterizerComponent::Spawn()
136 {
137   // Spawn function, return new instance of this class
138   return new AliHLTTRDClusterizerComponent;
139 };
140
141 int AliHLTTRDClusterizerComponent::DoInit( int argc, const char** argv )
142 {
143   // perform initialization. We check whether our relative output size is specified in the arguments.
144   int iResult=0;
145   
146   fReconstructor = new AliTRDReconstructor();
147   HLTDebug("TRDReconstructor at 0x%x", fReconstructor);
148
149   TString configuration="";
150   TString argument="";
151   for (int i=0; i<argc && iResult>=0; i++) {
152     argument=argv[i];
153     if (!configuration.IsNull()) configuration+=" ";
154     configuration+=argument;
155   }
156
157   if (!configuration.IsNull()) {
158     iResult=Configure(configuration.Data());
159   } else {
160     iResult=Reconfigure(NULL, NULL);
161   }
162
163   if(!fClusterizer){
164     HLTFatal("Clusterizer was not initialized!");
165     return -1;
166   }
167
168   if(iResult<0) return iResult;
169
170   fMemReader = new AliRawReaderMemory;
171   fClusterizer->SetReconstructor(fReconstructor);
172   fClusterizer->SetUseLabels(kFALSE);
173
174   if(fReconstructor->IsProcessingTracklets())
175     fOutputConst = fClusterizer->GetTrMemBlockSize();
176
177   return iResult;
178 }
179
180 int AliHLTTRDClusterizerComponent::DoDeinit()
181 {
182   // Deinitialization of the component
183   delete fMemReader;
184   fMemReader = 0;
185   delete fClusterizer;
186   fClusterizer = 0;
187   
188   fReconstructor->SetClusters(0x0);
189   delete fReconstructor;
190   fReconstructor = 0x0;
191   return 0;
192
193   if (fRecoParam)
194     {
195       HLTDebug("Deleting fRecoParam");
196       delete fRecoParam;
197       fRecoParam = 0;
198     }
199 }
200
201 int AliHLTTRDClusterizerComponent::DoEvent( const AliHLTComponentEventData& evtData, 
202                                             const AliHLTComponentBlockData* blocks, 
203                                             AliHLTComponent_TriggerData& /*trigData*/, 
204                                             AliHLTUInt8_t* outputPtr, 
205                                             AliHLTUInt32_t& size, 
206                                             vector<AliHLTComponent_BlockData>& outputBlocks )
207 {
208   // Process an event
209
210   if (evtData.fEventID == 1)
211     CALLGRIND_START_INSTRUMENTATION;
212
213   HLTDebug( "NofBlocks %i", evtData.fBlockCnt );
214   // Process an event
215   AliHLTUInt32_t totalSize = 0, offset = 0;
216
217   //implement a usage of the following
218   //   AliHLTUInt32_t triggerDataStructSize = trigData.fStructSize;
219   //   AliHLTUInt32_t triggerDataSize = trigData.fDataSize;
220   //   void *triggerData = trigData.fData;
221   //HLTDebug( "Trigger data received. Struct size %d Data size %d Data location 0x%x", trigData.fStructSize, trigData.fDataSize, (UInt_t*)trigData.fData);
222
223   // Loop over all input blocks in the event
224   AliHLTComponentDataType expectedDataType = (kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTRD);
225   for ( UInt_t iBlock = 0; iBlock < evtData.fBlockCnt; iBlock++ )
226     {      
227       const AliHLTComponentBlockData &block = blocks[iBlock];
228       // lets not use the internal TRD data types here : AliHLTTRDDefinitions::fgkDDLRawDataType
229       // which is depreciated - we use HLT global defs instead
230       //      if ( block.fDataType != (kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTRD) )
231       AliHLTComponentDataType inputDataType = block.fDataType;
232       if ( inputDataType != expectedDataType)
233         {
234           HLTDebug( "Block # %i/%i; Event 0x%08LX (%Lu) Wrong received datatype: %s - required datatype: %s; Skipping",
235                     iBlock, evtData.fBlockCnt,
236                     evtData.fEventID, evtData.fEventID, 
237                     DataType2Text(inputDataType).c_str(), 
238                     DataType2Text(expectedDataType).c_str());
239           continue;
240         }
241       else 
242         {
243           HLTDebug("We get the right data type: Block # %i/%i; Event 0x%08LX (%Lu) Received datatype: %s; Block Size: %i",
244                    iBlock, evtData.fBlockCnt,
245                    evtData.fEventID, evtData.fEventID, 
246                    DataType2Text(inputDataType).c_str(),
247                    block.fSize);
248         }
249       
250 #ifndef NDEBUG
251       unsigned long constBase;
252       double inputMultiplier;
253       GetOutputDataSize(constBase,inputMultiplier);
254       if(size<(constBase+block.fSize*inputMultiplier)){
255         HLTWarning("Memory Block given might be too small: %i < %i; Event %Lu", size, constBase+block.fSize*inputMultiplier, evtData.fEventID);
256       }
257 #endif
258
259       // fMemReader->Reset();
260       fMemReader->SetMemory((UChar_t*) block.fPtr, block.fSize);
261
262       AliHLTUInt32_t spec = block.fSpecification;
263       
264       Int_t id = 1024;
265       
266       for ( Int_t ii = 0; ii < 18 ; ii++ ) {
267         if ( spec & 0x1 ) {
268           id += ii;
269           break;
270         }
271         spec = spec >> 1 ;
272       }
273
274       fMemReader->SetEquipmentID( id ); 
275       
276       fClusterizer->SetMemBlock(outputPtr+offset);
277       Bool_t bclustered = fClusterizer->Raw2ClustersChamber(fMemReader);
278       if(bclustered)
279         {
280           HLTDebug("Clustered successfully");
281         }
282       else
283         {
284           HLTError("Clustering ERROR");
285           return -1;
286         }
287
288       AliHLTUInt32_t addedSize;
289       if(fReconstructor->IsProcessingTracklets()){
290         addedSize = fClusterizer->GetAddedTrSize();
291         totalSize += fClusterizer->GetTrMemBlockSize();  //if IsProcessingTracklets() is enabled we always reserve a data block of size GetTrMemBlockSize() for the tracklets
292         if (addedSize > 0){
293           // Using low-level interface 
294           // with interface classes
295           if ( totalSize > size )
296             {
297               HLTError("Too much data; Data written over allowed buffer. Amount written: %lu, allowed amount: %lu.",
298                        totalSize, size );
299               return EMSGSIZE;
300             }
301
302           // Fill block 
303           AliHLTComponentBlockData bd;
304           FillBlockData( bd );
305           bd.fOffset = offset;
306           bd.fSize = addedSize;
307           bd.fSpecification = block.fSpecification;
308           bd.fDataType = AliHLTTRDDefinitions::fgkMCMtrackletDataType;
309           outputBlocks.push_back( bd );
310           HLTDebug( "BD ptr 0x%x, offset %i, size %i, dataType %s, spec 0x%x ", bd.fPtr, bd.fOffset, bd.fSize, DataType2Text(bd.fDataType).c_str(), spec);
311         }
312         offset = totalSize;
313       }
314
315       addedSize = fClusterizer->GetAddedClSize();
316       if (addedSize > 0){
317         
318         Int_t* nTimeBins = (Int_t*)(outputPtr+offset+fClusterizer->GetAddedClSize());
319         *nTimeBins = fClusterizer->GetNTimeBins();
320         addedSize += sizeof(*nTimeBins);
321
322         totalSize += addedSize;
323         if ( totalSize > size )
324           {
325             HLTError("Too much data; Data written over allowed buffer. Amount written: %lu, allowed amount: %lu.",
326                      totalSize, size );
327             return EMSGSIZE;
328           }
329
330         // Fill block 
331         AliHLTComponentBlockData bd;
332         FillBlockData( bd );
333         bd.fOffset = offset;
334         bd.fSize = addedSize;
335         bd.fSpecification = block.fSpecification;
336         bd.fDataType = AliHLTTRDDefinitions::fgkClusterDataType;
337         outputBlocks.push_back( bd );
338         HLTDebug( "BD ptr 0x%x, offset %i, size %i, dataType %s, spec 0x%x ", bd.fPtr, bd.fOffset, bd.fSize, DataType2Text(bd.fDataType).c_str(), spec);
339         offset = totalSize;
340       }
341       else{
342         HLTDebug("Array of clusters is empty!");
343       }
344     }
345   fReconstructor->SetClusters(0x0);
346
347   size = totalSize;
348   HLTDebug("Event is done. size written to the output is %i", size);
349   return 0;
350 }
351
352 void AliHLTTRDClusterizerComponent::PrintObject( TClonesArray* inClustersArray)
353 {
354   AliTRDcluster* cluster=0x0;
355   
356   for (Int_t i=0; i < inClustersArray->GetEntriesFast(); i++){
357     cluster = dynamic_cast<AliTRDcluster*>(inClustersArray->At(i));
358     HLTDebug("cluster[%i]",i);
359     HLTDebug("  PadCol = %i; PadRow = %i; PadTime = %i", cluster->GetPadCol(), cluster->GetPadRow(), cluster->GetPadTime());
360     HLTDebug("  Detector = %i, Amplitude = %f, Center = %f", cluster->GetDetector(), cluster->GetQ(), cluster->GetCenter());
361     HLTDebug("  LocalTimeBin =  %i; NPads = %i; maskedPosition: %s, status: %s", cluster->GetLocalTimeBin(), cluster->GetNPads(),cluster->GetPadMaskedPosition(),cluster->GetPadMaskedPosition());
362   }
363   
364 }
365
366 int AliHLTTRDClusterizerComponent::Configure(const char* arguments){
367   int iResult=0;
368   if (!arguments) return iResult;
369   
370   TString allArgs=arguments;
371   TString argument;
372   int bMissingParam=0;
373
374   TObjArray* pTokens=allArgs.Tokenize(" ");
375   if (pTokens) {
376     for (int i=0; i<pTokens->GetEntries() && iResult>=0; i++) {
377       argument=((TObjString*)pTokens->At(i))->GetString();
378       if (argument.IsNull()) continue;
379       
380       if (argument.CompareTo("output_percentage")==0) {
381         if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
382         HLTInfo("Setting output percentage to: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
383         fOutputPercentage=((TObjString*)pTokens->At(i))->GetString().Atoi();
384         continue;
385       } 
386       else if (argument.CompareTo("-geometry")==0) {
387         if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
388         HLTInfo("Setting geometry to: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
389         fgeometryFileName=((TObjString*)pTokens->At(i))->GetString();
390         continue;
391       } 
392       else if (argument.CompareTo("-lowflux")==0) {
393         fRecoParamType = 0;
394         HLTInfo("Low flux reconstruction selected");
395         continue;
396       }
397       else if (argument.CompareTo("-highflux")==0) {
398         fRecoParamType = 1;
399         HLTInfo("High flux reconstruction selected");
400         continue;
401       }
402       else if (argument.CompareTo("-cosmics")==0) {
403         fRecoParamType = 2;
404         HLTInfo("Cosmics reconstruction selected");
405         continue;
406       }
407       else if (argument.CompareTo("-simulation")==0) {
408         fRecoDataType = 0;
409         HLTInfo("Awaiting simulated data");
410         continue;
411       }
412       else if (argument.CompareTo("-experiment")==0) {
413         fRecoDataType = 1;
414         HLTInfo("Awaiting real data");
415         continue;
416       }
417       else if (argument.CompareTo("-processTracklets")==0) {
418         fProcessTracklets = kTRUE;
419         HLTInfo("Writing L1 tracklets to output");
420         continue;
421       }
422       else if (argument.CompareTo("-noZS")==0) {
423         fOutputPercentage = 100;
424         HLTInfo("Awaiting non zero surpressed data");
425         continue;
426       }
427       else if (argument.CompareTo("-faststreamer")==0) {
428         fHLTstreamer = kTRUE;
429         HLTInfo("Useing fast raw streamer");
430         continue;
431       }
432       else if (argument.CompareTo("-nofaststreamer")==0) {
433         fHLTstreamer = kFALSE;
434         HLTInfo("Don't use fast raw streamer");
435         continue;
436       }
437       else if (argument.CompareTo("-tailcancellation")==0) {
438         fTC = kTRUE;
439         HLTInfo("Useing tailcancellation");
440         continue;
441       }
442       else if (argument.CompareTo("-rawver")==0) {
443         if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
444         HLTInfo("Raw data version is: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
445         fRawDataVersion=((TObjString*)pTokens->At(i))->GetString().Atoi();
446         continue;
447       } 
448       else if (argument.CompareTo("-yPosMethod")==0) {
449         if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
450         TString toCompareTo=((TObjString*)pTokens->At(i))->GetString();
451         if (toCompareTo.CompareTo("COG")==0){
452           HLTInfo("Setting yPosMethod method to: %s", toCompareTo.Data());
453           fyPosMethod=0;
454         }
455         else if (toCompareTo.CompareTo("LUT")==0){
456           HLTInfo("Setting yPosMethod method to: %s", toCompareTo.Data());
457           fyPosMethod=1;
458         }
459         else if (toCompareTo.CompareTo("Gauss")==0){
460           HLTInfo("Setting yPosMethod method to: %s", toCompareTo.Data());
461           fyPosMethod=2;
462         }
463         else {
464           HLTError("unknown argument for yPosMethod: %s", toCompareTo.Data());
465           iResult=-EINVAL;
466           break;
467         }
468         continue;
469       }
470       
471       else {
472         HLTError("unknown argument: %s", argument.Data());
473         iResult=-EINVAL;
474         break;
475       }
476     }
477     delete pTokens;
478   }
479   if (bMissingParam) {
480     HLTError("missing parameter for argument %s", argument.Data());
481     iResult=-EINVAL;
482   }
483   if(iResult>=0){
484     iResult=SetParams();
485   }
486   return iResult;
487 }
488
489 int AliHLTTRDClusterizerComponent::SetParams()
490 {
491   Int_t iResult=0;
492   if(!AliCDBManager::Instance()->IsDefaultStorageSet()){
493     HLTError("DefaultStorage is not set in CDBManager");
494     return -EINVAL;
495   }
496   if(AliCDBManager::Instance()->GetRun()<0){
497     HLTError("Run Number is not set in CDBManager");
498     return -EINVAL;
499   }
500   HLTInfo("CDB default storage: %s; RunNo: %i", (AliCDBManager::Instance()->GetDefaultStorage()->GetBaseFolder()).Data(), AliCDBManager::Instance()->GetRun());
501
502   if(!AliGeomManager::GetGeometry()){
503     if(fgeometryFileName.CompareTo("")==0 || !TFile::Open(fgeometryFileName.Data())){
504       HLTInfo("Loading standard geometry file");
505       AliGeomManager::LoadGeometry();
506     }else{
507       HLTWarning("Loading NON-standard geometry file");
508       AliGeomManager::LoadGeometry(fgeometryFileName.Data());
509     }
510     if(!AliGeomManager::GetGeometry()){
511       HLTError("Could not load geometry");
512       return -EINVAL;
513     }
514   }
515   else{
516     HLTInfo("Geometry Already Loaded!");
517   }
518
519   if (fRecoParamType == 0)
520     {
521       HLTDebug("Low flux params init.");
522       fRecoParam = AliTRDrecoParam::GetLowFluxParam();
523     }
524
525   if (fRecoParamType == 1)
526     {
527       HLTDebug("High flux params init.");
528       fRecoParam = AliTRDrecoParam::GetHighFluxParam();
529     }
530   
531   if (fRecoParamType == 2)
532     {
533       HLTDebug("Cosmic Test params init.");
534       fRecoParam = AliTRDrecoParam::GetCosmicTestParam();
535     }
536
537   if (fRecoParam == 0)
538     {
539       HLTError("No reco params initialized. Sniffing big trouble!");
540       return -EINVAL;
541     }
542
543   // backward compatibility to AliTRDrecoParam < r34995
544 # ifndef HAVE_NOT_ALITRDRECOPARAM_r34995
545 #   define AliTRDRecoParamSetTailCancelation(b) fRecoParam->SetTailCancelation(b)
546 #   define AliTRDRecoParamSetGAUS(b) fRecoParam->SetGAUS(b)
547 #   define AliTRDRecoParamSetLUT(b) fRecoParam->SetLUT(b)
548 # else
549 #   define AliTRDRecoParamSetTailCancelation(b) fRecoParam->SetTailCancelation()
550 #   define AliTRDRecoParamSetGAUS(b) fRecoParam->SetGAUS()
551 #   define AliTRDRecoParamSetLUT(b) fRecoParam->SetLUT()
552 # endif
553
554   if(fTC){AliTRDRecoParamSetTailCancelation(kTRUE); HLTDebug("Enableing Tail Cancelation"); }
555   else{AliTRDRecoParamSetTailCancelation(kFALSE); HLTDebug("Enableing Tail Cancelation"); }
556
557   switch(fyPosMethod){
558   case 0: AliTRDRecoParamSetGAUS(kFALSE); AliTRDRecoParamSetLUT(kFALSE); break;
559   case 1: AliTRDRecoParamSetGAUS(kFALSE); AliTRDRecoParamSetLUT(kTRUE); break;
560   case 2: AliTRDRecoParamSetGAUS(kTRUE); AliTRDRecoParamSetLUT(kFALSE); break;
561   }
562
563   fRecoParam->SetStreamLevel(AliTRDrecoParam::kClusterizer, 0);
564   fReconstructor->SetRecoParam(fRecoParam);
565
566   TString recoOptions="hlt,!cw";
567   if(fProcessTracklets) recoOptions += ",tp";
568   else  recoOptions += ",!tp";
569
570   HLTDebug("Reconstructor options are: %s",recoOptions.Data());
571   fReconstructor->SetOption(recoOptions.Data());
572
573   if (fRecoDataType < 0 || fRecoDataType > 1)
574     {
575       HLTWarning("No data type selected. Use -simulation or -experiment flag. Defaulting to simulation.");
576       fRecoDataType = 0;
577     }
578
579   if (fRecoDataType == 0)
580     {
581       AliTRDrawStreamBase::SetRawStreamVersion(AliTRDrawStreamBase::kTRDsimStream);
582       HLTDebug("Data type expected is SIMULATION!");
583     }
584
585   if (fRecoDataType == 1)
586     {
587       AliTRDrawStreamBase::SetRawStreamVersion(AliTRDrawStreamBase::kTRDrealStream);
588       HLTDebug("Data type expected is EXPERIMENT!");
589     }
590
591   if (fHLTstreamer)
592     {
593       AliTRDrawStreamBase::SetRawStreamVersion("FAST");
594       HLTDebug("fast rawstreamer used");  
595     }
596
597   if(!fClusterizer){
598     fClusterizer = new AliHLTTRDClusterizer("TRDCclusterizer", "TRDCclusterizer");  
599     HLTDebug("TRDClusterizer at 0x%x", fClusterizer);
600   }
601
602   fClusterizer->SetRawVersion(fRawDataVersion);
603
604   return iResult;
605 }
606
607 int AliHLTTRDClusterizerComponent::Reconfigure(const char* cdbEntry, const char* chainId)
608 {
609   // see header file for class documentation
610
611   int iResult=0;
612   const char* path="HLT/ConfigTRD/ClusterizerComponent";
613   const char* defaultNotify="";
614   if (cdbEntry) {
615     path=cdbEntry;
616     defaultNotify=" (default)";
617   }
618   if (path) {
619     HLTInfo("reconfigure from entry %s%s, chain id %s", path, defaultNotify,(chainId!=NULL && chainId[0]!=0)?chainId:"<none>");
620     AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(path/*,GetRunNo()*/);
621     if (pEntry) {
622       TObjString* pString=dynamic_cast<TObjString*>(pEntry->GetObject());
623       if (pString) {
624         HLTInfo("received configuration object string: \'%s\'", pString->GetString().Data());
625         iResult=Configure(pString->GetString().Data());
626       } else {
627         HLTError("configuration object \"%s\" has wrong type, required TObjString", path);
628       }
629     } else {
630       HLTError("cannot fetch object \"%s\" from CDB", path);
631     }
632   }
633
634   return iResult;
635 }