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 AliHLTQADataMakerRec.cxx
20 @author Matthias Richter
22 @brief Container for the HLT offline QA
24 #include "AliHLTQADataMakerRec.h"
25 #include "AliESDEvent.h"
30 /** ROOT macro for the implementation of ROOT specific class methods */
31 ClassImp(AliHLTQADataMakerRec)
33 AliHLTQADataMakerRec::AliHLTQADataMakerRec()
35 // see header file for class documentation
37 // refer to README to build package
39 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
42 AliHLTQADataMakerRec::~AliHLTQADataMakerRec()
44 // see header file for class documentation
47 void AliHLTQADataMakerRec::Exec(AliQAv1::TASKINDEX_t task, TObject * data)
49 // special handling for esds
50 if ( task == AliQAv1::kESDS ) {
51 AliESDEvent * esd = NULL;
52 AliESDEvent * hltesd = NULL;
53 if (data->IsA() == AliESDEvent::Class()) {
54 // silently skip this. Currently HLT QA is still called as
55 // part of AliQAManager::RunOneEvent with the esd
58 if (data->InheritsFrom("TObjArray")) {
59 TObjArray* array=dynamic_cast<TObjArray*>(data);
60 if (array && array->GetEntriesFast()>0) {
61 esd = dynamic_cast<AliESDEvent *>(array->At(0)) ;
63 if (array && array->GetEntriesFast()>1) {
64 hltesd = dynamic_cast<AliESDEvent *>(array->At(1)) ;
67 esd = static_cast<AliESDEvent *>(data) ;
70 if (esd && strcmp(esd->ClassName(), "AliESDEvent") == 0) {
72 MakeESDs(esd, hltesd);
74 AliError(Form("HLT ESD missing or wrong class type (%p), skipping HLT QA task kESDs", hltesd));
77 AliError(Form("ESD missing or wrong class type (%p), skipping HLT QA task kESDSs", esd));
80 // forward for all other types
81 AliQADataMakerRec::Exec(task, data);
85 void AliHLTQADataMakerRec::StartOfDetectorCycle()
87 // see header file for class documentation
90 void AliHLTQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray** /*list*/)
92 // see header file for class documentation
95 void AliHLTQADataMakerRec::MakeRaws(AliRawReader * rawReader)
97 // see header file for class documentation
98 if (!rawReader) return;
101 void AliHLTQADataMakerRec::MakeESDs(AliESDEvent * esd)
103 // see header file for class documentation
105 // as an extension in the QA interface also the hlt esd can be sent
106 // in order to preserve backward compatibility, a new function has been
109 // NOTE: This function is not the place for HLT QA
113 void AliHLTQADataMakerRec::MakeESDs(AliESDEvent * esd, AliESDEvent* hltesd)
116 if (!esd || !hltesd) {
117 AliError("invalid parameter: missing ESDs");