3 //**************************************************************************
4 //* This file is property of and copyright by the ALICE HLT Project *
5 //* ALICE Experiment at CERN, All rights reserved. *
7 //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
8 //* for The ALICE HLT Project. *
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 //**************************************************************************
19 /** @file AliHLTQADataMakerBase.cxx
20 @author Matthias Richter
24 #include "AliHLTQADataMakerBase.h"
25 #include "AliESDEvent.h"
29 /** ROOT macro for the implementation of ROOT specific class methods */
30 ClassImp(AliHLTQADataMakerBase)
32 AliHLTQADataMakerBase::AliHLTQADataMakerBase()
34 // see header file for class documentation
36 // refer to README to build package
38 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
41 AliHLTQADataMakerBase::~AliHLTQADataMakerBase()
43 // see header file for class documentation
46 void AliHLTQADataMakerBase::Exec(AliQAv1::TASKINDEX_t task, TObject * data)
48 // special handling for esds
49 if ( task == AliQAv1::kESDS ) {
50 AliESDEvent * esd = NULL;
51 AliESDEvent * hltesd = NULL;
52 if (data->IsA() == AliESDEvent::Class()) {
53 // silently skip this. Currently HLT QA is still called as
54 // part of AliQAManager::RunOneEvent with the esd
57 if (data->InheritsFrom("TObjArray")) {
58 TObjArray* array=dynamic_cast<TObjArray*>(data);
59 if (array && array->GetEntriesFast()>0) {
60 esd = dynamic_cast<AliESDEvent *>(array->At(0)) ;
62 if (array && array->GetEntriesFast()>1) {
63 hltesd = dynamic_cast<AliESDEvent *>(array->At(1)) ;
66 esd = static_cast<AliESDEvent *>(data) ;
69 if (esd && strcmp(esd->ClassName(), "AliESDEvent") == 0) {
71 MakeESDs(esd, hltesd);
73 AliError(Form("HLT ESD missing or wrong class type (%p), skipping HLT QA task kESDs", hltesd));
76 AliError(Form("ESD missing or wrong class type (%p), skipping HLT QA task kESDSs", esd));
79 // forward for all other types
80 AliQADataMakerRec::Exec(task, data);
84 void AliHLTQADataMakerBase::MakeESDs(AliESDEvent * esd)
86 // see header file for class documentation
88 // as an extension in the QA interface also the hlt esd can be sent
89 // in order to preserve backward compatibility, a new function has been
92 // NOTE: This function is not the place for HLT QA
96 void AliHLTQADataMakerBase::MakeESDs(AliESDEvent * esd, AliESDEvent* hltesd)
99 if (!esd || !hltesd) {
100 AliError("invalid parameter: missing ESDs");
104 // nothing to do in the base class, QA implemented in the overloaded