]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONPreprocessor.cxx
From Cvetan: new macro to load ITS clusters.
[u/mrichter/AliRoot.git] / MUON / AliMUONPreprocessor.cxx
CommitLineData
ea199e33 1/**************************************************************************
2* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3* *
4* Author: The ALICE Off-line Project. *
5* Contributors are mentioned in the code where appropriate. *
6* *
7* Permission to use, copy, modify and distribute this software and its *
8* documentation strictly for non-commercial purposes is hereby granted *
9* without fee, provided that the above copyright notice appears in all *
10* copies and that both the copyright notice and this permission notice *
11* appear in the supporting documentation. The authors make no claims *
12* about the suitability of this software for any purpose. It is *
13* provided "as is" without express or implied warranty. *
14**************************************************************************/
15
16// $Id$
17
18#include "AliMUONPreprocessor.h"
57e176c0 19
ea199e33 20#include "AliMUONPedestalSubprocessor.h"
57e176c0 21#include "AliMUONHVSubprocessor.h"
fee1d02b 22#include "AliMUONGMSSubprocessor.h"
23
24#include "AliLog.h"
57e176c0 25#include "AliShuttleInterface.h"
ea199e33 26#include "Riostream.h"
fee1d02b 27#include "TObjArray.h"
ea199e33 28
29/// \class AliMUONPreprocessor
30///
31/// Shuttle preprocessor for MUON subsystems (TRK and TRG)
32///
33/// It's simply a manager class that deals with a list of sub-tasks
34/// (of type AliMUONVSubprocessor).
35///
36/// \author Laurent Aphecetche
37
38/// \cond CLASSIMP
39ClassImp(AliMUONPreprocessor)
40/// \endcond
41
42//_____________________________________________________________________________
6c7a0c0f 43AliMUONPreprocessor::AliMUONPreprocessor(const char* detName, AliShuttleInterface* shuttle)
44: AliPreprocessor(detName, shuttle),
fee1d02b 45 fSubprocessors(new TObjArray())
ea199e33 46{
6c7a0c0f 47 /// ctor
ea199e33 48}
49
50//_____________________________________________________________________________
51AliMUONPreprocessor::~AliMUONPreprocessor()
52{
53 /// dtor
54 delete fSubprocessors;
55}
56
6c7a0c0f 57//_____________________________________________________________________________
58void
eca96915 59AliMUONPreprocessor::ClearSubprocessors()
6c7a0c0f 60{
61 /// Empty our subprocessor list
eca96915 62 fSubprocessors->Clear();
6c7a0c0f 63}
64
65//_____________________________________________________________________________
66void
67AliMUONPreprocessor::Add(AliMUONVSubprocessor* sub)
68{
69 /// Add a subprocessor to our list of workers
70 fSubprocessors->Add(sub);
71}
72
ea199e33 73//_____________________________________________________________________________
74void
75AliMUONPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
76{
77 /// loop over subtasks and initialize them
78 for ( Int_t i = 0; i <= fSubprocessors->GetLast(); ++i )
79 {
80 Subprocessor(i)->Initialize(run,startTime,endTime);
81 }
82}
83
84//_____________________________________________________________________________
85UInt_t
86AliMUONPreprocessor::Process(TMap* dcsAliasMap)
87{
88 /// loop over subtasks to make them work
89 UInt_t rv(0);
90
91 for ( Int_t i = 0; i <= fSubprocessors->GetLast(); ++i )
92 {
93 rv += Subprocessor(i)->Process(dcsAliasMap);
94 }
95 return rv;
96}
97
98//_____________________________________________________________________________
99void
100AliMUONPreprocessor::Print(Option_t* opt) const
101{
102 /// output to screen
103 cout << "<AliMUONPreprocessor> subprocessors :" << endl;
104 for ( Int_t i=0; i <= fSubprocessors->GetLast(); ++i )
105 {
106 Subprocessor(i)->Print(opt);
107 }
108}
109
110//_____________________________________________________________________________
111AliMUONVSubprocessor*
112AliMUONPreprocessor::Subprocessor(Int_t i) const
113{
114 /// return i-th subprocessor
115 if ( i >= 0 && i <= fSubprocessors->GetLast() )
116 {
117 return static_cast<AliMUONVSubprocessor*>(fSubprocessors->At(i));
118 }
119 return 0x0;
120}