1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 #include "AliMUONPreprocessor.h"
19 #include "TObjArray.h"
20 #include "AliMUONPedestalSubprocessor.h"
21 #include "Riostream.h"
23 /// \class AliMUONPreprocessor
25 /// Shuttle preprocessor for MUON subsystems (TRK and TRG)
27 /// It's simply a manager class that deals with a list of sub-tasks
28 /// (of type AliMUONVSubprocessor).
30 /// \author Laurent Aphecetche
33 ClassImp(AliMUONPreprocessor)
36 //_____________________________________________________________________________
37 AliMUONPreprocessor::AliMUONPreprocessor(const char* detector,
38 AliShuttleInterface* shuttle)
39 : AliPreprocessor(detector,shuttle), fSubprocessors(new TObjArray[kLast])
41 /// ctor. Builds the list of subtasks
43 /// \todo FIXME: should test detector wrt to tracker or trigger to
44 /// instantiate the correct list of subtasks, which should be :
55 fSubprocessors->AddAt(new AliMUONPedestalSubprocessor(this),kPedestal);
58 //_____________________________________________________________________________
59 AliMUONPreprocessor::~AliMUONPreprocessor()
62 delete fSubprocessors;
65 //_____________________________________________________________________________
67 AliMUONPreprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
69 /// loop over subtasks and initialize them
70 for ( Int_t i = 0; i <= fSubprocessors->GetLast(); ++i )
72 Subprocessor(i)->Initialize(run,startTime,endTime);
76 //_____________________________________________________________________________
78 AliMUONPreprocessor::Process(TMap* dcsAliasMap)
80 /// loop over subtasks to make them work
83 for ( Int_t i = 0; i <= fSubprocessors->GetLast(); ++i )
85 rv += Subprocessor(i)->Process(dcsAliasMap);
90 //_____________________________________________________________________________
92 AliMUONPreprocessor::Print(Option_t* opt) const
95 cout << "<AliMUONPreprocessor> subprocessors :" << endl;
96 for ( Int_t i=0; i <= fSubprocessors->GetLast(); ++i )
98 Subprocessor(i)->Print(opt);
102 //_____________________________________________________________________________
103 AliMUONVSubprocessor*
104 AliMUONPreprocessor::Subprocessor(Int_t i) const
106 /// return i-th subprocessor
107 if ( i >= 0 && i <= fSubprocessors->GetLast() )
109 return static_cast<AliMUONVSubprocessor*>(fSubprocessors->At(i));