1 /***************************************************************************
2 * Copyright (C) 2007 by Filimon Roukoutakis *
3 * Filimon.Roukoutakis@cern.ch *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
20 #include "PublisherQA.h"
24 ClassImp(amore::TPC::publisher::PublisherQA)
26 #include <AliTPCQADataMakerRec.h>
27 #include <TObjArray.h>
28 #include <AliRawReaderDate.h>
36 using amore::publisher::Publish;
38 PublisherQA::PublisherQA() : fqadm(new AliTPCQADataMakerRec) {
40 // make instance of the TPCQADataMakerRec
43 AliLog::SetClassDebugLevel("AliTPCRawStream",-5);
44 AliLog::SetClassDebugLevel("AliRawReaderDate",-5);
45 AliLog::SetClassDebugLevel("AliTPCAltroMapping",-5);
46 AliLog::SetModuleDebugLevel("RAW",-5);
47 printf("PublisherQA::Constructor\n");
52 PublisherQA::~PublisherQA() {
56 void PublisherQA::BookMonitorObjects() {
58 // Called once at the beginning after invocation of amoreAgent
59 // all Data which should be accessible to clents has to be published here
62 printf("PublisherQA::BookMonitorObject\n");
63 Publish(moInt1, "moInt1", "My Integer MonitorObject 1");
65 fqadmList=fqadm->Init(AliQA::kRAWS, cycleLength);
66 TObjArrayIter* lIt=(TObjArrayIter*)fqadmList->MakeIterator();
68 while((obj=(TNamed*)lIt->Next())) {
70 printf("%s\n",obj->GetName());
71 Publish(obj, obj->GetName());
75 void PublisherQA::StartOfCycle() {
78 fqadm->StartOfCycle(AliQA::kRAWS);
82 void PublisherQA::EndOfCycle() {
83 printf("PublisherQA::EndOfCycle\n");
85 fqadm->EndOfCycle(AliQA::kRAWS);
86 std::cerr << *moInt1 << std::endl;
90 void PublisherQA::MonitorEvent(amore::core::Event& event) {
91 printf("MonitorEvent\n");
93 AliRawReaderDate* arr=new AliRawReaderDate(event.DATEEvent());
94 fqadm->Exec(AliQA::kRAWS, arr);
100 void PublisherQA::StartOfRun(const amore::core::Run& /*run*/) {
101 printf("PublisherQA::StartOfRun\n");
105 void PublisherQA::EndOfRun(const amore::core::Run& /*run*/) {
106 printf("PublisherQA::EndOfRun\n");