]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/amoreTPC-QA/src/publisher/PublisherQA.cxx
Adding additional documentation (Marian)
[u/mrichter/AliRoot.git] / TPC / amoreTPC-QA / src / publisher / PublisherQA.cxx
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"
21 #include <AmoreDA.h>
22 #include <AliLog.h>
23
24 ClassImp(amore::TPC::publisher::PublisherQA)
25
26 #include <AliTPCQADataMakerRec.h>
27 #include <TObjArray.h>
28 #include <AliRawReaderDate.h>
29
30 namespace amore {
31
32 namespace TPC {
33
34 namespace publisher {
35
36 using amore::publisher::Publish;
37
38 PublisherQA::PublisherQA() : fqadm(new AliTPCQADataMakerRec) {
39   // Constructor
40   // make instance of the TPCQADataMakerRec
41   //
42
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");
48
49 }
50
51
52 PublisherQA::~PublisherQA() {
53
54 }
55
56 void PublisherQA::BookMonitorObjects() {
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
62  printf("PublisherQA::BookMonitorObject\n");  
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;
68  while((obj=(TNamed*)lIt->Next())) {
69    obj->Dump();
70    printf("%s\n",obj->GetName());
71    Publish(obj, obj->GetName());
72  }
73 }
74
75 void PublisherQA::StartOfCycle() {
76  
77  *moInt1=0;
78  fqadm->StartOfCycle(AliQA::kRAWS);
79  
80 }
81
82 void PublisherQA::EndOfCycle() {
83  
84  fqadm->EndOfCycle(AliQA::kRAWS);
85  std::cerr << *moInt1 << std::endl;
86
87 }
88
89 void 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
98 void PublisherQA::StartOfRun() {
99
100 }
101
102 void PublisherQA::EndOfRun() {
103
104  fqadm->Finish();
105  
106 }
107
108 };
109
110 };
111
112 };