]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/amoreTPC-QA/src/publisher/PublisherQA.cxx
Adding additional documentation (Marian)
[u/mrichter/AliRoot.git] / TPC / amoreTPC-QA / src / publisher / PublisherQA.cxx
CommitLineData
e9d4890d 1/***************************************************************************
2 * Copyright (C) 2007 by Filimon Roukoutakis *
3 * Filimon.Roukoutakis@cern.ch *
4 * *
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. *
9 * *
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. *
14 * *
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"
45af6e68 21#include <AmoreDA.h>
25eb8f52 22#include <AliLog.h>
e9d4890d 23
24ClassImp(amore::TPC::publisher::PublisherQA)
25
981c0bf2 26#include <AliTPCQADataMakerRec.h>
e9d4890d 27#include <TObjArray.h>
28#include <AliRawReaderDate.h>
29
30namespace amore {
31
32namespace TPC {
33
34namespace publisher {
35
36using amore::publisher::Publish;
37
981c0bf2 38PublisherQA::PublisherQA() : fqadm(new AliTPCQADataMakerRec) {
39 // Constructor
40 // make instance of the TPCQADataMakerRec
41 //
42
25eb8f52 43 AliLog::SetClassDebugLevel("AliTPCRawStream",-5);
44 AliLog::SetClassDebugLevel("AliRawReaderDate",-5);
45 AliLog::SetClassDebugLevel("AliTPCAltroMapping",-5);
46 AliLog::SetModuleDebugLevel("RAW",-5);
4a294b26 47 printf("PublisherQA::Constructor\n");
e9d4890d 48
49}
50
51
52PublisherQA::~PublisherQA() {
53
54}
55
56void PublisherQA::BookMonitorObjects() {
7fb2364f 57 //
58 // Called once at the beginning after invocation of amoreAgent
59 // all Data which should be accessible to clents has to be published here
60 //
61
4a294b26 62 printf("PublisherQA::BookMonitorObject\n");
e9d4890d 63 Publish(moInt1, "moInt1", "My Integer MonitorObject 1");
64 int cycleLength=0;
65 fqadmList=fqadm->Init(AliQA::kRAWS, 0, cycleLength);
66 TObjArrayIter* lIt=(TObjArrayIter*)fqadmList->MakeIterator();
67 TNamed* obj;
25eb8f52 68 while((obj=(TNamed*)lIt->Next())) {
25eb8f52 69 obj->Dump();
70 printf("%s\n",obj->GetName());
4a294b26 71 Publish(obj, obj->GetName());
25eb8f52 72 }
e9d4890d 73}
74
75void PublisherQA::StartOfCycle() {
76
77 *moInt1=0;
78 fqadm->StartOfCycle(AliQA::kRAWS);
25eb8f52 79
e9d4890d 80}
81
82void PublisherQA::EndOfCycle() {
83
84 fqadm->EndOfCycle(AliQA::kRAWS);
85 std::cerr << *moInt1 << std::endl;
86
87}
88
89void PublisherQA::MonitorEvent(amore::core::Event& event) {
90
91 AliRawReaderDate* arr=new AliRawReaderDate(event.DATEEvent());
92 fqadm->Exec(AliQA::kRAWS, arr);
93 ++*moInt1;
94 delete arr;
95
96}
97
98void PublisherQA::StartOfRun() {
99
100}
101
102void PublisherQA::EndOfRun() {
103
104 fqadm->Finish();
105
106}
107
108};
109
110};
111
112};